Skip to main content
Glama
yanlong-iao

Ultimate Prompt Optimizer

by yanlong-iao

Analyze prompt design

analyze_prompt

Review a prompt without running it: score clarity, completeness, executability, ambiguity and robustness, then get issues, improvements and exact patch plans.

Instructions

Design review of a prompt WITHOUT running it: 0-100 scores on goal clarity, instruction completeness, structural executability, ambiguity control and robustness, plus strengths, issues, improvements and an exact patch plan (oldText → newText). Optionally apply the patches locally (no extra call) and/or rewrite the prompt from the analysis (+1 call). Also reports LangGPT structure and static lint. Cost: 1 API call (cached if unchanged).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
focusNoA specific concern to prioritize, e.g. 'the model keeps giving long derivations'
promptYes
rewriteNoAlso produce a full revised prompt from the analysis (+1 API call)
applyPatchesNoApply exact, unique patches and return the patched prompt

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the exact return content, the API-call cost model, that results are cached when unchanged, that applyPatches is local with no extra call, and that rewrite costs +1 call. Missing only edge cases such as failure behavior or patch-applicability limits.

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?

One dense paragraph, front-loaded with the core purpose and scope, then the outputs, then the optional modes and cost. Every clause conveys distinct information with no filler.

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?

For a four-parameter analysis tool with no output schema, the description enumerates the returned artifacts and the call-cost implications well enough to invoke correctly. It could say more about how focus interacts with scoring or what happens when patches can't be uniquely applied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75% and the description adds genuine meaning beyond it, notably the cost implication of rewrite (+1 API call) and the local, no-extra-call nature of applyPatches, plus the patch format (oldText → newText). It gives less detail on the focus parameter than the schema already does.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Design review of a prompt WITHOUT running it') and immediately enumerates what is produced: 0-100 scores across five named dimensions, strengths, issues, improvements, and a patch plan. The 'WITHOUT running it' scope cleanly separates it from siblings like evaluate_prompt_preview or optimize_prompt_via_api.

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?

The description makes clear when this tool applies (static design review rather than execution) and describes the optional follow-on modes: applying patches locally or rewriting the prompt. It doesn't explicitly name a competing sibling and the condition that would select it, so it stops 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.