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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "reverse_string"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to reverse |
Implementation Reference
- src/services/text-service.ts:10-16 (handler)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, }; }