terse_tokens
Count tokens of Terse source code using tiktoken cl100k_base; fall back to a ceil(len/4) estimate if tiktoken is unavailable.
Instructions
Count tokens of Terse source with tiktoken cl100k_base; falls back to a ceil(len/4) character estimate when tiktoken is unavailable.
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": {
"source": "<source>"
},
"name": "terse_tokens"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Terse source code to measure. |