Skip to main content
Glama
Raydius

Gemini MCP Server for Claude Code

by Raydius

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
NameRequiredDescriptionDefault
textYesThe text to count tokens for

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Raydius/gemini-for-claude-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server