Skip to main content
Glama
gogouravr

FastMCP Demo

by gogouravr

hello

Generate personalized greetings by providing a name to create custom hello messages for user interactions.

Instructions

A simple greeting tool that says hello

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name to greet

Implementation Reference

  • The specific handler logic for the 'hello' tool within the CallToolRequestSchema request handler. It greets the user by name or defaults to 'World'.
    if (name === "hello") {
      const userName = (args?.name as string) || "World";
      return {
        content: [
          {
            type: "text",
            text: `Hello, ${userName}! Welcome to MCP!`,
          },
        ],
      };
    }
  • The tool metadata and input schema definition for 'hello' returned in ListTools response.
    {
      name: "hello",
      description: "A simple greeting tool that says hello",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "The name to greet",
          },
        },
        required: ["name"],
      },
    },
    {
  • The registration of the ListToolsRequestSchema handler, which advertises the available tools including 'hello'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "hello",
            description: "A simple greeting tool that says hello",
            inputSchema: {
              type: "object",
              properties: {
                name: {
                  type: "string",
                  description: "The name to greet",
                },
              },
              required: ["name"],
            },
          },
          {
            name: "calculate",
            description: "Perform basic arithmetic calculations",
            inputSchema: {
              type: "object",
              properties: {
                operation: {
                  type: "string",
                  enum: ["add", "subtract", "multiply", "divide"],
                  description: "The arithmetic operation to perform",
                },
                a: {
                  type: "number",
                  description: "First number",
                },
                b: {
                  type: "number",
                  description: "Second number",
                },
              },
              required: ["operation", "a", "b"],
            },
          },
        ],
      };
    });
    
    // Handle tool execution
  • The execute handler for the 'hello' tool in the FastMCP example, returning a simple greeting string.
    execute: async (args) => {
      return `Hello, ${args.name}! Welcome to MCP!`;
    },
  • The complete registration of the 'hello' tool using FastMCP's addTool API, including schema (via Zod), description, and inline handler.
    server.addTool({
      name: "hello",
      description: "A simple greeting tool that says hello",
      parameters: z.object({
        name: z.string().describe("The name to greet"),
      }),
      execute: async (args) => {
        return `Hello, ${args.name}! Welcome to MCP!`;
      },
    });
Behavior2/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. It states the tool 'says hello', which implies a read-only output operation, but doesn't disclose any behavioral traits like whether it has side effects, requires authentication, has rate limits, or what format the greeting takes. The description is too minimal to provide meaningful behavioral context.

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 extremely concise at just 7 words in a single sentence. It's front-loaded with the core purpose and contains zero wasted words. Every element of the description earns its place by communicating the essential function of the tool.

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 that there are no annotations and no output schema, the description is incomplete for helping an agent understand how to properly use this tool. While the tool is simple (one parameter), the description doesn't explain what the tool returns, how the greeting is formatted, or any behavioral characteristics. For a tool with zero annotation coverage, this minimal description leaves significant 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 input schema has 100% description coverage, with the 'name' parameter clearly documented as 'The name to greet'. The description doesn't add any parameter semantics beyond what the schema already provides. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 purpose as 'A simple greeting tool that says hello', which specifies the verb ('says hello') and resource (greeting). It distinguishes from the sibling 'calculate' tool by focusing on greetings rather than calculations. However, it doesn't explicitly differentiate from potential other greeting tools beyond the sibling context.

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. It doesn't mention any specific contexts, prerequisites, or exclusions. The only implied usage is for greeting purposes, but this is too vague to help an agent make 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/gogouravr/fast-mcp'

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