Skip to main content
Glama
dh1789

My First MCP

by dh1789

reverse_string

Reverse the order of characters in any input string to create a mirrored version for text manipulation or data processing tasks.

Instructions

입력된 문자열을 뒤집어서 반환합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes뒤집을 문자열

Implementation Reference

  • Core handler function that reverses the input string using split-reverse-join and returns both original and reversed strings.
    export function reverseString(text: string): ReverseResult {
      const reversed = text.split("").reverse().join("");
      return {
        original: text,
        reversed,
      };
    }
  • TypeScript interface defining the output schema for the reverse_string tool.
    export interface ReverseResult {
      original: string;
      reversed: string;
    }
  • src/index.ts:218-236 (registration)
    Registers the 'reverse_string' tool with the MCP server, including input schema validation using Zod and handler invocation.
    server.tool(
      "reverse_string",
      "입력된 문자열을 뒤집어서 반환합니다.",
      {
        text: z.string().min(1).describe("뒤집을 문자열"),
      },
      async ({ text }) => {
        const result = reverseString(text);
    
        return {
          content: [
            {
              type: "text",
              text: `원본: ${result.original}\n뒤집음: ${result.reversed}`,
            },
          ],
        };
      }
    );
  • Zod schema for input validation: requires a non-empty string 'text'.
      text: z.string().min(1).describe("뒤집을 문자열"),
    },
  • src/tools.ts:170-170 (registration)
    Lists 'reverse_string' in the server info tools array.
    "reverse_string - 문자열 뒤집기",
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 what the tool does (reverses strings) but doesn't mention any behavioral traits like error handling for empty strings (though minLength=1 prevents this), performance characteristics, encoding considerations, or what happens with special characters. The description is minimal and lacks operational 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 a single, efficient sentence that directly states the tool's function. It's front-loaded with the core action and contains zero wasted words. Every element of the description earns its place by communicating the essential purpose without unnecessary elaboration.

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 string transformation tool with one well-documented parameter and no output schema, the description is adequate but minimal. It covers the basic purpose but lacks context about the return value format (though implied), error conditions, or performance considerations. Given the tool's simplicity, the description meets minimum viability but doesn't provide rich contextual information.

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 parameter 'text' clearly documented as '뒤집을 문자열' (string to reverse). The description doesn't add any parameter semantics beyond what the schema already provides, but since the schema coverage is complete, the baseline score of 3 is appropriate. No additional parameter context is needed or provided.

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

Purpose5/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 ('뒤집어서' - reverse) and resource ('문자열' - string), and it distinguishes from all sibling tools which perform different operations like analysis, calculation, counting, or information retrieval. The description precisely communicates the transformation being performed.

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. While the purpose is clear, there's no mention of use cases, prerequisites, or comparison with sibling tools that might handle text manipulation differently. The agent must infer usage from the tool name and description alone.

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/dh1789/my-first-mcp'

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