Skip to main content
Glama
luquitared

MCP Server Boilerplate

by luquitared

get-mcp-docs

Generate documentation for MCP servers to integrate custom tools with 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 for the 'get-mcp-docs' tool. It generates a markdown-formatted TypeScript code template for a basic MCP server (similar to this file itself) and returns it as text content. The 'name' parameter is unused in the logic.
      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' using Zod.
    {
      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(), specifying the tool 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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. However, it only states 'Make an MCP server' without explaining what this entails—whether it's a read operation, a creation process, what permissions are needed, or what the output might be. This leaves critical behavioral traits unspecified.

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

Conciseness3/5

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

The description is a single phrase, 'Make an MCP server', which is concise but under-specified. While it avoids unnecessary words, it lacks the structure and detail needed to be truly helpful, making it more of a placeholder than an informative description.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool with one parameter. It fails to explain what 'Make an MCP server' does in practice, what the result is, or how it differs from the sibling tool, leaving significant gaps in understanding the tool's functionality and context.

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' documented as 'The name of the MCP server'. The description adds no additional meaning beyond this, so it meets the baseline score of 3 where the schema does the heavy lifting without extra value from the description.

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, generate, or create documentation) or what resource is involved. The purpose remains vague rather than clearly articulated.

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?

No guidance is provided on when to use this tool versus the sibling tool 'hello-world' or any alternatives. The description offers no context about appropriate use cases, prerequisites, or distinctions from other tools, leaving the agent with no usage direction.

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/luquitared/mcp-animator'

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