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 assistant integration.

Instructions

Make an MCP server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the MCP server

Implementation Reference

  • The handler function for the get-mcp-docs tool. It generates a markdown response containing TypeScript code for a basic MCP 'hello-world' server, using the provided 'name' parameter (though not actually used in the generated code), and returns it as structured content.
      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, defining a single string parameter 'name'.
    {
      name: z.string().describe("The name of the MCP server"),
    },
  • src/index.ts:33-98 (registration)
    Registration of the get-mcp-docs tool using server.tool method, providing name, description, input schema, and handler function.
    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 it fails completely. 'Make an MCP server' is vague and doesn't reveal whether this is a read or write operation, what permissions might be required, what side effects occur, or what the tool returns. The description provides no behavioral context beyond the ambiguous verb 'Make,' leaving critical operational characteristics undefined.

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 the description is brief ('Make an MCP server'), this brevity represents under-specification rather than effective conciseness. The single sentence fails to convey essential information, making it inefficient rather than well-structured. A truly concise description would front-load critical details, but this one omits them entirely, so it doesn't earn its place as helpful content.

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 the tool's complexity (implied by 'Make' suggesting a creation/mutation operation), lack of annotations, and absence of an output schema, the description is severely incomplete. It doesn't explain what 'making' entails, what the tool returns, or any behavioral aspects. For a tool that appears to perform a mutation with no structured safety hints, this description leaves the agent without enough information to use the tool correctly or understand its effects.

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 input schema has 100% description coverage, with the single parameter 'name' clearly documented as 'The name of the MCP server.' The description adds no additional meaning or context about this parameter beyond what the schema provides. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline score is 3 even with no parameter information in the description, which applies here.

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' rather than clearly explaining what the tool does. It doesn't specify what 'making' entails (e.g., generating documentation, creating server instances, or something else) or what resource it operates on. The description fails to distinguish this tool from its sibling 'hello-world' or provide meaningful context about its specific 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. It doesn't mention any context, prerequisites, or exclusions for usage. There's no indication of how this tool relates to its sibling 'hello-world' or when one should be chosen over the other. The lack of usage information leaves the agent with no basis for making informed decisions about tool selection.

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-reddit'

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