count_gemini_tokens
Calculate token count for Gemini AI prompts to estimate costs and ensure they fit within model context limits.
Instructions
Count the number of tokens in a text string for the configured Gemini model.
Use this tool to:
Estimate prompt costs before making queries
Ensure prompts fit within model context limits
Optimize prompt length for efficiency
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to count tokens for |