Skip to main content
Glama

docx-exportJson

Extract the JSON model from a DOCX document to access its structure and content programmatically for editing or integration purposes.

Instructions

Return the current JSON model for a given id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Handler function for the 'docx-exportJson' tool. Parses the input arguments to extract the document ID, retrieves the document from the registry, checks if it exists, and returns its JSON representation wrapped in the 'ok' response format.
    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); }
  • Tool registration entry including the description and input schema for 'docx-exportJson'. The schema requires a single 'id' string parameter representing the document ID.
    "docx-exportJson": { description: "Return the current JSON model for a given id.", inputSchema: { type: "object", required: ["id"], properties: { id: { type: "string" } } } }
  • src/index.ts:102-103 (registration)
    Registration of all tools, including 'docx-exportJson', in the ListToolsRequestHandler. Maps the tools object to the required format for the MCP server.
    tools: Object.entries(tools).map(([name, t]) => ({ name, description: t.description, inputSchema: t.inputSchema as any })) }));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lihongjie0209/docx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server