docx-exportJson
Retrieve the JSON model of a Word document by its ID using the DOCX MCP Server. Simplify document data extraction for further processing or analysis.
Instructions
Return the current JSON model for a given id.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/index.ts:217-222 (handler)Handler implementation for the 'docx-exportJson' tool. Parses the input arguments using the tool's inputSchema, retrieves the document from the DocRegistry using the provided id, checks if the document exists, and returns the document's JSON content.case "docx-exportJson": { const { id } = parseArgs<{ id: string }>(args, tools["docx-exportJson"].inputSchema); const doc = registry.get(id); if (!doc) throw new McpError(ErrorCode.InvalidParams, `doc not found: ${id}`); return ok(doc.json); }
- src/index.ts:81-84 (registration)Tool registration entry for 'docx-exportJson', including its description and input schema definition. This is part of the tools object used for listing tools and validating inputs."docx-exportJson": { description: "Return the current JSON model for a given id.", inputSchema: { type: "object", required: ["id"], properties: { id: { type: "string" } } } }
- src/index.ts:83-83 (schema)Input schema for the 'docx-exportJson' tool, defining that it requires a string 'id' parameter.inputSchema: { type: "object", required: ["id"], properties: { id: { type: "string" } } }