createTool, or load them from the MCP server with MCPClient.
Capabilities
- Create a Word, PowerPoint, Excel or PDF file, or an artifact, from a request or from Markdown the agent wrote.
- Edit a file: only what is asked changes, and
get_reportlists every change. - Convert a file to another format with no AI, for example any file to Markdown so the agent can read it.
- Read what people saved in an artifact, such as poll votes.
Setup
This integration uses a Doconda API key inDOCONDA_API_KEY (from API keys). Mastra’s
provider/model format reads the provider key from your environment, for example ANTHROPIC_API_KEY.
With the SDK tools
text is the agent’s answer, with the presentation’s download links. createTool takes each tool’s JSON Schema as is,
with no conversion to Zod.
With the MCP client
Tools
The agent gets the eight Doconda tools; see the tools for what each one does. WithMCPClient, tool names arrive prefixed with the server name (doconda_create_document, …). A failed call returns
{ "error": "<code>", "message": "…" } instead of throwing, so the model can correct itself.
Troubleshooting
Doconda: pass { apiKey } or set DOCONDA_API_KEY.— The SDK found no key: setDOCONDA_API_KEY, or pass{ apiKey }toDoconda.- A tool result has
"error": "insufficient_balance"— The project’s balance can’t cover the document: top up in the dashboard, or ask forquality: "fast". - The download link stopped working — File links expire after 5 minutes; the agent calls
get_documentfor fresh ones.
Useful links
- TypeScript SDK.
- MCP server: local and remote setup.
- doconda-examples on GitHub: ready-to-run scripts.
- API reference.