Skip to main content
Glama

optimize_prompt

Optimize prompts to reduce token consumption while retaining required bindings and literals, with adjustable quality and reasoning effort.

Instructions

Prepare token optimization while preserving binding requirements and literals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
qualityNoeconomy
reasoning_effortNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

C2.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does mention the tool preserves 'binding requirements and literals,' which is a useful constraint, but it fails to state whether the tool transforms the prompt in place, what side effects exist, whether it is a read-only operation, or what the output contains. The behavioral profile is largely opaque.

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

Conciseness4/5

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

The description is a single sentence with no filler words and is appropriately concise. However, the brevity is more due to under-specification than deliberate efficiency; the sentence is structured acceptably but sacrifices necessary detail.

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

Completeness1/5

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

For a 3-parameter tool with no schema descriptions and no annotations, this description is grossly insufficient. While an output schema exists, the agent still cannot determine when to use the tool, what it does precisely, how parameters work, or what behavior to expect. The description covers almost none of the required context for correct invocation.

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 the three parameters (prompt, quality, reasoning_effort). It does not mention any of them. There is no explanation of what 'quality' means, how 'reasoning_effort' affects behavior, or how they relate to token optimization. The description provides zero value for parameter understanding.

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 description states the resource is 'token optimization' and implies action on a prompt, but the verb 'prepare' is vague—it does not clearly say whether the tool modifies the prompt, returns an optimization plan, or configures settings. It mentions preservation constraints but does not distinguish the tool from sibling tools like compress_conversation or prepare_task.

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?

No guidance is given about when to use this tool versus alternatives. It does not state typical scenarios, prerequisites, or cases where another tool should be preferred. The absence of any usage context forces the agent to infer applicability from the name alone.

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