Skip to main content
Glama

optimize_prompt

Read-only

Refine vague or ambiguous task requests into clearer, context-aware execution guidance while preserving original intent, adding bounded guidance for the target agent.

Instructions

Improve a vague or substantial task before execution. Preserves the request and adds bounded guidance. Skip trivial or exact-wording requests. Local by default; non-local mode may send redacted data to a configured provider.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNolocal
promptYes
contextNo
explainNo
profileNobalanced
audienceNoauto
maxTokensNo
targetAgentNoauto
disabledPassesNo
previousOptimizationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
irYes
changesYes
contextYes
metadataYes
confidenceYes
assumptionsYes
diagnosticsYes
skippedPassesYes
tokenEstimateYes
detectedIntentYes
selectedPassesYes
optimizedPromptYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so safety is covered. The description adds genuinely new behavioral context: the request is preserved, guidance is bounded, and non-local mode may send redacted data to a configured provider — an important privacy disclosure.

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?

Three tight sentences, front-loaded with the primary action, then the preservation guarantee, then the skip condition and the privacy caveat. No filler.

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?

An output schema exists so return values need not be explained, but a 10-parameter tool with nested objects and four enums needs far more than this description provides. Key controls (profile, audience, targetAgent, previousOptimization for re-optimization) are unaddressed, leaving an agent unable to use the tool's main levers 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% across 10 parameters, including nested context objects and enums like profile, audience, and targetAgent. The description only gestures at 'local vs non-local mode' and 'bounded guidance', leaving the semantics of mode, profile, audience, targetAgent, disabledPasses, and previousOptimization entirely undocumented. It does not compensate for the coverage gap.

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 (improve) and resource (a vague or substantial task/prompt) before execution, which is distinguishable from siblings like evaluate_prompt and inspect_prompt. It stops short of explicitly naming which sibling to use when the request is already clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when-not rule ('Skip trivial or exact-wording requests') and a default posture ('Local by default'), which is more than most definitions provide. It does not name alternative siblings (e.g., evaluate_prompt, adapt_prompt) for adjacent cases, so it falls short of a 5.

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