Skip to main content
Glama
sayedpfe

MCP & Copilot Studio Learning Project

by sayedpfe

greeting

Generate personalized greetings by specifying a name and choosing from formal, casual, or enthusiastic styles for customized messages.

Instructions

Create personalized greetings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the person to greet
styleNoStyle of greeting

Implementation Reference

  • src/index.ts:27-55 (registration)
    Primary registration of the 'greeting' tool. Includes tool name, description, Zod input schema (name: string, style: optional enum), and complete handler logic that generates personalized greetings based on style (formal, casual, enthusiastic). Returns structured text content.
    server.tool(
      "greeting",
      "Create personalized greetings",
      {
        name: z.string().describe("Name of the person to greet"),
        style: z.enum(["formal", "casual", "enthusiastic"]).optional().describe("Style of greeting"),
      },
      async ({ name, style = "casual" }) => {
        let greeting;
        
        switch (style) {
          case "formal":
            greeting = `Good day, ${name}. I hope you're having a pleasant experience.`;
            break;
          case "enthusiastic":
            greeting = `HEY THERE ${name.toUpperCase()}! 🎉 You're AWESOME!`;
            break;
          default: // casual
            greeting = `Hey ${name}! Nice to meet you! 👋`;
        }
        
        return {
          content: [{
            type: "text",
            text: greeting
          }]
        };
      }
    );
  • Exercise completion version of the 'greeting' tool registration, identical implementation to the main src/index.ts version.
    server.tool(
      "greeting",
      "Create personalized greetings",
      {
        name: z.string().describe("Name of the person to greet"),
        style: z.enum(["formal", "casual", "enthusiastic"]).optional().describe("Style of greeting"),
      },
      async ({ name, style = "casual" }) => {
        let greeting;
        
        switch (style) {
          case "formal":
            greeting = `Good day, ${name}. I hope you're having a pleasant experience.`;
            break;
          case "enthusiastic":
            greeting = `HEY THERE ${name.toUpperCase()}! 🎉 You're AWESOME!`;
            break;
          default: // casual
            greeting = `Hey ${name}! Nice to meet you! 👋`;
        }
        
        return {
          content: [{
            type: "text",
            text: greeting
          }]
        };
      }
    );
Behavior2/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. 'Create personalized greetings' implies a generative action but doesn't specify whether this is a read-only operation, if it has side effects, authentication needs, rate limits, or output format. For a tool with no annotations, this is a significant gap in transparency.

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 with a single phrase 'Create personalized greetings' that front-loads the core purpose without any wasted words. It's appropriately sized for a simple tool, making every word earn its place.

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 tool's simplicity (2 parameters, no output schema, no annotations), the description is incomplete. It lacks context on behavioral traits, output expectations, or usage scenarios. While concise, it doesn't provide enough information for an agent to fully understand how and when to invoke the tool effectively.

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 description adds no parameter-specific information beyond what the schema provides. With 100% schema description coverage, the baseline is 3, as the schema already documents both parameters (name and style) with descriptions and enum values. The description doesn't compensate or add further meaning.

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 'Create personalized greetings' clearly states the tool's function with a specific verb ('Create') and resource ('personalized greetings'). It distinguishes the tool's purpose effectively, though without sibling tools, full differentiation isn't tested. It avoids tautology and isn't misleading.

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, prerequisites, or context for invocation. It states what the tool does but offers no usage instructions, leaving the agent to infer appropriate scenarios based solely on the tool name and parameters.

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/sayedpfe/MCP'

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