One schema, three surfaces. Anything that can read it produces a valid DOCX — including AI agents.
The same sealed .docx — whether a person, your code, or an AI fills it in.
✦AI filled grantor.name and grantor.dni from the DNI.
Protocolo 2025/1847
PODER GENERAL DE REPRESENTACIÓN
En Barcelona, a quince de enero de dos mil veinticinco.
Ante mí, SALVADOR FARRÉS RIPOLL, Notario del Ilustre Colegio de Cataluña.
COMPARECE:
AI generated
INTERVIENE:
AI generated
OTORGA:
AI generated
Formatted, validated, official.
You define a template (fields, types, validation rules, conditional logic) once. Then anything that knows the schema — a person, a backend service, or an AI agent — produces a validated DOCX or PDF document through the same surface.
Web app
Open the editor, fill the form, watch sections stream in, export DOCX or PDF. Real-time collaboration included.
A general-purpose agent re-reads your instructions and re-derives the document structure on every run. DocDealer encodes that structure once, in the template — so each document is a short, grounded, validated generation instead of a long, expensive reasoning loop.
Structured, not improvised
Fields, sections and rules are fixed in the template; the model only fills in grounded content.
Predictable cost
No open-ended tool-calling loop — one bounded generation per section.
Validated output
Every value traces back to your form data or attachments. Zero hallucinations.
A template is a schema with fields, validation rules and conditional logic. Once defined, anything that knows the schema — UI, API, or AI agent — can produce a valid document.
Field types
Text, number, date, enum, file, repeating objects. Each field has a type the runtime understands.
Validation rules
Required, min/max, regex, allowed values. Bad data is rejected at the boundary, not 200 lines later.
Conditional logic
Fields and sections appear, hide, or become required based on other answers — defined declaratively in the template.
Attachment intelligence
Mark a file field as analyzable and AI extracts structured data from PDFs and images into the form for you.
Versioning & changelog
Every template change creates a new version with a tracked changelog. Old documents stay pinned to the version they were created with.
Every field has a type and rules. The same schema drives the editor, the validator and the AI — so anything generated matches the template, and what doesn't is flagged at the source.
Form generated from schema
The template defines the UI. Sections, field order and conditional visibility are computed from the same source the API consumes.
AI fills the form, not the prose
The model writes structured values into typed fields — under the rules in the template. Hallucinations have nowhere to land.
DOCX & PDF, formatted
Export in Word with your custom paragraph styles, page setup and headers, or rendered to PDF in one call.
Validation as a guarantee
Required fields, regex constraints, allowed values — checked the same way whether a human or an agent built the document.
Expose every template through the Model Context Protocol. Claude, Cursor, your own orchestrator — anything MCP-compatible discovers your templates, reads their schemas and creates documents through tool calls.
Discoverable templates
Tools list every template the org has, with their schemas — so the agent picks one and knows what to fill.
Typed tool calls
create_document, update_form, generate_section, validate_document, export_document — strongly-typed arguments.
Returns the artifact
The DOCX or PDF comes back as a base64 payload the agent can hand back to the user or post to S3.
Bearer-token auth
API keys authenticate the MCP session. Per-template allowlists scope what an agent can touch.
Every UI action is a REST call. Authenticate with a bearer token, POST a template id and a payload, get back a validated document. Same surface your MCP server uses.
Per-org bearer tokens
Issue, rename and revoke API keys scoped to an organization. Shown plaintext once on creation.
Per-template allowlist
Restrict a key to a subset of templates so a backend service can only touch what it should.
Scoped permissions
Fine-grained scopes — read, write, export — granted per key. Least-privilege by default.
Rotation friendly
Multiple active keys per org so you can rotate without downtime.
Multiple users can fill forms and review documents simultaneously thanks to Yjs CRDTs and Hocuspocus over WebSocket, with Redis-backed horizontal scaling.
Concrete claims grounded in the deployed infrastructure. Customer is the data controller; DocDealer acts as data processor under Article 28 GDPR and signs a DPA on request.
EU data residency
All persistent data lives on AWS eu-west-1 (Ireland). Nothing at rest leaves the EU — Postgres, S3, Redis are all in-region.
Encryption at rest and in transit
S3 SSE-AES256 for documents and attachments; RDS-managed encryption for Postgres; TLS 1.2+ end-to-end.
Per-organization tenant isolation
Data is scoped per organization at the service layer. Bearer tokens are org-scoped with optional per-template allowlists.
Sub-processors, disclosed
AWS (infrastructure), Vercel AI Gateway → Google Gemini (zero retention of prompt content), Google Maps (geocoding, query strings not persisted), WorkOS (auth + audit logs).
Right to erasure
Deleting an organization removes its documents, attachments, AI analyses and audit trail. Individual users can be removed without affecting org content.
DPA on request
Article 28 Data Processing Agreement available before signing. We are the processor; you remain the controller.
LOPDGDD = Ley Orgánica 3/2018 de Protección de Datos Personales y garantía de los derechos digitales — the Spanish national implementation that complements GDPR. AEPD is the competent supervisory authority. For full legal text contact product@thedocdealer.com.
Tell us about you and what you're trying to draft. We read every message; the team replies within one working day.
Define the schema once. Generate documents from the UI, the API, an MCP agent, or all three.