Skip to main content
Glama
IntelagentStudios

Intelagent MCP Template

reverse_string

Reverse text strings to obtain reversed output, original text, and character count for data manipulation and analysis tasks.

Instructions

Reverse a string. Returns the original text, reversed text, and character count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to reverse

Implementation Reference

  • The business logic that performs the string reversal.
    reverseString(input: ReverseStringInput): ReverseStringResult {
      return {
        original: input.text,
        reversed: input.text.split('').reverse().join(''),
        length: input.text.length,
      };
    }
  • Registration and MCP tool handler for 'reverse_string' which calls the service.
    {
      name: 'reverse_string',
      description: 'Reverse a string. Returns the original text, reversed text, and character count.',
      inputSchema: {
        type: 'object',
        properties: {
          text: { type: 'string', description: 'The text to reverse' },
        },
        required: ['text'],
      },
      handler: async (args) => {
        return service.reverseString({ text: args.text as string });
      },
    },
  • Type definitions for the 'reverse_string' tool input and output.
    /** Input for the reverse_string tool. */
    export interface ReverseStringInput {
      text: string;
    }
    
    /** Result from the reverse_string tool. */
    export interface ReverseStringResult {
      original: string;
      reversed: string;
      length: number;
    }
Behavior3/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 compensates for the missing output schema by documenting the return structure (original text, reversed text, character count), but omits other behavioral traits like idempotency, safety guarantees, or error conditions.

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?

Two sentences with zero waste: the first defines the action, the second discloses return values. Information is front-loaded and appropriate for the tool's simplicity. Every sentence earns its place.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter utility without annotations or output schema, the description is complete. It adequately compensates for the missing output schema by detailing the three return fields, providing sufficient context for an agent to invoke the tool correctly.

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 ('The text to reverse'), establishing a baseline of 3. The description adds no additional parameter context (examples, format constraints, validation rules) beyond what the schema already provides.

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 states a specific verb ('Reverse') and resource ('string'), clearly distinguishing it from sibling tools: server_info (metadata) and word_count (counting). The first sentence precisely defines the tool's function.

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

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through the specific purpose statement ('Reverse a string'), but provides no explicit when-to-use guidance, prerequisites, or comparison to alternatives like word_count. The agent must infer appropriateness from the function name.

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/IntelagentStudios/intelagent-mcp-template'

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