Skip to main content
Install @mastra/core and @doconda/sdk, wrap each tool from doconda.tools() with createTool (it takes the JSON Schema as is, no Zod needed) and pass them to your Agent. When you ask for a document, the agent calls create_document and its answer carries the links to the Word, PowerPoint, Excel or PDF file.

Steps

  1. Put your Doconda API key (dashboard → API keys) in DOCONDA_API_KEY and your model provider’s key (here, ANTHROPIC_API_KEY).
  2. Install the dependencies: npm install @mastra/core @doconda/sdk.
  3. Create the agent with the tools:
model uses Mastra’s provider/model format, which reads the provider’s key from your environment. With MCP instead of the SDK, use MCPClient from @mastra/mcp against https://api.eu.doconda.com/mcp and pass await mcp.listTools() as tools. The tools come prefixed with the server name (doconda_create_document, …).

What you get back

  • format: docx, pdf, pptx, xlsx or artifact. Word, PowerPoint and Excel files come with their PDF.
  • status: ready, ready_with_warnings, needs_review or failed (not charged).
  • Links expire after 5 minutes; the agent gets fresh ones with get_document.

FAQ

Yes: the agent is the same. If a step doesn’t need an agent, call doconda.documents.create({ format: "docx", content: { markdown } }) directly with the previous step’s text.
From your server, never the browser: your API key gives access to every document in the project.
You pay per delivered document; failed ones are not charged. See pricing.

Keep reading