get_document
Retrieve a document by its ID to access the full markdown content for editing, publishing, or converting to styled formats like Google Docs or Word.
Instructions
Get a document by ID, including its full markdown content
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document UUID |
Implementation Reference
- src/tools.ts:175-200 (handler)The implementation of the 'get_document' tool, which is registered using server.tool and calls the Unmarkdown API.
// 4. get_document server.tool( "get_document", "Get a document by ID, including its full markdown content", { id: z.string().describe("Document UUID"), }, { title: "Get Document", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, async ({ id }) => { try { const result = await client.request( "GET", `/v1/documents/${encodeURIComponent(id)}`, ); return jsonResult(result); } catch (err) { return errorResult(err); } }, );