Skip to main content
Glama

prompt optimize

prompt_optimize
Read-only

Improve a prompt: a prompt engineer rewrites it with a clear role, task, context, constraints and exact output format, lists what it changed, the ambiguities it found and the variables to fill. Up to about 4,000 tokens in. Costs $0.01 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalNo
modelNo
promptYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries the interesting burden and does it well: it discloses the ~4,000-token input ceiling and a concrete price of $0.01 USDC per call via x402, which is critical for an agent deciding whether to spend. It stops short of saying whether the original prompt is unmodified or what happens on over-limit input.

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?

One dense, front-loaded sentence covers what the tool does and what it returns, followed by a short second sentence for the size and cost limits. No filler, though the first sentence packs several clauses and could be split for faster scanning.

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 no output schema available, the description steps in and enumerates the return content (rewritten prompt, changes, ambiguities, variables), and it adds the input limit and price an agent needs before committing. The remaining hole is parameter meaning, which is a schema/description gap rather than a missing behavioral fact.

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%, so the description must compensate and it largely does not: 'goal' and 'model' are never explained (model presumably selects the target LLM, but that is inference). Only the 'prompt' parameter is addressed indirectly through the token limit. Two of three parameters remain semantically undefined in both schema and description.

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/rewrite) and resource (prompt), and enumerates exactly what the rewrite contains: role, task, context, constraints, output format, plus change list, ambiguities and variables. An agent can tell it apart from generic text_rewrite or second_opinion by the prompt-engineering framing, though it never names those siblings explicitly.

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 implied rather than stated: you call it when you have a prompt to improve. There is no explicit when-not guidance and no mention of competing siblings such as text_rewrite or second_opinion, which an agent would plausibly confuse this with.

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