Skip to main content
Glama

agentkit__tokens

Deterministic mid-task tools for AI agents: exact LLM token counting (cl100k), fit a chat message array into a context budget with a trim plan, page to markdown, repair JSON, redact secrets, encode/hash, unit and timezone maths, deadlines and cron. Price: $0.01 per call in USDC on Base (eip155:8453), paid with x402 in params._meta["x402/payment"]. HTTP: POST https://api.firstmention.uk/s/agentkit/tokens

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": "agentkit__tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNo
budgetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.2/5.0
Behavior3/5

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

With no annotations, the description carries the full load, and it does add genuinely useful operational facts: deterministic behaviour, cl100k encoding, the x402 payment flow with price and network, and the HTTP transport. It does not say what the call returns, whether payment failure aborts the request, or whether the call is read-only, so a mutation-averse agent has to guess.

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

Conciseness2/5

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

The opening sentence is a comma-spliced feature dump that buries the actual subject, and roughly half the listed capabilities appear irrelevant to a two-parameter token tool. Pricing and endpoint are useful and reasonably placed at the end, but the whole needs a single front-loaded statement of what this endpoint does with text and budget.

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?

No output schema, no annotations, and zero schema coverage on two parameters means the description is the only source of truth, and it does not cover return shape, parameter requirements, error behaviour, or the actual scope of the tool. The payment and transport details are helpful but do not fill the gaps an agent needs to call this correctly.

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

Parameters2/5

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

Schema description coverage is 0% and both parameters are undocumented there, so the description must compensate. It only obliquely hints that text is the counted input and budget is a context limit; it never states the expected format of text (string, chat message array, or page) or the units of budget, and both parameters are optional, which is unexplained.

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

Purpose2/5

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

The name and schema (text, budget) point to token counting / context fitting, but the description is a catalogue of a dozen unrelated capabilities (page-to-markdown, JSON repair, secret redaction, hashing, timezone maths, cron). It never states which of these this two-parameter endpoint actually does, and several listed capabilities collide with siblings such as agentkit__fit, agentkit__redact, agentkit__repair and agentkit__encode.

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?

There is no when-to-use guidance, no exclusion of alternatives, and no mention of when the budget parameter should be supplied versus omitted. The presence of dedicated sibling tools for the same listed capabilities makes the missing routing guidance a real problem, not a cosmetic one.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources