Skip to main content
Glama

agentkit__fit

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/fit

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__fit"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNo
budgetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose genuinely useful behavior beyond the schema: a per-call price of $0.01 USDC on Base (eip155:8453), paid via x402 in params._meta['x402/payment'], and the HTTP endpoint. That is real payment/authorization context. It does not disclose what the 'trim plan' contains, how truncation is chosen, what happens if text already fits, or whether the call is read-only and side-effect free.

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 definition is a single run-on catalog sentence followed by pricing and HTTP boilerplate. Only one of the nine listed capabilities applies to this tool, so most of the text is not just non-earning but actively misleading; the relevant clause is not front-loaded.

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?

With a simple two-parameter schema and no output schema, the description need not explain return values, and it does supply payment and transport details an agent needs to invoke the tool successfully. But with zero annotation and zero schema description coverage, the gap on what 'fit' actually returns and how the trim plan is shaped is left entirely for the agent to infer.

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% for both parameters, so the description must compensate and does not. It implies 'text' is a 'chat message array', yet the schema declares it as a plain string with no structure or format guidance, and it gives no detail on whether 'budget' is tokens, characters, or currency. The phrase 'cl100k' appears only in the token-counting clause, leaving ambiguous which tokenizer applies to the budget.

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

Purpose3/5

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

The only clause relevant to this tool is 'fit a chat message array into a context budget with a trim plan', which is a specific verb+resource. However, that clause is buried in a catalog of eight other capabilities ('exact LLM token counting', 'page to markdown', 'repair JSON', 'redact secrets', 'encode/hash', 'unit and timezone maths', 'deadlines and cron') that each correspond to sibling tools (agentkit__tokens, agentkit__fetchmd, agentkit__repair, agentkit__redact, agentkit__encode, agentkit__datetime, agentkit__deadlines). The description therefore does not distinguish this tool from its siblings; it describes all of them.

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 statement of when to use this tool versus agentkit__tokens or agentkit__chain, no preconditions, and no exclusions. The only guidance is operational (price and endpoint), not selection guidance.

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