Skip to main content
Glama
webski101
by webski101

minimax_count_tokens

Count tokens in a conversation locally using cl100k_base encoding. Returns total, model, encoding, and per-message breakdown without network calls.

Instructions

Local token count for a conversation using the cl100k_base BPE encoding. Returns total, model, encoding, and a per-message breakdown. Does not make a network call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
messagesYes
Behavior3/5

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

The description discloses that the tool is local and non-destructive, but with no annotations, it must carry the full burden. It mentions using cl100k_base encoding but does not clarify how the 'model' parameter affects behavior or if it is ignored. No error handling or edge cases mentioned.

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?

Two sentences, each carrying important information (purpose, return values, locality). No redundant words, front-loaded with the core action. Efficiently sized.

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

Completeness3/5

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

The description covers the main purpose and return types but omits details about the 'model' parameter and does not specify constraints (e.g., maximum message size). For a tool with no output schema and two parameters, it lacks full completeness.

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

Parameters1/5

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

Schema description coverage is 0%, so the description must explain parameters. It fails to describe either 'model' or 'messages'. The role of 'model' is unclear given the fixed encoding, and the structure of 'messages' is not explained despite being required with nested properties.

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

Purpose5/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: local token count for a conversation using cl100k_base BPE encoding. It specifies the return values (total, model, encoding, per-message breakdown) and differentiates from sibling tools (minimax_chat, etc.) by focusing on counting rather than generating.

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

Usage Guidelines3/5

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

The description notes that this tool does not make a network call, implying it is fast and local. However, it does not explicitly state when to use this tool versus the siblings or provide scenarios where counting is preferred. Lacks guidance on prerequisites or limitations.

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/webski101/minimax-llm-mcp'

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