Same documents, over and over?
DocDealer automates repetitive Word documents: fill in a form and AI writes the finished .docx from a template you control. Do it in the editor, from your own code over REST, or let an AI agent do it end to end.
Fill the typed form, drop in a DNI, watch sections stream in.
DNI.pdf analyzed → grantor.nameDocDealer is an AI Word document generator: fill in a form, get a finished .docx built from a typed template.
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.
- What it isA schema-bound document generator. Templates declare the shape of the output; the runtime enforces it.
- Why it is cheapA fraction of the cost of an agent loop — one scoped AI call per section instead of 30–100 tool calls.
- Default modelgoogle/gemini-2.5-flash. Bring your own model (Anthropic, OpenAI, Vercel AI Gateway) any time.
- Who it is forNotaries, property and company registries, gestorías, law firms, property managers, tax and labour advisors, real estate agencies and insurance brokers — any desk where the same document repeats.
If you write the same document every week, it should write itself
DocDealer fits any desk where the paperwork repeats: the format is fixed, only the names, dates and amounts change, and a typo is expensive. Turn the document into a template once — from then on, producing it is filling in a form.
Notaries
Deeds, powers of attorney, wills, minutes and certificates — the same clauses with different parties, every day.
Property and company registries
Notes, qualifications and certifications assembled from a fixed structure and registry data.
Gestorías and filing agents
Filings, registrations, powers and letters to the administration. High volume, low variation.
Law firms
Claims, replies, standard contracts and dismissal letters — boilerplate that can never be wrong.
Property managers
Meeting notices, minutes and debt certificates, for every building, every quarter.
Tax and labour advisors
Employment contracts, settlements, appeals and answers to tax authority requests.
Real estate agencies
Deposit agreements, leases and listing mandates. One template, hundreds of properties.
Insurance brokers
Policy paperwork, claim reports and coverage decision letters, at claim volume.
- Court agents (procuradores)
- Expert witnesses and appraisers
- Architecture and engineering
- In-house legal and compliance
- HR and staffing agencies
- Clinics and private healthcare
- Public administration
- Audit and consulting
Not on the list? If your team retypes the same Word document with different names, dates and amounts, DocDealer fits.
Every template runs on three surfaces — pick the one that fits.
Web app
Open the editor, fill the form, watch sections stream in, export DOCX or PDF. Real-time collaboration included.
REST API
POST a template id and payload with a bearer token. Get a validated DOCX or PDF back. Documented at /api/docs.
MCP server
Every template is a typed tool. Claude, Cursor and custom agents discover schemas and create documents over the Model Context Protocol.
Cheaper and faster than a raw agent loop.
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.
- 01Structured, not improvised. Fields, sections and rules are fixed in the template; the model only fills in grounded content.
- 02Predictable cost. No open-ended tool-calling loop — one bounded generation per section.
- 03Validated output. Every value traces back to your form data or attachments. Zero hallucinations.
Typed templates. Strict rules. Predictable output.
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.
- Attachment intelligence
- Mark a file field as analyzable and AI extracts structured data from PDFs and images into the form for you.
--- frontmatter
type: date fieldKey: fecha_firma required: true
type: selector fieldKey: tipo_poder options: […]
type: file_attachment fieldKey: dni_compareciente
schema: fullName · documentNumber · nationality
validationRules: «debe mostrar un DNI legible…»
sectionVisibilityRules: hide CONFIDENCIALIDAD if false<section name="COMPARECEN">
<instructions> «prioriza los datos extraídos del DNI analizado»
Doña {Nombre del compareciente | MARÍA LÓPEZ SÁEZ}, con DNI {DNI | 46.812.339-K}…
Schemas in, valid documents out
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.
Validation as a guarantee
Required fields, regex constraints, allowed values — checked the same way whether a human or an agent built the document.
DOCX & PDF, formatted
Export in Word with your custom paragraph styles, page setup and headers, or rendered to PDF in one call.
Native protocol for
AI agents.
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.
- list_templates
- get_template
- create_document
- update_document_form
- analyze_attachments
- generate_all_sections
- validate_document
- export_document
Programmatic document creation
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.
POST /api/attachments — upload a DNI, deed or proposalPOST /api/ai/analyze/attachment — typed extractionPOST /api/documents/generate — one-shot, returns the file
$ curl -H "Authorization: Bearer $DD_KEY" \
-d @poderes.json https://api.thedocdealer.com/api/documents/generate
← 200 { filename: "documento.docx", blob: "UEsDBBQ…" }Edit together, in real time
Multiple users can fill forms and review documents simultaneously thanks to Yjs CRDTs and Hocuspocus over WebSocket, with Redis-backed horizontal scaling.
Author templates from your own AI agent
Connect Claude Code, Cursor or any MCP client. It exports a template as a single file, edits it, validates it and generates a test document in memory — you review the diff before anything reaches a live template. Imports that fail validation, or that would overwrite someone else's edit, are refused.
Export → edit → test → diff → importBuilt for EU data protection — and Spanish notarial scrutiny.
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.
- 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.
Want to see if DocDealer fits?
Tell us about you and what you're trying to draft. We read every message; the team replies within one working day.
We use your details only to reply. No newsletter, no sharing with third parties.
Build templates. Ship documents.
Define the schema once. Generate documents from the UI, the API, an MCP agent, or all three.