Skip to main content
Glama
Particle-Academy

@particle-academy/docs-mcp

Official

docs_read

Read the full markdown content of any doc file from installed @particle-academy packages using the package name and doc path. This provides version-matched documentation without network calls.

Instructions

Read the full markdown content of one doc file. Pass the package name and the path from docs_list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageYesPackage name, e.g. '@particle-academy/react-fancy'.
pathYesDoc path, e.g. 'README.md' or 'docs/guides/sheets.md'.

Implementation Reference

  • The handler function for the docs_read tool. It extracts package name and path from args, calls readDoc() from scanner.ts, and returns the file content or an error if not found.
      (args) => {
        const pkg = typeof args.package === "string" ? args.package : "";
        const path = typeof args.path === "string" ? args.path : "";
        if (!pkg || !path) {
          return errorResult("Both `package` and `path` are required.");
        }
        const content = readDoc(cache, pkg, path);
        if (content === null) {
          return errorResult(
            `Not found: ${pkg} :: ${path}. Call docs_list to see available paths.`,
          );
        }
        return textResult(content, { package: pkg, path, bytes: content.length });
      },
    );
  • Input schema for docs_read tool: requires 'package' (string) and 'path' (string) parameters.
    inputSchema: {
      type: "object",
      properties: {
        package: { type: "string", description: "Package name, e.g. '@particle-academy/react-fancy'." },
        path: { type: "string", description: "Doc path, e.g. 'README.md' or 'docs/guides/sheets.md'." },
      },
      required: ["package", "path"],
    },
  • src/tools.ts:88-116 (registration)
    Tool registration for docs_read using server.registerTool() with name 'docs_read', description, input schema, and handler.
    server.registerTool(
      {
        name: "docs_read",
        description:
          "Read the full markdown content of one doc file. Pass the package name and the path from docs_list.",
        inputSchema: {
          type: "object",
          properties: {
            package: { type: "string", description: "Package name, e.g. '@particle-academy/react-fancy'." },
            path: { type: "string", description: "Doc path, e.g. 'README.md' or 'docs/guides/sheets.md'." },
          },
          required: ["package", "path"],
        },
      },
      (args) => {
        const pkg = typeof args.package === "string" ? args.package : "";
        const path = typeof args.path === "string" ? args.path : "";
        if (!pkg || !path) {
          return errorResult("Both `package` and `path` are required.");
        }
        const content = readDoc(cache, pkg, path);
        if (content === null) {
          return errorResult(
            `Not found: ${pkg} :: ${path}. Call docs_list to see available paths.`,
          );
        }
        return textResult(content, { package: pkg, path, bytes: content.length });
      },
    );
  • The readDoc() helper function that looks up a package by name in the scan results, finds the file by path, and reads its markdown content from disk using readFileSync.
    export function readDoc(scan: PackageDocs[], packageName: string, path: string): string | null {
      const pkg = scan.find((p) => p.name === packageName);
      if (!pkg) return null;
      const file = pkg.files.find((f) => f.path === path);
      if (!file) return null;
      try {
        return readFileSync(file.absolutePath, "utf8");
      } catch {
        return null;
      }
    }
Behavior3/5

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

With no annotations provided, the description bears full burden. It discloses a read operation ('Read') and implies no side effects. However, it does not detail potential error states, file size limits, or return format specifics beyond 'markdown content'. The description is adequate but not rich.

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, efficient sentence that conveys the purpose, input requirements, and source for parameters. No wasted words.

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

Completeness4/5

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

For a simple tool with two parameters and no output schema, the description covers the key aspects: what it returns (full markdown content), what parameters are needed, and how to get them. Could mention error handling but overall sufficient.

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?

Schema coverage is 100% (both parameters described). The description adds value by specifying the path should come 'from docs_list', guiding the agent on parameter sourcing beyond the schema definitions.

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 action ('Read the full markdown content') and the resource ('one doc file'). It distinguishes this tool from siblings like docs_list (which lists) and docs_search (which searches) by specifying it reads content.

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 instructs the agent to 'Pass the package name and the path from docs_list', providing clear context on when to use the tool (after obtaining a path from docs_list). However, it does not explicitly mention when not to use it or suggest alternatives like docs_search.

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

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