explain_token_cost
Estimate context token cost for tool schemas or text snippets, split by CJK and ASCII, to sanity-check schemas before publishing or compare descriptions.
Instructions
Estimate the context cost of an arbitrary tool schema or text snippet, split by CJK versus ASCII. Use to sanity-check a schema before publishing a server, or to compare two descriptions.
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": "explain_token_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | Treat text as a JSON tool schema. | |
| text | Yes | Raw text or JSON to measure. |