Skip to main content
Glama

get_token_optimization

Generates deterministic token optimization suggestions from an agent's real usage events, so you can cut token spend based on observed activity.

Instructions

Deterministic token optimization suggestions from real usage events.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "agent": "<agent>"
    },
    "name": "get_token_optimization"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
agentYes
from_No
granularityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
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, and it discloses almost nothing: 'deterministic' hints at reproducible output, but there is no information on whether the call is read-only, whether it requires cost accounting or preconditions on 'agent', what window it evaluates, or what the response looks like. With no output schema, the return shape is entirely undocumented.

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

Conciseness3/5

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

A single nine-word sentence with no filler, so nothing is wasted, but it is under-specified rather than concise. The distinguishing trait 'deterministic' is front-loaded, which is the right choice.

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?

For a four-parameter tool with a required 'agent' argument, no annotations and no output schema, a single sentence leaves too much unknown: no return format, no time-window behavior, no indication of whether results are per-agent or cross-agent. It is not misleading, just insufficient.

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 coverage is 0% and the description explains none of the four parameters. It does not mention that 'agent' is required, or what from_/to/granularity control (time window and aggregation level). The phrase 'real usage events' faintly implies event-based scoping but adds no usable semantics.

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 names a specific output (token optimization suggestions) and a specific source (real usage events), plus a distinguishing trait ('deterministic'). An agent can tell it produces recommendations rather than raw data, distinguishing it from get_token_usage, though the contrast is implied rather than stated.

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 prerequisites, and no mention of alternatives such as get_token_usage or get_baseline. The agent must infer that this is the recommendation-oriented counterpart to the raw usage tools.

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