find_nth_substring
Locate the starting position of the nth occurrence of a substring within text. Returns -1 if the substring does not appear the specified number of times.
Instructions
Find starting index of nth occurrence of a substring. Returns -1 if not found.
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>",
"substring": "<substring>"
},
"name": "find_nth_substring"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| substring | Yes | ||
| n | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |