Skip to main content
Glama
CaptainCrouton89

MCP Server Boilerplate

get-mcp-docs

Generate documentation for MCP servers to help developers understand and implement custom tools, resources, and prompts for AI assistants like Claude and Cursor.

Instructions

Make an MCP server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the MCP server

Implementation Reference

  • The handler function that implements the logic for the 'get-mcp-docs' tool, returning a markdown code block with sample MCP server TypeScript code.
      async ({ name }) => {
        const response = `
    # Main file for the MCP server
    
    \`\`\`ts
    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
    import { z } from "zod";
    // Create the MCP server
    const server = new McpServer({
      name: "hello-world",
      version: "1.0.0",
    });
    
    // Tool: Store conversation with embeddings
    server.tool(
      "hello-world",
      "Say hello to the user",
      {
        name: z.string().describe("The name of the user"),
      },
      async ({ name }) => {
        const response = \`Hello ${name}\`;
    
        return {
          content: [
            {
              type: "text",
              text: response,
            },
          ],
        };
      }
    );
    
    // Start the server
    async function main() {
      try {
        const transport = new StdioServerTransport();
        await server.connect(transport);
        console.error("MCP Hello World Server running...");
      } catch (error) {
        console.error("Error starting server:", error);
        process.exit(1);
      }
    }
    
    main().catch(console.error);
    \`\`\`
    `;
        return {
          content: [
            {
              type: "text",
              text: response,
            },
          ],
        };
      }
  • Input schema for the 'get-mcp-docs' tool using Zod, defining a 'name' parameter.
    {
      name: z.string().describe("The name of the MCP server"),
    },
  • src/index.ts:33-98 (registration)
    Registration of the 'get-mcp-docs' tool on the MCP server using server.tool() method.
    server.tool(
      "get-mcp-docs",
      "Make an MCP server",
      {
        name: z.string().describe("The name of the MCP server"),
      },
      async ({ name }) => {
        const response = `
    # Main file for the MCP server
    
    \`\`\`ts
    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
    import { z } from "zod";
    // Create the MCP server
    const server = new McpServer({
      name: "hello-world",
      version: "1.0.0",
    });
    
    // Tool: Store conversation with embeddings
    server.tool(
      "hello-world",
      "Say hello to the user",
      {
        name: z.string().describe("The name of the user"),
      },
      async ({ name }) => {
        const response = \`Hello ${name}\`;
    
        return {
          content: [
            {
              type: "text",
              text: response,
            },
          ],
        };
      }
    );
    
    // Start the server
    async function main() {
      try {
        const transport = new StdioServerTransport();
        await server.connect(transport);
        console.error("MCP Hello World Server running...");
      } catch (error) {
        console.error("Error starting server:", error);
        process.exit(1);
      }
    }
    
    main().catch(console.error);
    \`\`\`
    `;
        return {
          content: [
            {
              type: "text",
              text: response,
            },
          ],
        };
      }
    );
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers none. 'Make an MCP server' doesn't indicate whether this is a read operation, a write operation, or something else. It doesn't disclose what happens when invoked (e.g., creates files, returns documentation, requires specific permissions). The description provides no behavioral context beyond the minimal action implied by the verb 'Make'.

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

Conciseness2/5

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

While technically concise with just three words, this is under-specification rather than effective conciseness. The description fails to communicate essential information and wastes the opportunity to provide meaningful guidance. A truly concise description would still convey purpose and usage while being brief.

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

Completeness1/5

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

Given a tool with 1 parameter, no annotations, and no output schema, the description is completely inadequate. It doesn't explain what the tool does, when to use it, what behavior to expect, or what the output might be. For a tool that presumably performs some meaningful action (based on the name 'get-mcp-docs'), this description leaves the agent with almost no useful information.

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?

The schema description coverage is 100%, so the schema already documents the single parameter 'name' as 'The name of the MCP server'. The description adds no additional meaning about this parameter - it doesn't explain what format the name should take, what it's used for, or provide examples. With complete schema coverage, the baseline of 3 is appropriate since the description doesn't compensate but also doesn't detract.

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

Purpose2/5

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

The description 'Make an MCP server' is a tautology that essentially restates the tool name 'get-mcp-docs' in different words. It doesn't specify what action is performed (e.g., retrieve documentation, generate code, create configuration) or what resource is involved. The description fails to distinguish this tool from its sibling 'hello-world' or provide any meaningful clarification about its function.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives, what context it's appropriate for, or any prerequisites. There's no mention of when-not-to-use scenarios or comparison with the sibling tool 'hello-world'. The agent receives zero usage direction beyond the vague description.

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/CaptainCrouton89/mcp-reasoning'

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