Skip to main content
Glama

mockzilla_docs_read

Returns the full markdown document for a specific Mockzilla topic, such as middleware or codegen, to provide complete context for in-depth questions.

Instructions

Return the full markdown for one mockzilla doc topic. Use this when the user asks a deep question about a specific area (middleware, contexts, codegen, config) and you want full context. For broader questions or when you don't know the right topic, use mockzilla_docs_search first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesTopic name from `mockzilla_docs_topics` (e.g. 'middleware', 'usage/portable').

Implementation Reference

  • lib/tools.js:263-283 (registration)
    Registration of mockzilla_docs_read tool in the LOCAL_TOOLS registry, with description, inputSchema (requiring 'topic' string), and handler reference to readTopic.
    mockzilla_docs_read: {
      description:
        "Return the full markdown for one mockzilla doc topic. Use this " +
        "when the user asks a deep question about a specific area " +
        "(middleware, contexts, codegen, config) and you want full " +
        "context. For broader questions or when you don't know the " +
        "right topic, use `mockzilla_docs_search` first.",
      inputSchema: {
        type: "object",
        properties: {
          topic: {
            type: "string",
            description:
              "Topic name from `mockzilla_docs_topics` (e.g. 'middleware', 'usage/portable').",
          },
        },
        required: ["topic"],
        additionalProperties: false,
      },
      handler: readTopic,
    },
  • The readTopic handler function — executes the tool logic by validating the topic argument, calling loadTopicText to fetch the markdown content, and returning {topic, content}.
    export async function readTopic(args) {
      const topic = args.topic;
      if (typeof topic !== "string" || topic.length === 0) {
        throw new Error("`topic` must be a non-empty string");
      }
      const text = await loadTopicText(topic);
      return { topic, content: text };
    }
  • The loadTopicText helper — fetches the markdown content for a given topic either from the local filesystem (MOCKZILLA_DOCS_DIR) or from GitHub's raw.githubusercontent.com, with a 1-hour TTL cache.
    async function loadTopicText(topic) {
      if (LOCAL_DIR) {
        return await readFile(path.join(LOCAL_DIR, `${topic}.md`), "utf8");
      }
      const cached = contentCache.get(topic);
      if (cached && Date.now() - cached.at < TTL_MS) return cached.text;
    
      const url = RAW_URL(`docs/${topic}.md`);
      const res = await fetch(url);
      if (!res.ok) {
        throw new Error(
          `Topic "${topic}" not found (GitHub returned ${res.status} for ${url})`,
        );
      }
      const text = await res.text();
      contentCache.set(topic, { text, at: Date.now() });
      return text;
    }
  • Input schema for mockzilla_docs_read — requires a 'topic' string property (topic name from mockzilla_docs_topics).
    inputSchema: {
      type: "object",
      properties: {
        topic: {
          type: "string",
          description:
            "Topic name from `mockzilla_docs_topics` (e.g. 'middleware', 'usage/portable').",
        },
      },
      required: ["topic"],
      additionalProperties: false,
    },
  • lib/tools.js:6-6 (registration)
    Import of readTopic from './docs.js' into tools.js.
    import { readTopic, searchDocs, topicsList } from "./docs.js";
Behavior4/5

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

No annotations provided, but description accurately describes read-only behavior. Could explicitly state it is a safe operation.

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?

Two sentences, first states purpose, second gives usage guidance. No redundancy, front-loaded.

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 and no output schema, description is fully sufficient, explaining purpose, usage, and relation to sibling.

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

Parameters3/5

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

Schema coverage is 100% and schema description already explains source and format. Description adds no extra meaning beyond tool context.

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?

Clearly states it returns full markdown for one doc topic, distinguishes from sibling `mockzilla_docs_search` by specifying when to use each.

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

Usage Guidelines5/5

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

Explicitly says to use for deep, specific questions and to use `mockzilla_docs_search` for broader or unknown topics, providing clear context.

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/mockzilla/mockzilla-mcp'

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