get_document
Retrieve a document by its UUID to access its full markdown content.
Instructions
Get a document by ID, including its full markdown content
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document UUID |
Implementation Reference
- src/tools.ts:189-200 (handler)The handler function for the 'get_document' tool. It takes a document UUID, makes a GET request to /v1/documents/{id}, and returns the full document including markdown content.
async ({ id }) => { try { const result = await client.request( "GET", `/v1/documents/${encodeURIComponent(id)}`, ); return jsonResult(result); } catch (err) { return errorResult(err); } }, ); - src/tools.ts:179-181 (schema)Input schema for get_document: requires a single 'id' field (string) describing the Document UUID.
{ id: z.string().describe("Document UUID"), }, - src/tools.ts:176-200 (registration)Registration of the 'get_document' tool via server.tool() with metadata (title, readOnlyHint, etc.) and the handler function.
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); } }, );