ai_token_counter
Count tokens for AI models like GPT-4, Claude, and Gemini before sending requests to manage usage and costs effectively.
Instructions
Pre-flight token counting for GPT-4 / Claude / Gemini before requests
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ai_token_counter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | Free-form params object — passed as query string for GET, JSON body for POST |