Skip to main content
Glama

BRAINIAC Agent Tool Schema Intelligence

Estimate tool schema token cost

agent-tool-schema_tool-schema-token-cost
Read-onlyIdempotent

Estimate tokens for caller-supplied tool names, descriptions, and schemas at four characters per token. The figure is an estimate, not a provider tokenizer count. Price $0.03 USDC. POST /api/v1/agent-tool-schema/tool-schema-token-cost. An unpaid call returns the x402 payment terms and does not run.

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": "agent-tool-schema_tool-schema-token-cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
toolsNotools, array. Optional.
openapiNoopenapi, object. Optional.
schemasNoschemas, array. Optional.

Output Schema

NameRequiredDescriptionDefault
issuesNoissues. Array.
successNosuccess. Boolean.
analysisNoanalysis. String.
warningsNowarnings. Array.
limitationsNolimitations. Array.
recommendationsNorecommendations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations only cover safety (readOnly, idempotent, non-destructive); the description adds the material behavior: a fixed 4-characters-per-token heuristic that is explicitly not a provider tokenizer count, a $0.03 USDC price, the POST path, and the fact that an unpaid call returns x402 payment terms and does not execute. That last point is exactly the kind of side effect an agent must know before calling.

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?

Four short sentences, front-loaded with what is measured and the method, followed by the estimate caveat, price, and payment behavior. Every sentence contributes information an agent needs.

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

Completeness4/5

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

With an output schema present, return values need no explanation, and the payment and estimation caveats are covered. The remaining gap is input-shape guidance across the three optional top-level parameters for what is otherwise a small, nested schema.

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?

Schema description coverage is 100%, so the baseline is 3. The description says the estimate covers names, descriptions, and schemas but does not clarify the relationship among the three top-level inputs (tools, schemas, openapi) or whether they are additive or mutually exclusive.

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?

States a specific verb and resource: estimate tokens for caller-supplied tool names, descriptions, and schemas. The scope is unmistakably different from siblings like ambiguity-detect or lint, though the description never explicitly contrasts itself with them, so it stops short of a 5.

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?

Usage is only implied: an agent infers it should call this when it wants a token-cost figure for a tool schema. There is no when-to-use framing, no mention of when this estimate is inappropriate versus a real provider tokenizer, and no routing to or from sibling tools.

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