Skip to main content
Glama
lazymac2x

lazymac-mcp

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsNoFree-form params object — passed as query string for GET, JSON body for POST
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'pre-flight' and 'before requests,' hinting at a read-only, non-destructive operation, but doesn't disclose behavioral traits like whether it makes external API calls, requires authentication, has rate limits, or what the output format is. For a tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Pre-flight token counting for GPT-4 / Claude / Gemini before requests.' It's front-loaded with the core purpose, uses no wasted words, and is appropriately sized for the tool's complexity. Every part earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a single but complex parameter (nested object), the description is incomplete. It doesn't explain what the tool returns (e.g., token counts, cost estimates), how to structure the 'params' object, or behavioral details. For a tool that likely interacts with external AI models, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 100% description coverage, documenting it as a 'Free-form params object' for query/body use. The description adds no parameter-specific semantics beyond this, as it doesn't explain what 'params' should contain (e.g., model type, text input). With high schema coverage, the baseline is 3, and the description doesn't compensate further.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Pre-flight token counting for GPT-4 / Claude / Gemini before requests.' It specifies the verb ('token counting'), resource (AI model tokens), and context ('before requests'). However, it doesn't explicitly differentiate from sibling tools like 'ai_cost_calculator' or 'llm_pricing', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance: it implies usage 'before requests' to AI models, suggesting a pre-check context. However, it offers no explicit when-to-use vs. when-not-to-use rules, no mention of alternatives among sibling tools (e.g., 'ai_cost_calculator'), and no prerequisites or constraints. This leaves the agent with vague direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/lazymac2x/lazymac-mcp'

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