Skip to main content
Glama
soriat

MCP Elicitations Demo Server

by soriat

echo

Facilitates dynamic user input collection by echoing back submitted messages, demonstrating the MCP elicitation system's functionality.

Instructions

Echoes back the input!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesMessage to echo

Implementation Reference

  • The handler function for the echo tool. Parses input args with EchoSchema and returns a text content response echoing the message.
    handler: async (args: any) => {
      const validatedArgs = EchoSchema.parse(args);
      return {
        content: [{ type: "text" as const, text: `Echo: ${validatedArgs.message}` }],
      };
    },
  • Zod schema defining the input for the echo tool: a required string message.
    const EchoSchema = z.object({
      message: z.string().describe("Message to echo"),
    });
  • echoTool is registered by inclusion in the allTools array, which populates tool lists and handlers for the MCP server.
    const allTools = [
      echoTool,
      addTool,
      longRunningOperationTool,
      printEnvTool,
      sampleLlmTool,
      sampleWithPreferencesTool,
      sampleMultimodalTool,
      sampleConversationTool,
      sampleAdvancedTool,
      getTinyImageTool,
      annotatedMessageTool,
      getResourceReferenceTool,
      elicitationTool,
      getResourceLinksTool,
    ];
  • Registers the MCP server request handlers for listing tools (ListToolsRequestSchema) and calling tools (CallToolRequestSchema), delegating to getToolHandler for execution.
    export const setupTools = (server: Server) => {
      // Handle listing all available tools
      server.setRequestHandler(ListToolsRequestSchema, async () => {
        return { tools: getTools() };
      });
    
      // Handle tool execution
      server.setRequestHandler(CallToolRequestSchema, async (request) => {
        const { name, arguments: args } = request.params;
        const handler = getToolHandler(name);
    
        if (handler) {
          return await handler(args, request, server);
        }
    
        throw new Error(`Unknown tool: ${name}`);
      });
    };
  • Helper function that retrieves the handler for a tool by its name from the allTools array.
    export const getToolHandler = (name: string) => {
      const tool = allTools.find((t) => t.name === name);
      return tool?.handler;
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Echoes back' implies a simple read operation, but it doesn't address potential side effects, error conditions, or output format. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 just three words, front-loading the core functionality ('Echoes back') without any wasted text. Every word earns its place in communicating the essential purpose.

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 is minimally adequate but incomplete. It doesn't explain what 'echoing back' entails (e.g., format, transformations) or address the lack of annotations, leaving the agent with unanswered questions about behavior.

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 mentions 'the input' which aligns with the single 'message' parameter, but adds no semantic meaning beyond what the schema already provides (schema description coverage is 100%). This meets the baseline for high schema coverage without enhancing parameter understanding.

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 with a specific verb ('Echoes back') and resource ('the input'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'sampleLLM' or 'printEnv' which might also involve returning input, so it doesn't reach the highest score.

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. With siblings like 'sampleLLM' or 'printEnv' that might serve similar testing/debugging purposes, the agent receives no explicit or implied context about appropriate usage scenarios or exclusions.

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

Related 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/soriat/soria-mcp'

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