Character At Index
char_atRetrieves the character at a given position in a string, using 0-based indexing with support for negative indices to count from the end.
Instructions
Get the character at a specific index (0-based). Supports negative indices.
Args:
text (string): The text to index into
index (number): Position (0-based, negative counts from end)
Returns: The character at that position, or error if out of bounds.
Example: char_at("hello", 1) → 'e'; char_at("hello", -1) → 'o'
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>",
"index": "<index>"
},
"name": "char_at"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to index into | |
| index | Yes | Position (0-based, negative from end) |