Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYesDocument UUID

Implementation Reference

  • 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);
        }
      },
    );

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/UnMarkdown/mcp-server'

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