doconda.tools() as tools in messages.create and run each tool Claude asks for. Claude calls
create_document with format: "docx" for a Word file (which comes with its PDF) or format: "pdf" for the PDF alone,
and gets back the download links.
Steps
- Put your Anthropic key in
ANTHROPIC_API_KEYand your Doconda key (dashboard → API keys) inDOCONDA_API_KEY. - Install the dependencies.
- Run the tool-use loop: while
stop_reasonistool_use, run each tool and hand back thetool_result.
doconda.tools() already have the
shape it expects. With the API’s MCP connector (in beta), Claude calls Doconda’s remote server and you run nothing; the
code is in the Claude guide.
What you get back
- With
format: "docx",linksholds the editable Word file and its PDF; withformat: "pdf", only the PDF. status:readyorfailed. Failed documents are not charged.- Links expire after 5 minutes; Claude gets fresh ones with
get_document.
FAQ
Can Claude generate a .docx without tools?
Can Claude generate a .docx without tools?
No: the model’s answer is text, not a file. With the tools, Claude decides the content and Doconda builds the file.
If Claude already wrote the text in Markdown,
doconda.convert(text_bytes, "docx", filename="memo.md") turns it
into a .docx with no AI (the first 1,000 conversions each month are free, then €0.01 each).What about Claude Desktop or Claude Code?
What about Claude Desktop or Claude Code?
Add the MCP server (
npx -y @doconda/mcp) and ask in the chat. See Claude.Does it work with Claude on Bedrock or Vertex AI?
Does it work with Claude on Bedrock or Vertex AI?
Yes, the tools are standard JSON Schema. See Amazon Bedrock and
Google Vertex AI.
How much does it cost?
How much does it cost?
A document from a sentence costs €0.15 at
fast, €0.50 at standard and €1.50 at best. Failed documents are not
charged. See pricing.Related
- Claude: the full guide, with Claude Desktop, Claude Code and the MCP connector.
- Convert files: Markdown to Word or PDF with no AI.