Skip to main content
Glama
CaptainCrouton89

MCP Server Boilerplate

hello-world

Greet users by name to demonstrate basic MCP server tool functionality for AI assistant integration.

Instructions

Say hello to the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the user

Implementation Reference

  • The async handler function that implements the 'hello-world' tool logic, greeting the user by name.
    async ({ name }) => {
      const response = `Hello ${name}`;
    
      return {
        content: [
          {
            type: "text",
            text: response,
          },
        ],
      };
    }
  • Zod schema defining the input parameter 'name' for the hello-world tool.
    {
      name: z.string().describe("The name of the user"),
    },
  • src/index.ts:13-31 (registration)
    Registration of the 'hello-world' tool using server.tool(), including name, description, schema, and handler.
    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,
            },
          ],
        };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Say hello' implies a read-only, non-destructive operation, but the description doesn't explicitly confirm this or provide any additional behavioral context like response format, error conditions, or side effects. It's minimally adequate but lacks important details.

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 perfectly concise at just four words, front-loading the core functionality with zero wasted words. Every element earns its place, making it immediately understandable without unnecessary elaboration. This is an excellent example of efficient communication.

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

Completeness3/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, the description provides the basic purpose but lacks important context. Without annotations or output schema, the description should ideally mention what the tool returns (e.g., a greeting message) and any behavioral constraints. It's minimally viable but has clear gaps.

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%, with the single parameter 'name' clearly documented as 'The name of the user'. The description doesn't add any parameter information beyond what's in the schema, which is acceptable given the high schema coverage. The baseline score of 3 reflects adequate but not enhanced parameter documentation.

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

Purpose4/5

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

The description clearly states the tool's action ('Say hello') and target ('to the user'), making the purpose immediately understandable. It doesn't differentiate from the sibling tool 'get-mcp-docs', but that's reasonable since they serve completely different functions. The description avoids tautology by not just repeating the tool name.

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

Usage Guidelines2/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 or in what context it should be invoked. It simply states what the tool does without any usage context, prerequisites, or comparison to the sibling tool. This leaves the agent with minimal guidance for 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