Skip to main content
Glama
ProsodyAI

@prosodyai/mcp-docs

Official
by ProsodyAI

Read a doc

read_doc

Fetch the complete text of a documentation entry, SDK README, or recipe by providing its stable ID returned by search or list tools.

Instructions

Fetch the full content of a doc, SDK README, recipe, or other entry by id (as returned by search_docs or list_docs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesStable id returned by search/list, e.g. `docs/STRUCTURE`, `sdks/typescript`, `recipes/livekit-realtime-agent`.

Implementation Reference

  • The handler function for the 'read_doc' tool. It takes an 'id' parameter, looks up the entry via getEntry(), and returns the full document body with a header containing title, section, id, and path.
    async ({ id }) => {
      const entry = await getEntry(id);
      if (!entry) return textResponse(`No document with id "${id}".`);
      const header = `# ${entry.title}\n\n_Section: ${entry.section} • id: ${entry.id} • path: ${entry.relPath}_\n\n---\n\n`;
      return textResponse(header + entry.body);
    },
  • src/server.ts:117-138 (registration)
    Registration of the 'read_doc' tool using server.registerTool() with its title, description, and inputSchema (requiring the 'id' string).
    server.registerTool(
      "read_doc",
      {
        title: "Read a doc",
        description:
          "Fetch the full content of a doc, SDK README, recipe, or other entry by `id` (as returned by `search_docs` or `list_docs`).",
        inputSchema: {
          id: z
            .string()
            .min(1)
            .describe(
              "Stable id returned by search/list, e.g. `docs/STRUCTURE`, `sdks/typescript`, `recipes/livekit-realtime-agent`.",
            ),
        },
      },
      async ({ id }) => {
        const entry = await getEntry(id);
        if (!entry) return textResponse(`No document with id "${id}".`);
        const header = `# ${entry.title}\n\n_Section: ${entry.section} • id: ${entry.id} • path: ${entry.relPath}_\n\n---\n\n`;
        return textResponse(header + entry.body);
      },
    );
  • Input schema definition for 'read_doc': a single required string parameter 'id' which is the stable id returned by search/list tools.
      inputSchema: {
        id: z
          .string()
          .min(1)
          .describe(
            "Stable id returned by search/list, e.g. `docs/STRUCTURE`, `sdks/typescript`, `recipes/livekit-realtime-agent`.",
          ),
      },
    },
  • The getEntry() helper function that is called by the read_doc handler to look up a ContentEntry by its id slug (normalized via makeId).
    export async function getEntry(id: string): Promise<ContentEntry | undefined> {
      const all = await loadContent();
      const norm = makeId(id);
      return all.find((e) => e.id === norm);
    }
  • The makeId() helper used within getEntry() to normalize paths by stripping file extensions and normalizing slashes.
    function makeId(relPath: string): string {
      // strip extension; normalise slashes
      return relPath.replace(/\\/g, "/").replace(/\.(md|mdx|json|yaml|yml)$/i, "");
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears the full burden. It states the tool 'fetches full content', implying a safe read operation, but does not elaborate on side effects, permissions, or rate limits. This is adequate but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no unnecessary words. It efficiently conveys the tool's purpose and usage context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter, no annotations, and no output schema, the description is fully complete. It states what the tool does, what it returns, and how to get the required parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers the single parameter `id` with a description and examples, achieving 100% coverage. The tool description reinforces the parameter's source, adding value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Fetch', the resource 'full content', and the scope 'doc, SDK README, recipe, or other entry'. It also references sibling tools `search_docs` and `list_docs` for obtaining the `id`, distinguishing its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly mentions that the `id` should come from `search_docs` or `list_docs`, providing clear context for when to use this tool. It does not explicitly state when not to use it, but the guidance is effective.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ProsodyAI/mcp-docs'

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