Clarifyprompt-MCP
ClarifyPrompt MCP transforms vague prompts into platform-optimized versions for 58+ AI platforms across 7 categories.
Prompt Optimization
Convert raw prompts into platform-specific versions with correct syntax, parameters, and structure for platforms like Midjourney, DALL-E, Sora, ElevenLabs, Claude, ChatGPT, Cursor, and 50+ more
Auto-detect category and platform from prompt content when not specified
Choose from 7 output modes:
concise,detailed,structured,step-by-step,bullet-points,technical,simpleOptionally enrich context via web search (Tavily, Brave, Serper, SerpAPI, Exa, SearXNG)
Discovery Tools
List all 7 categories (image, video, chat, code, document, voice, music) with platform counts
List all platforms per category, including custom ones
List all output modes with descriptions
Custom Platform Management
Register new platforms with custom optimization instructions (inline or from
.mdfiles)Update custom platforms or add/override instructions and syntax hints on built-in platforms
Unregister custom platforms or clear instruction overrides from built-in platforms
Supported Platforms (58+)
๐ผ๏ธ Image (10): Midjourney, DALL-E 3, Stable Diffusion, Flux, Ideogram, Leonardo AI, Adobe Firefly, and more
๐ฌ Video (11): Sora, Runway Gen-3, Pika Labs, Kling AI, Luma, HeyGen, and more
๐ฌ Chat (9): Claude, ChatGPT, Gemini, Llama, DeepSeek, and more
๐ป Code (9): Claude, ChatGPT, Cursor, GitHub Copilot, Windsurf, and more
๐ Document (8): Claude, ChatGPT, Jasper, Notion AI, Writesonic, and more
๐ Voice (7): ElevenLabs, OpenAI TTS, Fish Audio, PlayHT, and more
๐ต Music (4): Suno AI, Udio, Stable Audio, MusicGen
Works with any OpenAI-compatible API, Anthropic API, or local models via Ollama, and integrates with Claude Desktop, Claude Code, and Cursor.
Uses Brave Search to provide web-based context enrichment for more accurate prompt optimization.
Generates platform-specific prompts for ElevenLabs voice AI, including appropriate parameters for audio generation.
Optimizes coding prompts to improve the quality of suggestions and code generation within GitHub Copilot.
Optimizes prompts for Google Gemini and utilizes the Gemini API for LLM-based prompt processing.
Refines prompts for Grammarly to improve the quality of AI-assisted writing and document editing.
Optimizes prompts for Notion AI to enhance content creation and document management within the Notion platform.
Supports local Ollama instances as an LLM provider for processing prompt optimizations using self-hosted models.
Optimizes prompts for OpenAI platforms like ChatGPT and DALL-E, and supports using the OpenAI API for processing.
Integrates with Perplexity as an LLM provider to power prompt optimization workflows.
Utilizes self-hosted SearXNG instances for context enrichment via web search during prompt optimization.
Transforms vague musical ideas into structured prompts optimized for Suno AI, including genre and tempo specifications.
ClarifyPrompt MCP
A context-aware MCP prompt compiler that transforms vague prompts into platform-optimized prompts for 60+ AI platforms across 7 categories โ grounded in your workspace signals (CLAUDE.md, AGENTS.md, .cursorrules, package.json), resolved intent, and the capabilities of the target model.
Send a raw prompt. ClarifyPrompt gathers the right context, resolves what you're actually trying to do, and returns a version specifically optimized for Midjourney, DALL-E, Sora, Runway, Higgsfield, ElevenLabs, Claude, ChatGPT, Cursor, or any of the 60+ supported platforms โ with the right syntax, parameters, structure, and grounding.
New in 1.15.0: Nano Banana (Google Gemini 2.5 Flash Image) is now a built-in image platform โ
optimize_prompt(platform: "nano-banana")compiles image prompts in its native style (natural-language scene direction, photographic terms, edit-preserving-identity phrasing, in-image text). Plus latest-model compatibility across every provider:claude-sonnet-5,gpt-5/o-series, and Gemini rejecttemperatureand/ormax_tokens; the client now sends the right parameters (proactively for known reasoning ids, and learns the rest from a400). Verified live against Anthropic, OpenAI, Gemini, and Ollama Cloud. See CHANGELOG.md.New in 1.14.1: Portable-by-default text output โ a
chat/document/codeprompt with no explicit platform now stays platform-neutral instead of quietly defaulting to Claude's idioms (XML tags); name a platform to opt into vendor-specific tuning. Plus the MCP Apps compose panel now shows afor <platform>badge and a clean Your prompt โ Optimized before/after (with ashow changestoggle) instead of an always-on diff. See CHANGELOG.md.New in 1.14.0: An interactive compose panel via MCP Apps. In hosts that speak the
io.modelcontextprotocol/uiextension (Claude Desktop, ChatGPT, Cursor, VS Code, โฆ),compose_promptrenders a live panel: original-vs-optimized view, all six critique scores, the pipeline stages, and Accept / Revise actions โ Accept records the outcome into ClarifyPrompt's memory loop, Revise sends your feedback back into the chat. One self-containedui://resource; hosts without the extension see zero change. See CHANGELOG.md.New in 1.13.0: Plain-language rewrites. Optimized prompts now stick to common, everyday words instead of drifting into formal vocabulary ("use", never "utilize") โ specificity comes from concrete details, not fancier synonyms.
critique_promptgained a 6th default dimension,plain_language, soauto_reviseloops correct register drift automatically. Also fixed: an explicitmode(e.g.simple) is no longer silently dropped for small local models under compact system-prompt shaping. See CHANGELOG.md.
How It Works
ClarifyPrompt does two things a plain prompt template can't. Every output below is a real, unedited capture from optimize_prompt run against this repo (see Provenance at the end of this section).
1 โ It knows each platform. Same raw prompt, different target, completely different output:
You write: "a dragon flying over a castle at sunset"
โ Midjourney A colossal, majestic dragon with shimmering scales soaring over a towering
medieval stone castle, dramatic sunset sky with vibrant orange and deep purple
hues, cinematic fantasy concept art, volumetric lighting, highly detailed
--ar 16:9 --v 6.1 --s 250 --q 2
โ DALL-E A majestic dragon with glowing crimson scales soars over a towering medieval
stone castle, silhouetted against a vibrant orange and purple sunset sky.
Rendered in a high-fantasy digital art style with dramatic, warm lighting and
highly detailed textures, wide aspect ratio.
โ Nano Banana A majestic dragon with deep crimson scales and a leathery, bat-like wingspan
glides through the warm, golden-hour sky just above a towering medieval castle
made of weathered grey stone. ... Frame this as a wide cinematic landscape shot
using a 24mm lens at f/8 for deep depth of field, camera positioned at a
slightly elevated three-quarter angle... Aspect ratio 16:9.Midjourney gets --ar/--v/--s/--q flags; DALL-E and Nano Banana get flag-free natural language โ and Nano Banana layers in photographic direction (lens, f-stop, camera angle) and explicit mood, its documented style. Same idea, each platform's native dialect.
2 โ It knows what you're working on. This is the part a template can't fake. Drop a vague one-liner while editing src/transport.ts in this very repo, and the engine grounds it in your real workspace โ package.json, git state, the active file โ and resolves intent before it shapes the output:
You write: "add a configurable request timeout to the http transport"
ยท active file: src/transport.ts ยท resolved intent: production-code
ยท grounded in: active-file ยท workspace-meta ยท git-state ยท environment ยท
target-model ยท platform-hints
โ Cursor Implement a configurable request timeout for the HTTP transport in
`src/transport.ts`.
Requirements:
1. Add a new environment variable `CLARIFYPROMPT_HTTP_TIMEOUT` โฆ (default 30000 ms)
2. Apply this timeout to all incoming requests in the streamable-http transport
โฆ
5. Preserve existing behavior for stdio and a2a transports
โฆ
The implementation should be added to the streamable-http section of
`startTransport()`.
(excerpted โ the full rewrite has 7 numbered requirement groups)Nothing in that one-line prompt mentioned the CLARIFYPROMPT_HTTP_* naming convention, the startTransport() entry point, or the stdio/a2a transports it must preserve โ the engine read those from the active file and package.json and folded them in. That's the difference between rephrasing a prompt and compiling it against context.
3 โ It can run the whole pipeline. clarify โ ground/optimize โ critique โ revise, in one compose_prompt call โ see Previously in 1.4.0 โ the composable pipeline below.
Provenance. Image outputs captured via
glm-5.2:cloud, the grounded code output viaqwen3-coder:480b-cloudโ both Ollama cloud models served over Ollama's OpenAI-compatible endpoint (LLM_API_URL=http://localhost:11434/v1), run throughoptimize_promptagainst this repo on 2026-06-22 (the Nano Banana capture added 2026-07-03, sameglm-5.2:cloudmodel). ClarifyPrompt is model-agnostic (any OpenAI-compatible API, local or hosted); outputs are model-dependent โ yours will differ in wording, not in structure.
Related MCP server: Refine Prompt
What's new in 1.15.0
Nano Banana, built in. Google's Gemini 2.5 Flash Image ("Nano Banana") is now a first-class image platform โ optimize_prompt(category: "image", platform: "nano-banana") compiles your idea into its native prompting style: full-sentence scene direction (not keyword piles), photographic terminology for camera/lens/depth, explicit lighting, edit-phrasing that preserves subject identity, multi-reference character consistency, and reliable in-image text. Like every image platform, ClarifyPrompt compiles the prompt; you send it to the model.
Latest-model compatibility, every provider. Thinking-enabled models reject parameters clarifyprompt always sent: claude-sonnet-5 and OpenAI reasoning models reject temperature; gpt-5 / o-series also reject max_tokens (they require max_completion_tokens). Every call to them used to fail and degrade to the original prompt. Now the client sends the right body โ proactively for well-known reasoning ids (no wasted round-trip) and, for anything the hints don't recognize (including future models), it learns from the 400 and retries. Models that accept the standard parameters are byte-identical. Verified live against Anthropic (claude-sonnet-5), OpenAI (gpt-5), Gemini (gemini-flash-latest), and Ollama Cloud (glm-5.2:cloud). Reasoning models think a lot โ bump LLM_TIMEOUT_MS (the 30s default is often too short).
What's new in 1.14.1
Portable by default. When you optimize a text prompt (chat, document, code) without naming a platform, ClarifyPrompt now returns platform-neutral output โ clean, portable structure that works in any assistant โ instead of quietly defaulting to Claude's idioms (its <task>/<context> XML tags). Name a platform (platform: "claude", "chatgpt", โฆ any of the 60) to opt into that platform's specific tuning. Creative categories (image/video/voice/music) are unchanged: their output needs a concrete platform format, so the flagship default (Midjourney, Runway, โฆ) still applies.
Clearer compose panel. The MCP Apps panel now shows a for <platform> (or general purpose) badge, renders your original prompt as a labeled Your prompt block above the optimized output, and shows the optimized prompt plainly โ with a show changes toggle for the word-level diff โ instead of an always-on diff.
What's new in 1.14.0
compose_prompt now has a face. ClarifyPrompt ships an MCP Apps panel (extension io.modelcontextprotocol/ui) that supporting hosts render inline next to the tool result:
Original vs optimized, as a word-level diff โ see exactly what the compiler changed.
Critique, visualized โ all six dimensions (clarity, specificity, intent_alignment, format_fitness, length_appropriateness, plain_language) as score bars, with the verdict and the per-call
stagesaudit trail as badges.Accept โ one click records
save_outcome(accepted)from the panel, feeding the few-shot memory loop, and quietly tells the model the prompt was accepted.Reviseโฆ โ type what should change; the panel sends it back into the chat so the model re-composes.
Clarification-aware โ when the pre-clarify stage stops the chain with questions, the panel renders them (with suggested answers) instead of a diff.
Zero-risk rollout: the panel is one self-contained HTML resource (ui://clarifyprompt/compose-panel.html, inline CSS/JS โ the extension sandbox blocks external requests) linked from compose_prompt's _meta.ui. Hosts without the extension ignore it entirely; the text + structuredContent output is byte-identical. Runs on the existing SDK ^1.29 floor. New deterministic npm run test:apps battery locks the wiring.
Also new: the eval harness gained a max_reading_grade check โ a deterministic FleschโKincaid ceiling that locks 1.13.0's plain-language behavior as a measurable gate (formal-register slop scores ~20+; plain rewrites ~3โ6).
What's new in 1.13.0
Plain-language rewrites, end to end. LLMs handle common, everyday wording more reliably than formal synonyms of the same meaning โ and small local models, ClarifyPrompt's default targets, benefit the most. This release bakes that into every stage that shapes output wording:
The optimizer prefers common words. A new core principle in the shared system prompt ("USE COMMON WORDS") applies to all 7 category strategies and both
optimize_promptandground_prompt: never swap in a rarer word where a common one carries the same meaning. Detail means more information, not fancier words โ specificity, structure, and constraints are untouched.critique_promptgained a 6th default dimension:plain_language. It penalizes needlessly formal or rare vocabulary where a simpler word would do. Because the rewrite pass applies every suggestion from dimensions scoring below 7,auto_reviseloops now correct register drift for free. Customcriteriaoverrides are unaffected.Fixed: explicit
modeno longer silently dropped for small local models. Compact system-prompt shaping used to trim the mode instructions entirely โ somode: "simple"had no effect on 3B-class models. Every mode now survives compact shaping as a one-line rule.Two new eval fixtures guard the behavior:
31-plain-language-vocabulary(optimized output must not contain formal-register words) and32-shape-compact-keeps-mode(the mode line reaches small models).
What's new in 1.12.1
The real fix for issue #3: thinking-channel models now reliably produce optimized prompts instead of intermittently returning empty content. Both gpt-oss:20b-cloud and glm-5.2:cloud went from empty ~40% of runs to 0%.
Re-investigating from scratch overturned the documented root cause. It was never "Ollama's /v1 shim drops the harmony final channel." These models spend their max_tokens budget on the thinking channel first and never reach the final channel โ so content comes back "" (worse at higher reasoning effort). Two levers, applied together because different families honor different ones:
A
max_tokensfloor (8192) for detected reasoning models โ the universal lever. It attacks the root cause directly, so it works regardless of which thinking knob a family respects. It's a ceiling, not a target: short answers finish early, so no added latency.reasoning_effort: "low"โ for families that respect it (gpt-oss), also trimming latency/cost. Tune withLLM_REASONING_EFFORT(low|medium|high).
The levers are genuinely family-specific: gpt-oss honors reasoning_effort but ignores Ollama's think; glm is the exact opposite โ it ignores reasoning_effort, so only the budget floor saves it.
Detection is robust, not a hardcoded model list (which would rot as new models ship). "Is this a thinking model?" is answered, cached per model, by: (1) the runtime itself โ Ollama's /api/show reports a thinking capability (this is how minimax-m3:cloud is detected, with no name match); (2) response-learning โ any reasoning trace, or empty-content-with-tokens, marks that model thereafter (works for any provider); (3) a small name hint as last resort. Non-reasoning models stay byte-identical, and the name-agnostic empty-content retry is the final backstop. Validated on gpt-oss:20b-cloud, glm-5.2:cloud, and minimax-m3:cloud (all 0% empty on the first call).
The previously-proposed "switch to Ollama's native
/api/chat" was a dead end โ/api/chatwiththink:falsestill returns empty content for gpt-oss (it ignores it), and it would have added a fragile second code path.
What's new in 1.12.0
Step #7 โ the final step โ of the MCP modernization roadmap: ClarifyPrompt now speaks A2A (Agent-to-Agent), so other agents can call it to compile prompts. stdio stays the default; nothing about existing setups changes.
Set CLARIFYPROMPT_TRANSPORT=a2a and ClarifyPrompt comes up as a discoverable A2A peer on Node's built-in http (the only new dependency is the official @a2a-js/sdk, which itself pulls just uuid):
Endpoint | Purpose |
| Agent card โ discovery: identity, capabilities, the |
| A2A JSON-RPC 2.0: |
| Liveness probe |
CLARIFYPROMPT_TRANSPORT=a2a CLARIFYPROMPT_HTTP_PORT=3000 npx clarifyprompt-mcp
# โ card: http://127.0.0.1:3000/.well-known/agent-card.json
# โ a2a: POST http://127.0.0.1:3000/a2a (message/send ยท message/stream)The whole roadmap pays off here โ one incoming A2A message flows through the same compose pipeline, and the primitives built in earlier steps map straight onto A2A semantics:
Compile โ a
message/sendwith the raw prompt (plain text, or JSON{ prompt, platform?, category?, โฆ }) returns a task whose artifact carries the optimized prompt (text) plus the full structured compose result (data).Streaming (1.10.0 progress โ A2A) โ
message/streamemitsstatus-updateevents as each pipeline stage runs, then the artifact, over SSE.Cancellation (1.10.0 AbortSignal โ A2A) โ
tasks/cancelaborts the in-flight compose within milliseconds and reports a terminalcanceledstate.Clarification (1.9.0 elicitation โ A2A) โ clarify is off by default for one-shot peers; opt in with
pre_clarify: 'auto' | 'always'and an ambiguous prompt pauses the task in A2A's first-classinput-requiredstate with the questions (readable text + structured data). Answer on the same task and it compiles.
Configure the public base URL advertised in the card with CLARIFYPROMPT_A2A_BASE_URL (handy behind a proxy); port/host are shared with streamable-http. New deterministic npm run test:a2a battery drives card discovery, a live compile, the clarify round-trip, and SSE streaming.
What's new in 1.11.0
Step #6 of the MCP modernization roadmap: a pluggable transport factory โ ClarifyPrompt can now serve over Streamable HTTP, the runway toward A2A and remote MCP hosts. stdio stays the default; nothing about existing setups changes.
Transports
Set CLARIFYPROMPT_TRANSPORT:
Value | Behaviour |
| One server over stdin/stdout โ exactly as before |
| MCP Streamable HTTP over Node's built-in |
| Serve as an A2A (Agent-to-Agent) peer โ agent card, JSON-RPC + SSE (see 1.12.0 above) |
HTTP knobs (in streamable-http / a2a mode): CLARIFYPROMPT_HTTP_PORT (3000), CLARIFYPROMPT_HTTP_HOST (127.0.0.1 โ localhost-only by default), CLARIFYPROMPT_HTTP_PATH (/mcp, streamable-http only).
CLARIFYPROMPT_TRANSPORT=streamable-http CLARIFYPROMPT_HTTP_PORT=3000 npx clarifyprompt-mcp
# โ POST http://127.0.0.1:3000/mcp ยท GET http://127.0.0.1:3000/healthTool/resource registration moved into an exported createServer() factory: stdio gets one server, streamable-http gets one per session (the SDK-recommended, GHSA-safe pattern โ never shares a server across HTTP clients). New deterministic npm run test:http battery drives a full HTTP session.
What's new in 1.10.0
Step #5 of the MCP modernization roadmap, stable core: compose_prompt is cancellable and reports live progress. Model-agnostic, opt-in, fully back-compat.
Cancellation
An AbortSignal is plumbed through the entire LLM path (simpleGenerate โ chat โ fetch, combined with the per-call timeout) and every engine stage. When a client sends notifications/cancelled for a compose_prompt call, the in-flight model request aborts immediately and the revise loop stops at the next stage boundary โ instead of running every iteration to completion. The signal reaches fetch regardless of which model/provider is configured.
Progress
Include a progressToken in the compose_prompt request _meta and the server emits notifications/progress at each stage (clarify / optimize / ground / critique) with a monotonic counter and a human message like optimizing prompt [iter 2/3]. Hosts can show a live status on a long multi-iteration compose. No token โ no notifications, zero overhead.
Why not MCP tasks (yet)
Roadmap #5 named the MCP tasks API. It's still experimental/ in the SDK ("may change without notice"), its reference is ~600 lines, and no current client speaks the tasks/* protocol โ so a full implementation would be unusable off-by-default code today. The real value (cancellable + progress-reporting compose) is delivered here on stable primitives; the experimental async-task wrapper is deferred to land with #7 (A2A), which the AbortSignal groundwork here already sets up. New deterministic npm run test:cancel battery locks the behavior.
What's new in 1.9.0
Step #4 of the MCP modernization roadmap: clarify_with_user can elicit answers through the host's native form UI. Opt-in, fully back-compat.
Interactive clarification
Pass elicit: true. On a client that supports MCP elicitation, the clarifying questions become a real form:
each question is a field,
optionsbecome enum dropdowns, and eachsuggestedAnsweris the field default (one-click accept);the user answers inline; the engine returns
answers: [{ question, dimension, answer, usedSuggested }]withelicited: true.
Without elicit, on a non-capable client, or if the round-trip errors, the tool returns the same raw-questions JSON it always has โ every existing caller is unaffected. decline / cancel are surfaced via elicitationAction.
This turns clarification from "here's a JSON blob of questions, you render it" into a first-class interactive moment in hosts like Claude Desktop. The mapping lives in a small pure module (src/engine/clarification/elicit.ts), reusable by compose_prompt's pre-clarify stage later. New deterministic npm run test:elicit battery (pure helpers + a live mock-client round-trip) locks it.
What's new in 1.8.0
Step #3 of the MCP modernization roadmap: the engine's read surfaces become browseable resource templates with argument autocompletion. No tool or engine behavior changes.
Resource templates
Four templates join the static clarifyprompt://categories, each backed by an existing engine getter:
URI template | What it reads |
| One platform's full config โ |
| Optimization-trace summary index for a UTC day |
| One loaded knowledge pack's metadata |
| Live remembered facts under a scope |
MCP hosts with a resource browser (Claude Desktop, Cursor) now get a navigable tree instead of a single static blob.
Autocomplete
completion/complete resolves the template variables: {category} โ the 7 category ids, {id} โ platform ids scoped by the chosen {category}, {date} โ days with traces, pack ids, memory scopes. (MCP completion applies to prompt args + resource-template variables only โ not tool inputs; ClarifyPrompt registers no prompts, so it lives on the templates.)
Capabilities
The server now advertises resources (with templates) and completions at initialize. New deterministic npm run test:resources battery locks the surface.
What's new in 1.7.1
Patch fixing #3: a silent empty optimized prompt from models whose answer didn't land in content.
Reads all three thinking-channel field names (
reasoning/thinking/reasoning_content) โ fixes DeepSeek / qwen-thinking and similar.Retries once, then fails loudly when content is empty regardless of any thinking field. This covers the real issue #3 case: gpt-oss harmony output over Ollama's
/v1shim generates tokens (completion_tokens > 0) but returnscontent: ""with no thinking field. The engine now degrades to the original prompt + a surfacederrorinstead of returning blank.Genuinely recovering gpt-oss harmony output (via Ollama's native
/api/chat) was tracked as a follow-up โ resolved in 1.12.1, which proved the/api/chatpath a dead end and fixed the actual root cause (amax_tokensfloor +reasoning_effortfor reasoning models; see the 1.12.1 notes above).New deterministic
npm run test:thinkingbattery locks the regression with mocked responses (no live cloud dependency).
Verified: test:thinking, reasoning battery (gpt-oss degrades loudly; the genuine reasoner kimi-k2-thinking:cloud still returns real content), integration, day2, evals, wire.
What's new in 1.7.0
Step #2 of the MCP modernization roadmap: the entire tool surface migrated off the deprecated server.tool() shorthand (removed in SDK 2.0) onto server.registerTool(). No engine behavior changes; full back-compat.
What hosts get
Titles โ every tool has a human-readable display name ("Forget a fact", not
memory_forget).Behavior annotations โ all 23 tools declare
readOnlyHint/destructiveHint/idempotentHint/openWorldHint. The three destructive tools (memory_forget,unload_pack,unregister_platform) are flagged for confirmation UIs; the seven read-only inspectors are flagged safe-to-call-freely; the seven tools that reach the network (LLM / embeddings / web search) carryopenWorldHint: true.Structured output โ every tool declares an
outputSchemaand returnsstructuredContentalongside the JSON text. Schemas are permissive by design (all-optional, passthrough) โ they document the shape without ever rejecting engine output.
Back-compat
Text content is byte-identical for every tool โ including the three array-returning list_* tools, whose text stays a bare array while structuredContent wraps it in an object per the MCP spec. Error returns unchanged. Verified: wire 7/7, integration 9/9, day2, 26/27 evals with zero output-validation errors.
Found during verification
#3 โ cloud gpt-oss thinking-channel responses can yield an empty optimizedPrompt (remote API change exposing a pre-existing field-name gap in client.ts; fix targeted for 1.7.1).
What's new in 1.6.8
Housekeeping release closing the loops the 1.6.5โ1.6.7 cascade opened. No engine code, MCP tool surface, platform, or env-var changes.
Changed
CI matrix now tests Node 24 (current active LTS, EOL Apr 2028) alongside 18/20/22 across Ubuntu + macOS. The matrix previously tested two EOL Node versions but not the current LTS at all. Verified before merge that the native deps (
better-sqlite3+sqlite-vec) load and function on Node 24.16.0 in a toolchain-freenode:24-slimcontainer.enginesstays>=18โ maximum compatibility, and we test what we claim.Publish runner moved Node 20 โ 22, keeping an EOL runtime off the release-critical path (matches the Dockerfile base).
Process
New ship-check
CP-13 โ lockfile regeneration safetyencodes the lesson from the 1.6.5โ1.6.6โ1.6.7 cascade: a singlenpm install --package-lock-onlysilently dropped 4 of 5sqlite-vecplatform binaries (broke Linux CI) and pulled a within-caretbetter-sqlite3bump that dropped Node 20 prebuilds (broke the Docker build). The check mandates fullnpm installon dep changes, a lockfile diff for dropped platform deps + native-dep version jumps, and a local slim-Docker load gate. Dogfooded on this release.
What's new in 1.6.7
Dockerfile patch. No engine code, MCP tool surface, platform, or env-var changes.
Fixed
CI / docker buildfailed on 1.6.6 withnpm error gyp ERR! find Python. Root cause:better-sqlite3@12.10.0(released 2026-05) explicitly removed prebuilt binaries for Node.js v20 and v23 because Node 20 reached EOL in April 2026. The 1.6.6 lockfile regen pulled 12.10.0 within the^12.9.0caret, andnode:20-slimdoesn't have Python + a C++ toolchain to compile from source. Bumped the Dockerfile base tonode:22-slimโ current active LTS, still has working prebuilts.The non-Docker CI build matrix (Node 18 / 20 / 22 across macOS + Ubuntu) still passes because regular runners can compile-from-source as fallback. Only the slim Docker image stumbles.
Verified locally
docker build โ green. Container can require('better-sqlite3') + require('sqlite-vec') cleanly. All 5 sqlite-vec platform binaries still in package-lock.json (1.6.6's fix held).
What's new in 1.6.6
Lockfile + harness patch following 1.6.5. No engine code, MCP tool surface, platform, or env-var changes. Ships the MCP-completeness audit doc.
Fixed
package-lock.jsonlost 4 of 5sqlite-vecplatform binaries during the 1.6.5 SDK bump. My localnpm install --package-lock-onlyretained only the maintainer'ssqlite-vec-darwin-arm64binary.npm cion CI's Ubuntu runners failed withno such module: vec0becausesqlite-vec-linux-x64wasn't in the lock. End-usernpm install clarifyprompt-mcp@1.6.5was never affected (the npm tarball doesn't ship a lockfile; users resolve platforms at install time). Regenerated with fullnpm installso all 5 platforms (darwin-arm64,darwin-x64,linux-arm64,linux-x64,windows-x64) are back.Eval harness HTML report writer crashed on ERRORED entries (
evals/run.mjs:729). The pre-existing renderer assumed every non-skipped, non-filtered run had anevaluation.checksfield, but errored runs carry anerrorfield instead. Added an explicit errored-status branch โ the harness now degrades gracefully and exits cleanly even when fixtures error.
Bundled docs
docs/audits/mcp-completeness-2026-05.mdโ diagnostic audit of the engine's MCP surface against the current SDK + spec. Tool-by-tool registration table, resource gap analysis, SDK feature delta (1.12 โ 1.29 โ 2.0-alpha), capability declarations, transport refactor sketch, A2A feasibility note, and a sequenced 7-step modernization roadmap. The artifact behind next-session planning. No engine changes prescribed inline.
Numbers
5 sqlite-vec platforms in lockfile (was 1).
npm audit --production: 0 vulnerabilities (unchanged). Tools: 23 (unchanged). Eval fixtures: 30 (unchanged).
What's new in 1.6.5
Security patch. No engine code changes, no MCP tool surface changes, no platform changes, no env-var changes.
Fixed
CVE-2026-0621 โ ReDoS in
@modelcontextprotocol/sdk'sUriTemplateregex (patched in SDK1.25.2). The previous^1.12.1floor allowed vulnerable resolutions on stale npm caches; bumped to^1.29.0so the floor itself is patched.GHSA-345p-7cg4-v4c7 โ Shared server/transport instances leak cross-client response data (patched in SDK
1.26.0). Not exploitable in practice for ClarifyPrompt (one host = one server instance) but the vulnerable code is now out of the dependency graph entirely.7 transitive vulnerabilities (2 moderate, 5 high) in the SDK's bundled HTTP-transport substack (
hono,express-rate-limit,fast-uri,ip-address,path-to-regexp,qs,@hono/node-server). Cleared vianpm audit fix. Never affected runtime โ ClarifyPrompt is stdio-only and doesn't load the HTTP transport โ but they were noise in users'npm auditreports and made the install look unsafe.
Numbers
npm audit --productionโ 0 vulnerabilities (was 2 SDK CVEs + 7 transitive).package-lock.json: net โ336 lines (the old caret was pulling in heavy unused HTTP-transport ancillaries; the fix swapped them for slimmer alternates).Tools: 23 (unchanged). Platforms: 60+ (unchanged). Eval fixtures: 30 (unchanged).
Wire test + integration battery + day2 + reasoning + 29/30 evals pass against the new floor on local Ollama. The one eval fail (
analyzer-creative-media) is a pre-existing qwen-coder-7b classifier flake โ verified SDK-independent by stash-reverting and re-running.
Why the floor bump matters
^1.12.1 was misleading documentation โ caret resolution was actually pulling SDK 1.27.1 for any fresh npm install since early 2026. The floor bump aligns the declared baseline with what npm was already doing for most users while guaranteeing the floor for users on stale caches. It also positions us for the eventual 2.0.0-alpha migration when that line stabilizes (the modern SDK deprecates .tool() / .prompt() / .resource() shorthand registration in favor of registerTool() / registerPrompt() / registerResource() with title + outputSchema + annotations).
What's new in 1.6.4
Docs + process patch. No engine, MCP tool, or platform changes โ but a meaningful cleanup of the pack-distribution model.
Pack registry consolidated back into the engine repo
LumabyteCo/clarifyprompt-packs (the separate community-pack registry created in 1.3 with the right principle but at the wrong scale) has been archived. Its three starter packs already lived in this repo's packs/ folder; the registry was meant to be the canonical home but in practice everything always shipped from here via the npm tarball. The drift caught up: higgsfield-creative-handbook shipped in 1.6.2 and never made it to the registry, even though the registry's own README told users to fetch packs from there.
Net result of 1.6.4:
Single source of truth.
packs/*.mdknowledge packs +packs/platforms/*.yamlplatform configs all live inclarifyprompt-mcpand ship in the npm tarball.New top-level Knowledge packs section in this README explains the loading model (
load_knowledge_pack({source: "<url-or-path>", scope: ...})), the three starter packs + Higgsfield, the scope semantics, and how to contribute.New
packs/README.mdโ pack authoring guide (frontmatter schema, chunk boundaries, quality bar). Lifted from the archived registry so the content isn't lost.Tombstone redirect on the archived repo. Anyone visiting
clarifyprompt-packslands on a banner pointing here.
When does the split come back?
When there's a forcing function: a community PR queue on packs alone, pack count >20, or divergent licensing/governance. Until then the maintenance cost of keeping two repos in sync wasn't paying for an audience that hadn't materialized.
Numbers
Tools: 23 (unchanged).
Platforms: 60+ (unchanged).
Bundled knowledge packs: 4 (
anthropic-brand-voice,higgsfield-creative-handbook,nextjs-14-best-practices,sox-compliance) โ same as 1.6.2/1.6.3, just newly canonical.Eval fixtures: 30 (unchanged).
Tarball size: unchanged from 1.6.3.
What's new in 1.6.3
Patch. The 1.6.2 CI tag-push run surfaced two real issues โ fixed here without changing any engine code.
Fixed
evals/fixtures/28-context-includes-git-state.yamlpreviously assertedgit_branch_present: true, but GitHub Actions checks out in detached-HEAD mode wherebundle.git.branchis correctlyundefined(only the SHA + recent commits are populated). Relaxed to assertbundle_has_git: trueonly โ that's what's actually invariant across local + CI environments.evals/fixtures/17-critique-strong-prompt-accepts.yamlassertedverdict: accept+overall_score_min: 7on a strong prompt. gpt-4o-mini's judge calibrates stricter than qwen2.5-coder:7b's, and occasionally returned a malformedoverallfield that the parser defaulted to 0 โ verdict=reject. The fixture's real intent is to verify engine wiring (5+ dimensions, the standard dimension names present, no harness error) โ not to compare judge calibration across models. Dropped the verdict + tight score assertions; kept the wiring-level checks.README Glama badge swapped from inline
<img>(sometimes broken via GitHub's camo proxy) to a shields.io text-link badge that's stable across all rendering surfaces.
Notes
No engine code changes. No new MCP tools (still 23). No platform changes (still 60+). No env-var changes.
Eval baselines unchanged on local Ollama. This is a CI-specific hardening โ local runs against qwen-coder-7b produced the same results before and after.
The CI publish-gate failure that appeared on the v1.6.2 tag push was downstream of the eval failure (
Wait for evals workflowstep blocked publish). Now that the underlying fixtures don't false-fail on gpt-4o-mini + detached-HEAD CI, the publish gate clears too.
What's new in 1.6.2
Patch. Two additive ships, both no-code-changes from the engine's perspective:
Higgsfield creative-handbook knowledge pack
packs/higgsfield-creative-handbook.md โ a community-style markdown pack documenting Higgsfield's actual conventions: model-selection rules (which of the 13 models for which use case), Soul ID character-training workflow, camera-move vocabulary, prompt-structure pattern (long-form prose, not keyword tags), multi-reference editing, Marketing Studio modes, common pitfalls (don't translate Midjourney flags verbatim), output specs.
Load it explicitly:
load_knowledge_pack source="https://raw.githubusercontent.com/LumabyteCo/clarifyprompt-mcp/main/packs/higgsfield-creative-handbook.md"โฆor, since it ships in the npm tarball, point at the installed copy. The Context Curator grounds Higgsfield-targeted prompts in this pack's chunks automatically via semantic retrieval. See the Knowledge packs section for the full loading + scoping model.
npm run matrix โ multi-model eval matrix runner
evals/matrix.mjs runs npm run eval sequentially against N models and stitches the results into one side-by-side HTML (evals/matrix.html by default). Lights up the model-class-gated fixtures (shape-small-local-model / shape-mid-tier-model / shape-reasoning-model) that single-model runs skip, and exposes deltas like "qwen-7b fails analyzer-creative-media but gpt-4o-mini passes it" in a glance.
npm run matrix -- --models qwen2.5-coder:7b-instruct-q4_K_M,gpt-oss:20b-cloud,glm-5.2:cloudOutputs a dark-themed table โ rows = fixtures, columns = models, cells = pass / fail / skip / errored with tooltips showing which checks failed.
Companion fix: evals/run.mjs gains a --json-out <path> flag that writes structured per-model results (matrix.mjs uses it; CI agents can use it too).
Numbers
No tool surface change. Still 23 MCP tools.
No platform count change. 60+ platforms (
packs/platforms/*.yamlunchanged).30 โ 30 fixtures (no new fixtures; matrix is tooling, not coverage).
Tarball grows ~10 KB for the knowledge pack.
evals/matrix.mjsis NOT in the tarball โ it's a maintainer/contributor tool, not a runtime artifact.
What's new in 1.6.1
Patch release. Adds Higgsfield as a target platform in both image and video categories. No code changes โ pure YAML platform-pack additions and one eval fixture.
Higgsfield is a multi-model creative platform that exposes its own MCP server at https://mcp.higgsfield.ai/mcp. Inside one connection you get:
Image: Soul 2.0, Soul Cinema, Soul Cast (character-consistent), Flux 2, Seedream 5, Nano Banana Pro, GPT Image 2
Video: Cinema Studio, Sora 2, Veo 3.1, Kling 3.0, WAN 2.6, Seedance 2.0
Workflows: Soul ID character training, Lipsync Studio, UGC Factory, Marketing Studio, virality_predictor
The 1.6.1 ClarifyPrompt platform entries surface Higgsfield's model identifiers and prompt-style conventions (long-form natural-language prose; composition + lighting + textures + mood; up to 4K images / 15 s video / Soul ID for character consistency) as syntax hints to the curator.
Recommended pattern: install both clarifyprompt-mcp AND Higgsfield's MCP in your client (Claude Desktop / Cursor / AI Butler / Claude Code). Use optimize_prompt(platform: 'higgsfield', ...) or compose_prompt(platform: 'higgsfield', ...) to compile, then pass the compiled prompt to Higgsfield's generate_image / generate_video tool. MCPs compose at the client; ClarifyPrompt stays at the "compile" layer.
29 โ 30 eval fixtures. Same MCP tool surface as 1.6.0 (23 tools, 1 resource). No env-var changes.
What's new in 1.6.0
Four targeted additions across the engine's four pillars (memory / agentic / models / context), each shipped behind real eval fixtures. 3 new MCP tools (23 total). Fully back-compat with 1.5.x โ no removed tools, no removed fields, no required env-var changes.
Memory โ explicit fact CRUD (memory_remember, memory_forget, memory_list_facts)
Before 1.6, facts only entered persistent memory via reflection on save_outcome โ implicit, LLM-extracted, after-the-fact. 1.6 adds the explicit path:
memory_rememberโ directly insert a(subject, predicate, object)triple with explicit confidence. Source taggeduser:explicit. Auto-embedded for future semantic retrieval.memory_forgetโ soft-delete (bi-temporalinvalidated_at) a fact by id. Idempotent: re-forgetting an already-invalidated fact is a no-op and returnssuccess: falsecleanly.memory_list_factsโ list live facts in a scope (defaultuser), optionally filtered by predicate. Sorted by most-recently-observed.
This closes the obvious UX gap where the engine could only learn from outcomes โ now users can say "remember I prefer X" directly.
Agentic โ compose_prompt's new max_iterations revise loop
compose_prompt used to revise once (the critique's improvedPrompt replaced the optimization, if the verdict wasn't accept). 1.6 adds a loop:
{ "prompt": "...", "post_critique": true, "auto_revise": true, "max_iterations": 3 }Each iteration after the first re-runs optimize + critique on the previous iteration's improved prompt. Stops at verdict=accept, no improvedPrompt to feed back, or the cap. pre_clarify only runs once (no point re-asking on a rewrite). The response includes a new iterations field showing how many fired. Hard cap of 5 to prevent cost runaways.
Models โ per-stage model routing
Each compose stage can now target a different model:
{
"prompt": "...",
"clarify_model": "qwen2.5-coder:7b-instruct-q4_K_M",
"optimize_model": "claude-sonnet-5",
"critique_model": "gpt-4o-mini"
}Run clarify on a cheap local model, optimize on the big-budget frontier model, critique on the cheap judge. The override flows through every layer โ optimization.metadata.model and critique.judgeModel in the response reflect the actual model that ran each stage.
Context โ git-state + environment signals
Two new signal collectors feed the Context Curator:
bundle.gitโ current branch, short SHA, dirty flag, last 5 commit titles. Lets the engine ground prompts in "what you're iterating on" without you spelling it out. Detected viagit rev-parse/git status/git log; fails soft when cwd isn't a repo.bundle.environmentโnowIso/weekday/timezone(IANA fromIntl.DateTimeFormat). Helps with time-sensitive prompts ("send this email tomorrow"). Pure JS, never fails.
Both are low-utility candidates in the curator (won't dominate budget) but surface as grounding sources when relevant.
Eval coverage
23 โ 29 fixtures (6 new):
24
memory-remember-persists/ 25memory-forget-invalidatesโ Me1 CRUD round-trip26
compose-loop-iteratesโ A1 loop infrastructure (newiterations_min/iterations_maxchecks)27
compose-per-stage-models-honoredโ M1 per-stage routing (newoptimization_model_eq/critique_model_eqchecks)28
context-includes-git-state/ 29context-includes-environment-timeโ C1 + C4 signals (newbundle_has_git/bundle_has_environment/git_branch_presentchecks)
Local baseline on qwen2.5-coder:7b: 25 passed / 1 failed / 3 skipped / 97% avg. The lone failure remains the persistent analyzer-creative-media model-class signal (untouched).
What's new in 1.5.2
The first release where CI's eval gate (against gpt-4o-mini) drove the diff. Three real fixes that the gate caught the moment we wired in the OPENAI_API_KEY secret:
Memory store now supports any embedding dimension (#2). The persistent vec table was hardcoded to 768 dims (the nomic-embed-text default), so anyone configuring
EMBED_MODEL=text-embedding-3-small(1536),voyage-3(1024),embed-english-v3.0(1024), or any non-768 model would hitDimension mismatch: expected 768, got Non the firstmemory_searchcall. The store now derives the table name from the embedder's actual dimension and creates the dim-specific table at boot. Existing 768-dim installs are unaffected.LLM_TIMEOUT_MSenv-var override on the LLM client. Default stays at 30s; users on slow hosted models can bump it. The eval workflow uses 120s forgpt-4o-mini.Eval harness hardened โ no longer crashes when a tool throws an exception (the SDK returns plain-text error responses; the harness used to
JSON.parsethem and die). One bad fixture no longer tanks the whole run.Live evals badge. The
evals.ymlworkflow runs on every push to main. The[![evals]](...)badge at the top of this README is its real-time status. Currently green at 20/0/3 ยท 100% ongpt-4o-mini.
No new MCP tools. No env-var surface changes (only an added optional LLM_TIMEOUT_MS). Fully back-compat with 1.5.x.
What's new in 1.5.1
A patch release on top of 1.5.0. Pure docs + ship-process improvements; runtime behavior is identical to 1.5.0.
README marketing surfaces refreshed โ the 1.5.0 release shipped with the README still on 1.4.0 in three places (headline blockquote, "What's new in X" heading, "cumulative through X" annotation). Every other version surface (
package.json,package-lock.json,server.json,src/index.ts,CHANGELOG) was correct, but the prose drifted because nothing automated touched it. 1.5.1 fixes that.Two new ship-check audits โ
CP-11(README marketing-surface coherence) hard-fails if any of the three above don't reference the currentpackage.json#version.CP-12(Platform-pack format validity) parses everypacks/platforms/*.yamland asserts schema validity. CP-11 was promoted to the user-scoped (cross-project) ship-check skill the same day, so future projects benefit too.No code changes. No new MCP tools. No new env vars. Same tarball anatomy as 1.5.0 plus a few hundred bytes of CHANGELOG.
What's new in 1.5.0
Built-in platforms become declarative. The 58+ hardcoded TypeScript platform arrays move to packs/platforms/*.yaml โ adding a built-in platform is now a YAML edit, not a TS edit. The TypeScript layer becomes a runtime loader with a hardcoded fallback table. Malformed YAML can never soft-brick the server.
packs/platforms/
chat.yaml 9 platforms
code.yaml 9
document.yaml 8
image.yaml 10
music.yaml 4
video.yaml 11
voice.yaml 7
README.md contributor docsTo add a new built-in platform: append an entry to the relevant category file, run npm run build, open a PR. No TS edit required. Custom-platform-via-runtime (register_platform) still works identically for user-installed platforms.
Memory-layer eval coverage. The eval harness now supports
setup: [{tool, args}, ...]โ a list of MCP tool calls executed BEFORE the maininput. Two new fixtures use it: one loads a knowledge pack inline and verifies the chunk surfaces ingrounding.sourcesafter the embed โ store โ retrieve โ curate โ ground pipeline; the other proves vector-search ranking quality. 23 fixtures total (was 20 in 1.4.0).Test infrastructure modernization. The integration + Day-2 test batteries used to assert literal version strings (
1.3.0,16 tools) and broke on every bump. Now they readEXPECTED_VERSIONfrompackage.jsonand assert presence of a tool set rather than a tool count. Future bumps don't break the tests.Adoption materials.
docs/adoption/ships with copy/paste-ready Show HN body, Reddit posts, Twitter thread, awesome-mcp-servers PR template, and catalog submission specs (mcp.so, Smithery, mcp-get, PulseMCP, modelcontextprotocol/servers).One new runtime dep:
js-yamlpromoted from devDependency for the platform loader (~200 KB).Same MCP tool surface as 1.4. 20 tools, 1 resource. No new tools; no removed tools; result shapes unchanged.
Previously in 1.4.0 โ the composable pipeline
Four core operations as first-class MCP tools that compose. Use any tool standalone, or run the whole chain in one call:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ clarify โ โ โ ground OR optimize โ โ โ critique โ
โ (optional) โ โ (core) โ โ (optional) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
one call = compose_prompt(prompt, [sources], post_critique, auto_revise, ...)clarify_with_userโ Given an ambiguous draft, returns 1โ3 targeted clarifying questions, each with asuggested_answeryou can accept verbatim, optional 2โ4 quick-pickoptions, and adimensiontag (audience/scope/format/length/tone/constraints/goal/platform). Short-circuits withclarificationNeeded: falseon confident, well-formed prompts so it pipelines cleanly in front ofoptimize_promptwithout a per-call latency tax.ground_promptโ The strict, retrieval-augmented variant ofoptimize_prompt. Caller-provided sources are pinned at the highest priority โ above project rules, above pinned instructions โ and tracked individually in the trace asuser-source:N. Strict mode: zero non-empty sources โ error, no silent fall-through. Per-source body cap (4000 chars) so a single huge paste can't dominate the budget.critique_promptโ LLM-as-judge. Scores a candidate prompt 0โ10 across 5 default dimensions (clarity, specificity, intent_alignment, format_fitness, length_appropriateness) โ or your own criteria โ with per-dimension rationale + concrete suggestions, an overall score, and a verdict (accept/revise/reject). Belowrevise_threshold(default 7.0) it also returns animprovedPromptyou can drop in. Use it pre-flight ("is this prompt good enough for the expensive model?"), postmortem ("was the prompt the cause?"), or to A/B-pick the best of N optimization variants.compose_promptโ One MCP call runs the canonical pipeline. Auto-decides the ground vs. optimize branch from whether you passedsources.pre_clarify: 'auto' | 'always' | 'never'.post_critique: trueadds a judge pass.auto_revise: truereplacesfinal_promptwith the rewrite when the verdict isn'taccept. Returns a per-stagestagesaudit array so the caller sees exactly what ran.Eval harness v0 โ Deterministic regression tests under
evals/. 20 YAML fixtures cover analyzer, shape, intent-overlay, grounding, clarify, critique, ground, and compose surfaces.npm run evalproduces a console summary + self-contained dark-themed HTML report. Multi-model matrix is just bash: runLLM_MODEL=... npm run eval -- --report-path evals/report-X.htmlper model.CI-gated evals (opt-in) โ When
OPENAI_API_KEYis set as a repo secret, the eval harness runs in CI againstgpt-4o-minias a release gate. Off by default; nothing leaves your machine without the secret.5 new MCP tools (20 total).
optimize_promptalso gains auserProvidedSourcesinjection point โ bothground_promptandcompose_promptuse it under the hood, but it's available directly if you want explicit control without the strict-mode validation.
Carried over from 1.3: persistent memory + knowledge packs + reflective learning. The curator continues to score and fit grounding sources into the target model's remaining window.
explain_last_curationstill gives you a per-call breakdown of selected vs. rejected candidates with reasons.
What's in the box (cumulative through 1.15.0)
Context Engine โ auto-gathers workspace rules (
CLAUDE.md,AGENTS.md,.cursorrules,.clinerules,clarify.md), detects frameworks and languages frompackage.jsonand sibling manifests, tracks an active file excerpt, and maintains a per-session ring buffer of recent optimizations and their outcomes.Unified
PromptAnalyzerโ one LLM call produces{ category, intent, recommendedMode, confidence }together. 10 intents:production-code,brand-voice,stakeholder-comm,data-extract,creative-media,technical-spec,analysis,quick-draft,exploration,unknown. Intent beats surface keywords on ambiguity.Target-model-aware prompt shaping โ system prompt,
maxTokens, andtemperatureadapt to the downstream LLM's context window and the resolved intent. Small local models get a compact prompt; Claude/GPT-4/Gemini get the full richness.Grounding Context (single, priority-ordered) โ user pinned instructions โ project rules โ active file โ prior accepted examples โ web search โ workspace metadata โ target-model hints โ custom platform instructions โ built-in syntax hints. No more parallel context silos.
Session retrieval (save_outcome) โ the caller reports
accepted | edited | rejectedper optimization; similar accepted outputs in the same session get injected as few-shot examples into future similar prompts. Backed by persistent memory (SQLite + sqlite-vec), so accepted outcomes survive restarts.Local JSONL tracing โ every optimization writes a structured trace line (now with
shape,groundingSources,errorfields) to$CLARIFYPROMPT_HOME/traces/YYYY-MM-DD.jsonl. Nothing is uploaded. Toggle viaCLARIFYPROMPT_TRACE=off.Unified
$CLARIFYPROMPT_HOMEโ one env var for everything ClarifyPrompt writes. LegacyCLARIFYPROMPT_CONFIG_DIR/CLARIFYPROMPT_DATA_DIRstill work (deprecation hint, silenceable).Three transports โ
stdio(default),streamable-http(MCP over Nodehttp, stateful sessions +/health), anda2a(an Agent-to-Agent peer: agent card, JSON-RPCmessage/send+ SSEmessage/stream, task cancellation,input-requiredclarification). OneCLARIFYPROMPT_TRANSPORTenv var; stdio behavior is byte-identical to before.60+ platforms, 7 categories, custom platforms โ the original core is unchanged and fully backward-compatible.
Any LLM, any provider. One code path works with any OpenAI-compatible API โ Ollama (local + cloud), LM Studio, vLLM, OpenAI, Google Gemini, xAI Grok, Groq, Mistral, DeepSeek, Cohere, Perplexity, Together, Fireworks, OpenRouter โ plus Anthropic Claude directly. Reasoning models (
o1/o3/o4,deepseek-reasoner,gpt-oss,*-thinking) are auto-detected and given a larger token budget so they actually produce content. See 15+ pre-configured provider examples below.Apache-2.0, forever. Open-source core, no relicensing.
Quick Start
With Docker
Pull the published image from GitHub Container Registry (multi-arch: amd64 + arm64, with signed provenance + SBOM):
docker pull ghcr.io/lumabyteco/clarifyprompt-mcp:latestAll config is passed at run time โ nothing is baked into the image, so the image is safe to share and contains no secrets:
# stdio (for MCP hosts that launch the container)
docker run --rm -i \
-e LLM_API_URL=http://host.docker.internal:11434/v1 \
-e LLM_MODEL=qwen2.5:7b \
-e CLARIFYPROMPT_HOME=/data \
-v clarifyprompt-data:/data \
ghcr.io/lumabyteco/clarifyprompt-mcp:latest
# or serve over HTTP / A2A
docker run --rm -p 3000:3000 \
-e CLARIFYPROMPT_TRANSPORT=a2a -e CLARIFYPROMPT_HTTP_HOST=0.0.0.0 \
-e LLM_API_URL=http://host.docker.internal:11434/v1 -e LLM_MODEL=qwen2.5:7b \
ghcr.io/lumabyteco/clarifyprompt-mcp:latestMount a volume at
CLARIFYPROMPT_HOMEto persist memory, traces, and packs across runs. PassLLM_API_KEY/EMBED_API_KEYas-eenv vars (or--env-file) at run time โ never bake them into an image.
With Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"clarifyprompt": {
"command": "npx",
"args": ["-y", "clarifyprompt-mcp"],
"env": {
"LLM_API_URL": "http://localhost:11434/v1",
"LLM_MODEL": "qwen2.5:7b"
}
}
}
}With Claude Code
claude mcp add clarifyprompt -- npx -y clarifyprompt-mcpSet the environment variables in your shell before launching:
export LLM_API_URL=http://localhost:11434/v1
export LLM_MODEL=qwen2.5:7bWith Cursor
Add to your .cursor/mcp.json:
{
"mcpServers": {
"clarifyprompt": {
"command": "npx",
"args": ["-y", "clarifyprompt-mcp"],
"env": {
"LLM_API_URL": "http://localhost:11434/v1",
"LLM_MODEL": "qwen2.5:7b"
}
}
}
}With AI Butler
AI Butler is a self-hosted
personal AI agent runtime โ single Go binary, multi-channel chat, MCP
ecosystem hub. Drop ClarifyPrompt into its mcp.servers config and
the agent picks up all 23 tools as native capabilities, callable from
any channel (web chat, terminal, Telegram, Slack, etc.). AI Butler
discovers tools dynamically via MCP's tools/list, so adding /
removing tools in ClarifyPrompt updates the agent's surface
automatically โ no config edits needed on the butler side.
Edit ~/.aibutler/config.yaml:
configurations:
mcp:
servers:
- name: clarifyprompt
command: clarifyprompt-mcp
env:
LLM_API_URL: "http://localhost:11434/v1"
LLM_MODEL: "qwen3-vl:8b"Restart AI Butler. The boot log confirms the tools are wired in:

The agent enumerates the full surface on request โ every tool prefixed
with clarifyprompt.:

๐ธ Screenshots above are from a 1.2-era integration (11 tools). Current
1.6.xexposes 23 tools โoptimize_prompt,clarify_with_user,ground_prompt,critique_prompt,compose_prompt, plus the management / inspection / memory tools (memory_search,memory_remember,memory_forget,memory_list_facts, knowledge-pack tools, traces, custom platforms, etc.). AI Butler picks them up automatically via the MCPtools/listdiscovery; no config changes needed.
Drive the Context Engine end-to-end
You can preview what the engine would gather (without running the
optimization) using inspect_context:

Then run the actual optimizer for any of the 60+ supported platforms:

Every optimization gets a single JSONL line in
~/.clarifyprompt/traces/YYYY-MM-DD.jsonl โ strictly local, never
uploaded. The list_traces tool turns that into a queryable summary
with replay support via get_trace:

The full integration walkthrough โ including all 11 tools driven from chat, configuration options, and natural-language usage examples โ is in the AI Butler docs: Integrate an MCP Server.
Configuration & the compose panel
Everything you need to run the full pipeline and (in supporting hosts) see the interactive result panel.
The model that does the work
ClarifyPrompt calls one OpenAI-compatible or Anthropic endpoint, set via env:
LLM_API_URL=http://localhost:11434/v1 # Ollama shown; any OpenAI-compatible URL works
LLM_API_KEY= # empty for local Ollama; a key for hosted providers
LLM_MODEL=qwen2.5:7b # the model that rewrites and judgesOutput is model-dependent โ the structure (a platform's syntax, the critique dimensions) is consistent across models; the exact wording and scores vary by model.
Run the whole pipeline in one call
compose_prompt({
"prompt": "write a product update email about our new dashboard",
"platform": "claude", // target a platform's tuning; omit for portable, neutral output
"pre_clarify": "never", // "auto" | "always" | "never"
"post_critique": true // adds the LLM-as-judge pass (verdict + the six score dimensions)
})Returns { optimization: { id, sessionId, originalPrompt, platform, โฆ }, finalPrompt, critique: { verdict, overallScore, dimensions[] }, stages[] }.
Targeting a platform
platform: (on optimize_prompt or compose_prompt) selects a platform's tuning โ e.g. midjourney, dall-e, sora, suno, claude, chatgpt, cursor (58 built-in + any you register). For chat, the platforms are the models (claude, chatgpt, gemini, llama, deepseek, โฆ). Text categories (chat/document/code) produce portable, platform-neutral output when you omit platform โ name one to opt into that platform's specific idioms.
Per-stage models (e.g. a stronger model as the critic)
compose_prompt can route each stage to a different model name:
compose_prompt({
"prompt": "โฆ",
"optimize_model": "qwen2.5:14b", // rewrite on a cheaper model
"critique_model": "gpt-4o", // judge on a stronger one
"clarify_model": "qwen2.5:7b"
})Important: all per-stage names hit the same
LLM_API_URLโ the override changes only the model name, not the endpoint. So withLLM_API_URLpointed at Ollama, every per-stage model must be an Ollama model; pointed at OpenAI, every model must be an OpenAI model. To genuinely mix providers (e.g. a local model to optimize +gpt-4oto critique), pointLLM_API_URLat a gateway that serves both names โ OpenRouter, a LiteLLM proxy, or any OpenAI-compatible router. (optimize_prompton its own has no per-call model override; it usesLLM_MODEL.)
The interactive compose panel (MCP Apps)
In hosts that support the io.modelcontextprotocol/ui extension โ Claude Desktop, Cursor, VS Code, โฆ โ compose_prompt renders a live panel next to the result: your original prompt, the optimized output (with a show changes diff toggle), a for <platform> / general purpose badge, the six critique score bars, and Accept / Revise actions. Accept records the outcome via save_outcome (feeding the few-shot memory loop); Revise sends your feedback back into the chat. Hosts without the extension are unaffected โ they get the same text + structuredContent result and no panel.
Supported Platforms (58+ built-in, unlimited custom)
Category | Platforms | Default |
Image (11) | Midjourney, DALL-E 3, Stable Diffusion, Flux, Ideogram, Leonardo AI, Adobe Firefly, Grok Aurora, Google Imagen 3, Recraft, Higgsfield | Midjourney |
Video (12) | Sora, Runway Gen-3, Pika Labs, Kling AI, Luma, Minimax/Hailuo, Google Veo 2, Wan, HeyGen, Synthesia, CogVideoX, Higgsfield | Runway |
Chat (9) | Claude, ChatGPT, Gemini, Llama, DeepSeek, Qwen, Kimi, GLM, Minimax | Claude |
Code (9) | Claude, ChatGPT, Cursor, GitHub Copilot, Windsurf, DeepSeek Coder, Qwen Coder, Codestral, Gemini | Claude |
Document (8) | Claude, ChatGPT, Gemini, Jasper, Copy.ai, Notion AI, Grammarly, Writesonic | Claude |
Voice (7) | ElevenLabs, OpenAI TTS, Fish Audio, Sesame, Google TTS, PlayHT, Kokoro | ElevenLabs |
Music (4) | Suno AI, Udio, Stable Audio, MusicGen | Suno |
Tools
optimize_prompt
The main tool. Optimizes a prompt for a specific AI platform.
{
"prompt": "a cat sitting on a windowsill",
"category": "image",
"platform": "midjourney",
"mode": "concise"
}All parameters except prompt are optional. When category and platform are omitted, ClarifyPrompt auto-detects them from the prompt content.
Three calling modes:
Mode | Example |
Zero-config |
|
Category only |
|
Fully explicit |
|
Parameters:
Parameter | Required | Description |
| Yes | The prompt to optimize |
| No |
|
| No | Platform ID (e.g. |
| No | Output style: |
| No | Set |
| No | Stitches related optimizations together so session memory can bias subsequent calls. Auto-generated when omitted. |
| No | Active file path โ infers language and shapes platform hints. |
| No | Explicit language override for the active file. |
| No | Short excerpt (โค2 KB) of the active file to ground the rewrite. |
| No | Working directory to scan for |
| No | Locale hint (e.g. |
| No | Pinned, always-applied user instructions (short core-memory block). |
| No | Include the resolved ContextBundle summary in the response. Default: |
| No | Skip the intent classifier LLM call (faster; loses intent signal). Default: |
Response (1.2.0):
{
"id": "opt_mo9vlg9i_foohjx",
"sessionId": "sess_mo9vlfn3_abc123",
"originalPrompt": "a dragon flying over a castle at sunset",
"optimizedPrompt": "a majestic dragon flying over a medieval castle at sunset --ar 16:9 --v 6.1 --style raw --q 2 --s 700",
"category": "image",
"platform": "midjourney",
"mode": "concise",
"modeSource": "analyzer",
"analysis": {
"category": "image",
"intent": "creative-media",
"recommendedMode": "detailed",
"confidence": "high",
"source": "llm"
},
"grounding": {
"sources": ["project-rules", "workspace-meta", "target-model", "platform-hints"],
"acceptedExamplesUsed": 0
},
"shape": {
"systemPromptBudget": "standard",
"maxTokens": 2048,
"temperature": 0.9
},
"metadata": {
"model": "qwen2.5:14b-instruct-q4_K_M",
"processingTimeMs": 3911,
"strategy": "ImageStrategy"
},
"detection": { "autoDetected": true, "detectedCategory": "image", "detectedPlatform": "midjourney", "confidence": "high" },
"intent": { "detected": "creative-media", "confidence": "high" }
}The canonical classification field is analysis. The detection and intent fields are deprecated aliases kept for 1.x back-compat; they will be removed in 2.x.
modeSource tells you how the final mode was decided (user if you passed one, analyzer if intent-driven, default if neither).
grounding.sources lists which Grounding Context sections contributed, in priority order. grounding.acceptedExamplesUsed tells you how many few-shot examples the engine pulled from save_outcome history.
shape tells you how the system prompt was sized for your target model.
clarify_with_user (new in 1.4.0)
Given an ambiguous draft prompt, returns 1โ3 targeted clarifying questions instead of guessing. Use it as a pre-stage before optimize_prompt when you can't tell whether the user's request will produce a good rewrite.
{
"prompt": "make it better",
"force": true
}Response:
{
"clarificationNeeded": true,
"reason": "Clarification recommended (analyzer confidence=low; intent=unknown; prompt is short (12 chars); caller passed force=true).",
"questions": [
{
"question": "What outcome do you want from this prompt โ what does success look like?",
"reasoning": "The draft is ambiguous on the goal/audience dimension; pinning this typically resolves most downstream ambiguity.",
"suggestedAnswer": "Make the email shorter, clearer, and more action-oriented.",
"options": ["Make it shorter", "Make it more formal", "Make it more persuasive"],
"dimension": "goal"
}
],
"analysis": { "category": "chat", "intent": "unknown", "confidence": "low" }
}suggestedAnswer is always populated โ the caller can accept it verbatim and keep moving. options is optional; UI clients can render it as quick-pick buttons. The dimension tag classifies which axis the question addresses.
Short-circuit: when the analyzer's confidence is high AND the prompt is non-trivially long, the tool returns clarificationNeeded: false with no LLM call beyond the analyzer โ so you can pipeline it in front of optimize_prompt without a latency tax on every call. Pass force: true to disable the short-circuit.
ground_prompt (new in 1.4.0)
Strict, retrieval-augmented variant of optimize_prompt. Caller-provided sources are pinned at the highest priority โ above project rules and pinned instructions โ so the rewrite is grounded in the material you provided rather than whatever the curator decides is relevant.
{
"prompt": "rewrite the launch announcement to match our voice",
"category": "document",
"platform": "claude",
"sources": [
{
"label": "Brand Voice Rules",
"body": "Tone: warm, plain-spoken, no jargon. Always lead with the user benefit. Avoid 'leverage', 'synergy', 'robust'. Max sentence length: 18 words.",
"kind": "rules"
},
{
"label": "Launch Draft",
"body": "Today we're launching FlowSync Pro โ a tool to leverage AI synergy for robust team coordination...",
"kind": "draft"
}
]
}Returns the same shape as optimize_prompt plus usedSources (which sources actually landed in the curated grounding) and droppedSources (sources that were empty or dropped). Sources appear in the trace as user-source:0, user-source:1, etc.
Strict mode: zero non-empty sources โ error, not silent fall-through. Per-source body cap is 4000 chars so a single huge paste can't dominate the budget.
critique_prompt (new in 1.4.0)
LLM-as-judge. Scores a candidate prompt 0โ10 across 6 default dimensions and (when below threshold) returns an improved rewrite.
{
"prompt": "make it good",
"revise_threshold": 7
}Response:
{
"overallScore": 2.0,
"verdict": "reject",
"summary": "Reject โ substantial rewrite required.",
"dimensions": [
{ "name": "clarity", "score": 1, "rationale": "...", "suggestions": ["Specify what 'it' refers to", "..."] },
{ "name": "specificity", "score": 0, "rationale": "...", "suggestions": [...] },
{ "name": "intent_alignment", "score": 3, "rationale": "...", "suggestions": [...] },
{ "name": "format_fitness", "score": 2, "rationale": "...", "suggestions": [...] },
{ "name": "length_appropriateness", "score": 1, "rationale": "...", "suggestions": [...] },
{ "name": "plain_language", "score": 4, "rationale": "...", "suggestions": [...] }
],
"improvedPrompt": "Improve the README's getting-started section: shorten...",
"improvements": ["Specified the artifact (README's getting-started section)", "Added concrete success criteria", "..."],
"judgeModel": "qwen2.5-coder:7b-instruct-q4_K_M"
}Parameters:
Parameter | Default | Description |
| โ | Candidate prompt to score. |
| โ | When critiquing an optimized version, the user's original ask. Used for the |
| 6 defaults | Custom dimensions: |
|
| Overall score below this triggers the rewrite pass. |
|
| Skip the rewrite pass entirely (faster; just returns scores). |
Sanity-check: if the judge inflates overall more than 2.5 points above the per-dimension mean, the engine corrects it.
compose_prompt (new in 1.4.0)
The canonical pipeline. One call runs clarify โ ground/optimize โ critique โ optional auto-revise.
{
"prompt": "Write a TypeScript function that takes an array of email strings and returns only those that match RFC 5322 syntax. Include unit tests using Vitest with at least 6 test cases.",
"pre_clarify": "auto",
"post_critique": true,
"auto_revise": true
}Response (truncated):
{
"stages": [
{ "name": "clarify", "ranAt": "...", "durationMs": 541, "summary": "no clarification needed (short-circuit)" },
{ "name": "optimize", "ranAt": "...", "durationMs": 3128, "summary": "5 grounding source(s) selected" },
{ "name": "critique", "ranAt": "...", "durationMs": 3422, "summary": "verdict=accept, score=8.4" }
],
"finalPrompt": "Write a TypeScript function `validateEmails(emails: string[]): string[]` that...",
"clarificationRequired": false,
"clarification": { "clarificationNeeded": false, ... },
"optimization": { "id": "opt_...", "optimizedPrompt": "...", ... },
"critique": { "overallScore": 8.4, "verdict": "accept", ... }
}finalPrompt is what you should send downstream. It equals optimization.optimizedPrompt (or grounding.optimizedPrompt) unless auto_revise: true AND the critique verdict isn't accept AND there's an improvedPrompt โ in which case finalPrompt is the rewrite and revised: true.
Branching:
Inputs | Path |
no |
|
non-empty |
|
| clarify runs; short-circuits without surfacing questions on confident prompts |
| clarify always runs and STOPS the chain if questions surface |
| skip clarify entirely |
| critique runs after optimize/ground |
| when verdict !== |
Hard stop: if clarify surfaces questions (only happens when pre_clarify: "always", or auto on a low-confidence prompt), the chain stops and returns clarificationRequired: true. Caller answers the questions, edits the prompt to incorporate the answers, and re-calls (typically with pre_clarify: "never" to skip the second clarify pass).
1.6.0 additions
max_iterations(1โ5, default 1) โ agentic revise loop. Withauto_revise: trueANDpost_critique: true, each iteration'simprovedPromptfeeds back through optimize+critique until verdict=accept, no improvedPrompt is available, or the cap is reached. Pre-clarify only fires once. Response includesiterationsshowing how many ran.clarify_model/optimize_model/critique_modelโ per-stage model routing. Each overrides the envLLM_MODELfor that stage. Use it to route compose across cost/quality tiers โ e.g. cheap-local clarify, frontier-hosted optimize, cheap critique:{ "prompt": "...", "post_critique": true, "clarify_model": "qwen2.5-coder:7b-instruct-q4_K_M", "optimize_model": "claude-sonnet-5", "critique_model": "gpt-4o-mini" }optimization.metadata.modelandcritique.judgeModelin the response reflect the actual model that ran each stage.
inspect_context (new in 1.2.0)
Preview the ContextBundle ClarifyPrompt would assemble for a given prompt โ workspace rules, frameworks, target-model capabilities, resolved intent, and session history โ without running the full optimization. Useful for debugging why an optimization turned out the way it did.
{
"prompt": "Write an email to finance explaining the Q2 spend variance",
"category": "document",
"cwd": "/path/to/your/project"
}Returns the full ContextBundle as JSON.
list_traces (new in 1.2.0)
Summary list of recent optimization traces captured by the local tracer (when CLARIFYPROMPT_TRACE=local, the default).
{ "day": "2026-04-22", "limit": 50 }Returns trace IDs, inputs previews, resolved intents, target families, and latencies โ never the full system prompt (use get_trace for that). Omit day to get the most recent day with data.
get_trace (new in 1.2.0)
Fetch the full trace for a single optimization by ID, including the exact system prompt, bundle summary, and output.
{ "id": "opt_xxx", "lookback_days": 7 }save_outcome (new in 1.2.0)
Tell ClarifyPrompt whether a past optimization was accepted, edited, or rejected. Accepted outputs become few-shot examples for similar future prompts in the same session. In 1.3+ this will also feed the persistent memory layer. The IDE / agent / caller is expected to invoke this after the user acts on the optimization.
{
"optimization_id": "opt_xxx",
"session_id": "sess_yyy",
"verdict": "accepted",
"diff": "optional: the user's edited version or a patch"
}list_categories
Lists all 7 categories with platform counts (built-in and custom) and defaults.
list_platforms
Lists available platforms for a given category, including custom registered platforms. Shows which is the default and whether custom instructions are configured.
list_modes
Lists all 7 output modes with descriptions.
register_platform
Register a new custom AI platform for prompt optimization.
{
"id": "my-llm",
"category": "chat",
"label": "My Custom LLM",
"description": "Internal fine-tuned model",
"syntax_hints": ["JSON mode", "max 2000 tokens"],
"instructions": "Always use structured output format",
"instructions_file": "my-llm.md"
}Parameter | Required | Description |
| Yes | Unique ID (lowercase, alphanumeric with hyphens) |
| Yes | Category this platform belongs to |
| Yes | Human-readable platform name |
| Yes | Short description |
| No | Platform-specific syntax hints |
| No | Inline optimization instructions |
| No | Path to a |
update_platform
Update a custom platform or add instruction overrides to a built-in platform.
For built-in platforms (e.g. Midjourney, Claude), you can add custom instructions and extra syntax hints without modifying the originals:
{
"id": "midjourney",
"category": "image",
"instructions": "Always use --v 6.1, prefer --style raw",
"syntax_hints_append": ["--no plants", "--tile for patterns"]
}For custom platforms, all fields can be updated.
unregister_platform
Remove a custom platform or clear instruction overrides from a built-in platform.
{
"id": "my-llm",
"category": "chat"
}For built-in platforms, use remove_override_only: true to clear your custom instructions without affecting the platform itself.
Custom Platforms & Instructions
ClarifyPrompt supports registering custom platforms and providing optimization instructions โ similar to how .cursorrules or CLAUDE.md guide AI behavior.
How It Works
Register a custom platform via
register_platformProvide instructions inline or as a
.mdfileOptimize prompts targeting your custom platform โ instructions are injected into the optimization pipeline
Instruction Files
Instructions can be provided as markdown files stored at ~/.clarifyprompt/instructions/:
~/.clarifyprompt/
config.json # custom platforms + overrides
instructions/
my-llm.md # instructions for custom platform
midjourney-overrides.md # extra instructions for built-in platformExample instruction file (my-llm.md):
# My Custom LLM Instructions
## Response Format
- Always output valid JSON
- Include a "reasoning" field before the answer
## Constraints
- Max 2000 tokens
- Temperature should be set low (0.1-0.3) for factual queries
## Style
- Be concise and technical
- Avoid filler phrasesOverride Built-in Platforms
You can add custom instructions to any of the 58 built-in platforms using update_platform. This lets you customize how prompts are optimized for platforms like Midjourney, Claude, or Sora without modifying the defaults.
Config Directory
The config directory defaults to ~/.clarifyprompt/ and can be changed via the CLARIFYPROMPT_CONFIG_DIR environment variable. Custom platforms and overrides persist across server restarts.
Knowledge packs
A knowledge pack is a markdown document with optional YAML frontmatter that teaches ClarifyPrompt something durable โ a brand voice, a coding convention, a compliance regime, a domain-specific prompting pattern. Packs get chunked at H2 boundaries, embedded, and made available for semantic retrieval in every subsequent optimize_prompt / compose_prompt call. The Context Curator scores their chunks alongside workspace signals, instruction files, and grounding sources, then fits the highest-utility selection into the target model's remaining token window.
Bundled starter packs
Four packs ship in every npm tarball under packs/:
Pack | What it teaches |
Anthropic's public-facing tone, register, and word choices | |
Higgsfield model selection, prompt structure, camera moves, Soul ID workflow | |
Server-first Next.js 14 App Router conventions | |
Sarbanes-Oxley 404 guardrails for AI-assisted financial work |
Loading a pack
load_knowledge_pack({
source: "https://raw.githubusercontent.com/LumabyteCo/clarifyprompt-mcp/main/packs/nextjs-14-best-practices.md",
scope: "user"
})Or load locally โ by absolute path, or relative to the installed package:
load_knowledge_pack({ source: "/path/to/my-team-style-guide.md", scope: "project" })
load_knowledge_pack({ source: "./node_modules/clarifyprompt-mcp/packs/sox-compliance.md", scope: "session" })Scopes
userโ persisted in$CLARIFYPROMPT_HOMEand available across every project on this machine.projectโ persisted, but scoped to the current working tree's identity (project-id derived fromcwd+ git remote when present).sessionโ scoped to the current MCP session; not retrieved after the server restarts.
Packs of all three scopes are scored together at retrieval time; the curator decides which chunks survive the token budget.
Authoring + contributing
Pack authoring rules (frontmatter schema, chunk-boundary guidance, the quality bar that gets PRs merged) live in packs/README.md. Contributions land via PR against this repo. Apache-2.0 unless dual-licensed in frontmatter.
Why packs live in the engine repo (and not a separate registry)
Briefly: they used to. From 1.3 through 1.6.3 there was a separate LumabyteCo/clarifyprompt-packs registry. In 1.6.4 it was archived and consolidated back into clarifyprompt-mcp/packs/ because the dual-repo discipline was paying maintenance cost for an external-contributor audience that hadn't materialized โ and the higgsfield-creative-handbook pack shipped in 1.6.2 without ever making it to the registry, exhibit A of the drift. The split makes sense once there's a real forcing function (community PR queue, pack count >20, divergent licensing/governance). Until then the single-repo model keeps the source of truth singular and unambiguous.
LLM Configuration
ClarifyPrompt uses an LLM to optimize prompts. It works with any OpenAI-compatible API and with the Anthropic API directly.
Environment Variables
Variable | Required | Description |
| Yes | API endpoint URL |
| Depends | API key (not needed for local Ollama) |
| Yes | Model name/ID |
| No | Per-call LLM request timeout in ms. Default |
| No | (1.12.1+) Reasoning level for thinking-channel models (gpt-oss, glm, |
| No | Canonical (1.2.0+) root for everything ClarifyPrompt writes โ custom platforms, instruction |
| No |
|
| No | (1.3.0+) Embedding endpoint for memory + knowledge-pack retrieval. Any OpenAI-compatible |
| No | (1.3.0+) Embedding API key. Defaults to |
| No | (1.3.0+) Default: |
| No | (1.3.0+) Embedding output dimension. Default: |
| No | Optional web-search enrichment provider when |
| No | API key for the configured |
| No | Search endpoint URL. Only needed for self-hosted SearXNG (point at your instance). |
| No | Set to |
| No | Legacy alias for |
| No | Legacy alias for |
Provider Examples
Ollama (local, free):
LLM_API_URL=http://localhost:11434/v1
LLM_MODEL=qwen2.5:7bOllama โ cloud models via local passthrough (recommended):
If your local Ollama is signed in to Ollama Cloud, any :cloud model routes through it transparently โ same URL, no separate API key. The capability table auto-detects reasoning / thinking variants (gpt-oss, kimi-k2-thinking, qwen3-thinking, deepseek-r1, etc.) and bumps maxTokens so they finish thinking and actually produce content.
LLM_API_URL=http://localhost:11434/v1
LLM_MODEL=gpt-oss:20b-cloud # or kimi-k2.6:cloud, qwen3-next:80b-cloud, glm-4.6:cloud, etc.Ollama โ direct cloud endpoint (no local install):
LLM_API_URL=https://ollama.com/v1
LLM_API_KEY=your-ollama-cloud-key
LLM_MODEL=qwen2.5:7bOpenAI:
LLM_API_URL=https://api.openai.com/v1
LLM_API_KEY=sk-...
LLM_MODEL=gpt-4oReasoning models (
gpt-5,o3,o4-mini) work too โ the client handles theirmax_completion_tokensandtemperaturerequirements automatically. They think extensively, so bumpLLM_TIMEOUT_MS(e.g.180000); the 30s default is often too short.
Anthropic Claude:
LLM_API_URL=https://api.anthropic.com/v1
LLM_API_KEY=sk-ant-...
LLM_MODEL=claude-sonnet-5Google Gemini:
LLM_API_URL=https://generativelanguage.googleapis.com/v1beta/openai
LLM_API_KEY=your-gemini-key
LLM_MODEL=gemini-flash-latestUse a model your key can access โ older ids (e.g.
gemini-2.0-flash,gemini-2.5-flash) return404 "no longer available to new users"on newer keys.gemini-flash-latesttracks the current flash model. (Note:gemini-2.5-flash-imageโ "Nano Banana" โ is an image model; it can't beLLM_MODEL, which must be a text model. Target it as an image platform instead.)
Groq:
LLM_API_URL=https://api.groq.com/openai/v1
LLM_API_KEY=gsk_...
LLM_MODEL=llama-3.3-70b-versatileDeepSeek:
LLM_API_URL=https://api.deepseek.com/v1
LLM_API_KEY=your-deepseek-key
LLM_MODEL=deepseek-chatOpenRouter (any model):
LLM_API_URL=https://openrouter.ai/api/v1
LLM_API_KEY=your-openrouter-key
LLM_MODEL=anthropic/claude-sonnet-4See .env.example for the full list of 20+ supported providers including Together AI, Fireworks, Mistral, xAI, Cohere, Perplexity, LM Studio, vLLM, LocalAI, Jan, GPT4All, and more.
Web Search (Optional)
Enable context enrichment by setting enrich_context: true in your optimize_prompt call. ClarifyPrompt will search the web for relevant context before optimizing.
Supported search providers:
Provider | Variable | URL |
Tavily (default) |
| |
Brave Search |
| |
Serper |
| |
SerpAPI |
| |
Exa |
| |
SearXNG (self-hosted) | โ |
SEARCH_PROVIDER=tavily
SEARCH_API_KEY=your-keyBefore and After
Image (Midjourney)
Before: "a cat sitting on a windowsill"
After: "a tabby cat sitting on a sunlit windowsill, warm golden hour
lighting, shallow depth of field, dust particles in light beams,
cozy interior background, shot on 35mm film, warm amber color
palette --ar 16:9 --v 6.1 --style raw --q 2"Video (Sora)
Before: "a timelapse of a city"
After: "Cinematic timelapse of a sprawling metropolitan skyline
transitioning from golden hour to blue hour to full night.
Camera slowly dollies forward from an elevated vantage point.
Light trails from traffic appear as the city illuminates.
Clouds move rapidly overhead. Duration: 10s.
Style: documentary cinematography, 4K."Code (Claude)
Before: "write a function to validate emails"
After: "Write a TypeScript function `validateEmail(input: string): boolean`
that validates email addresses against RFC 5322. Handle edge cases:
quoted local parts, IP address domains, internationalized domain
names. Return boolean, no exceptions. Include JSDoc with examples
of valid and invalid inputs. No external dependencies."Music (Suno)
Before: "compose a chill lo-fi beat for studying"
After: "Compose an instrumental chill lo-fi beat for studying.
[Tempo: medium] [Genre: lo-fi] [Length: 2 minutes]"Context Engine (1.2.0)
Every optimization runs through five integrated passes that flow one bundle of context end-to-end:
Analysis โ a single
analyzePrompt()LLM call producescategory,intent, andrecommendedModetogether so they can't disagree. Intent beats surface keywords when they conflict (e.g."validate emails"โcodenotdocument).Mode reconciliation โ explicit user
modewins; otherwise the analyzer's intent-derived recommendation applies;modeSourcein the response tells you which.Prompt shaping โ target-model capability signal drives
systemPromptBudget(compact for small local models, rich for 100K+ ctx models),maxTokens,temperature(intent-aware), and whether examples are included.Intent overlay โ a short overlay per intent (
production-code: demand error handling + tests;data-extract: demand strict schema;brand-voice: lead with tone; etc.) folded into the strategy's system prompt.Grounding Context โ a single priority-ordered block that merges user pinned instructions โ project rules โ active file โ session few-shot examples โ web search โ workspace metadata โ target-model hints โ custom platform instructions โ built-in syntax hints.
What's collected (ContextBundle)
Project โ first matching file from
CLAUDE.md,AGENTS.md,.cursorrules,.clinerules,clarify.md,.clarify/rules.md.package.jsonplus sibling manifests (pyproject.toml,Cargo.toml,go.mod,Gemfile,composer.json, โฆ) drive framework + language detection.File โ optional
file_path/file_language/file_excerptinputs.Session โ ring buffer (20 ops/session) of recent optimizations and outcomes. Accepted outputs get retrieved as few-shot examples for similar future prompts.
Target model โ the LLM doing the rewrite, matched against a capability table.
User โ locale, preferred mode, pinned instructions (highest-priority grounding).
Inspecting what the engine sees
Use the inspect_context tool to preview the full bundle without running an optimization. Same shape as optimize_prompt returns when include_bundle: true.
Extending context
Drop an AGENTS.md / clarify.md / CLAUDE.md at your project root. Next optimization picks it up automatically. To feed accepted outputs back into future rewrites, call save_outcome after the user acts on the result.
Tracing
$CLARIFYPROMPT_HOME/traces/YYYY-MM-DD.jsonlEvery optimization writes one JSONL line capturing {id, ts, sessionId, category, platform, mode, input, bundleSummary, systemPrompt, output, model, strategy, latencyMs, shape, groundingSources, error}. Use list_traces for summaries and get_trace for full records.
Privacy posture:
Traces are strictly local. No outbound network calls to any ClarifyPrompt-owned infrastructure.
Only calls out to the LLM endpoint you configured (
LLM_API_URL) and optional search provider (SEARCH_API_KEY).Disable tracing entirely with
CLARIFYPROMPT_TRACE=off.There is no telemetry in this release. When a telemetry option ships it will be opt-in, anonymous, and documented before the build includes it.
Known limitations & roadmap
Memory persistence (shipped)
The save_outcome + few-shot retrieval loop persists to SQLite + sqlite-vec under $CLARIFYPROMPT_HOME โ sessions, optimizations, outcomes, facts, and pack chunks all survive restarts. An in-memory ring buffer remains only as a same-session fast path. Session-scoped entries are keyed to their session id, so they're not retrieved by later sessions.
Intent quality scales with the model running the analyzer
The analyzer runs on the same LLM_MODEL that does the rewrite. In the integration battery:
Qwen 2.5 7B and 14B โ correct on every well-formed prompt tested.
Llama 3.2 3B โ occasionally over-commits on ambiguous prompts (e.g. tagged
"make it better"asbrand-voice/highwhenunknown/lowis the right answer). Larger models on the same prompt correctly returnedunknown/low.
Guidance: prefer a 7B+ local model (or any frontier hosted model) as LLM_MODEL. Latency-sensitive callers can set skip_intent_resolution: true to skip the analyzer; the engine falls back to user-hint category and default mode, losing intent-driven mode + overlay but keeping grounding + shape. The bundled eval harness (evals/, npm run eval) ships a public fixture set so you can score the analyzer against your own fixtures and detect regressions across model or classifier changes.
Recommended models
Score yourself with the bundled matrix runner: npm run matrix -- --models <a>,<b>,โฆ. A recent run (2026-06, the 30-fixture suite, pass threshold 0.85, score = mean fixture score):
Model | Where | Suite score | Notes |
| cloud ยท reasoning | 99% | Top overall. Thinking-budget handled automatically (1.12.1). |
| cloud ยท reasoning | 98% | OpenAI open-weights; |
| local | 97% | A small local model handles nearly the whole suite โ the validated local-first default. |
| cloud | 92% | Solid all-rounder. |
The handful of sub-threshold fixtures in any run are the subjective analyzer-* intent/mode classification and grounding-phrasing cases (content-variance across models), not pipeline errors โ the deterministic pipeline fixtures (clarify, ground, critique, compose, memory, packs) pass on every model. The default stays local-first (qwen2.5:7b); reach for a frontier/reasoning model when you want the last few points of intent accuracy. Reasoning models (gpt-oss, glm, *-thinking, โฆ) are auto-tuned (a max_tokens floor + reasoning_effort) so they don't return empty content โ see LLM_REASONING_EFFORT.
Capability table is not exhaustive
Entries today: Claude, GPT-4/o-series, Gemini, Grok, DeepSeek (chat + reasoning), Qwen, Llama, Mistral/Codestral, Mixtral, Gemma, Phi, Cohere Command, Aya, Kimi, GLM, Minimax, GPT-OSS, Yi, Nemotron. Unknown models fall back to capabilities: {} and standard prompt-shape โ still functional, just without model-aware sizing. Adding entries is a data-only edit to src/engine/context/targetModelSignals.ts.
Reasoning / chain-of-thought models
Supported as a first-class case. The engine auto-detects reasoners at family level (o1/o3/o4, deepseek-reasoner, gpt-oss) and at variant level (anything whose ID matches /\b(thinking|reasoner|reasoning)\b/ or /\br[12]\b/: kimi-k2-thinking:cloud, qwen3-thinking:72b, qwen-r1-distill, etc.). For these, maxTokens is automatically bumped to โฅ 8192 so the model has room to think AND produce content. The reasoning field is never surfaced as the optimized prompt โ only content is.
Architecture
clarifyprompt-mcp/
src/
index.ts MCP server entry point (23 tools, 6 resources: 1 static + 4 templates + 1 ui panel)
apps/ MCP Apps compose panel (panel.html template + panel.ts, bundled at build time)
engine/
config/
categories.ts CategoryConfig type + CATEGORIES const (loaded from YAML in 1.5.0)
platformLoader.ts (1.5.0) YAML pack loader โ reads packs/platforms/*.yaml at boot
paths.ts Unified $CLARIFYPROMPT_HOME resolver (1.2.0)
persistence.ts ConfigStore โ JSON config + .md file loading
registry.ts PlatformRegistry โ merges built-in + custom
context/ Context Engine (1.2.0)
types.ts ContextBundle + signal types + AnalysisSignal
projectSignals.ts CLAUDE.md / AGENTS.md / .cursorrules / manifests scan
fileSignals.ts Active-file path + language + excerpt
sessionSignals.ts In-memory per-session ring buffer + outcome retrieval
targetModelSignals.ts Model โ capabilities mapping
promptAnalyzer.ts Unified analyzer: category + intent + recommendedMode
gitSignals.ts (1.6.0) branch + HEAD + dirty + recent commits
environmentSignals.ts (1.6.0) nowIso + weekday + timezone
bundle.ts Bundle orchestrator
trace/ Local tracing (1.2.0)
types.ts TraceEntry schema (shape, groundingSources, error)
writer.ts JSONL + OTel-stub writer, reader, lookup
memory/ Persistent memory + knowledge packs (1.3.0)
store.ts SQLite + sqlite-vec; bi-temporal facts, outcomes, packs
packs.ts Knowledge-pack loader (local / URL / inline)
reflection.ts LLM fact extraction on save_outcome
llm/client.ts Multi-provider LLM client (OpenAI + Anthropic)
search/client.ts Web search (6 providers; results merge into Grounding Context)
optimization/
engine.ts Core orchestrator โ analyzer, shape, grounding, retrieval, trace
curator.ts Token-budget grounding curator (1.3.0)
groundingContext.ts Priority-ordered context assembly + mode/shape helpers
types.ts OptimizationContext + result shape (UserProvidedSource)
strategies/
base.ts Bundle-aware base strategy (intent overlay + shape-aware sizing)
chat.ts 9 platforms
image.ts 12 platforms
video.ts 11 platforms
voice.ts 7 platforms
music.ts 4 platforms
code.ts 9 platforms
document.ts 8 platforms
clarification/clarify.ts (1.4.0) clarify_with_user โ targeted questions w/ defaults
grounding/ground.ts (1.4.0) ground_prompt โ strict caller-provided grounding
critique/critique.ts (1.4.0) critique_prompt โ LLM-as-judge + optional rewrite
composition/compose.ts (1.4.0) compose_prompt โ canonical clarifyโground/optโcritique pipeline
evals/ Eval harness v0 (1.3.0; setup: multi-call in 1.5.0)
run.mjs YAML fixtures โ MCP server โ scored HTML report
fixtures/*.yaml 33 deterministic fixtures
schema.json Fixture schema
scripts/build-panel.mjs (1.14.0) bundles the MCP Apps panel into dist/apps/
packs/ Knowledge packs + platform packs (single source of truth, 1.6.4+)
README.md Pack authoring guide (frontmatter, chunks, quality bar)
*.md Knowledge packs โ 4 bundled, community-contributable via PR
platforms/*.yaml (1.5.0) built-in AI platform declarations โ 7 files, 58 platforms
docs/adoption/ (1.5.0) launch-post drafts + catalog submission specsDocker
docker build -t clarifyprompt-mcp .
docker run -e LLM_API_URL=http://host.docker.internal:11434/v1 -e LLM_MODEL=qwen2.5:7b clarifyprompt-mcpDevelopment
git clone https://github.com/LumabyteCo/clarifyprompt-mcp.git
cd clarifyprompt-mcp
npm install
npm run buildTest with MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsSet environment variables in the Inspector's "Environment Variables" section before connecting.
Tests + evals
Command | What it does |
| Day-1 integration battery (intent + grounding + shape) |
| Day-2 memory + curator + reflection battery |
| Reasoning-model coverage (chain-of-thought maxTokens bump) |
| MCP-wire smoke test (server boots, tools list, initialize round-trips) |
| All four batteries in sequence |
| Run the 20 deterministic eval fixtures + render |
| Run only fixtures matching |
| Exit-code-only output (CI-friendly) |
Eval harness details, fixture format, and multi-model matrix instructions: evals/README.md.
CI / Quality gates
The repo ships a GitHub Actions workflow (.github/workflows/ci.yml) with five jobs:
Job | Runs on | What it gates |
| every push + PR | Typecheck + build + boot smoke-test on Node 18/20/22 across Linux + macOS |
| every push + PR | git-grep for known API-key prefixes in tracked files |
| every push + PR (opt-in) |
|
| every push + PR |
|
| tag pushes only |
|
To enable evals as a release gate on your fork:
Repo โ Settings โ Secrets and variables โ Actions โ New repository secret
Name:
OPENAI_API_KEYยท Value: an OpenAI API key with access togpt-4o-miniPush or re-run any workflow
Cost: ~$0.005 per CI run (17 active fixtures ร ~1500 input tokens ร ~600 output tokens at gpt-4o-mini pricing). The eval harness's HTML report is uploaded as a build artifact (30-day retention) so you can inspect any failure without re-running locally.
To enable npm-publish on tag pushes: add an NPM_TOKEN secret with a Granular Access Token scoped to clarifyprompt-mcp (bypass-2FA enabled). Same Settings flow.
License
Available Tools
23 toolsclarify_with_userA
Given an ambiguous draft prompt, return 1โ3 targeted clarifying questions instead of guessing. Each question carries a suggested_answer you can accept verbatim to keep moving, an optional 2โ4 quick-pick options list, and a dimension tag (audience/scope/format/length/tone/constraints/goal/platform). When the analyzer is highly confident AND the prompt is non-trivially long, the tool short-circuits with clarificationNeeded: false so callers can pipeline this in front of optimize_prompt without paying a latency tax on every call. Pass force: true to always generate questions.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The draft prompt the user is unsure about. | |
| category | No | Category hint. Will skip questions about category/platform if you pass it. | |
| cwd | No | Working directory to pull workspace rules (CLAUDE.md / AGENTS.md / .cursorrules) from. Defaults to server cwd. | |
| file_path | No | Active file path โ informs the clarifier's defaults. | |
| file_language | No | Explicit language override for the active file. | |
| file_excerpt | No | Short excerpt of the active file to ground the questions. | |
| user_locale | No | ||
| force | No | Always generate questions even when the analyzer is highly confident. Useful for UIs that want to surface clarification on every call. | |
| max_questions | No | Cap on returned questions. Default 3, hard max 5. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the burden of behavioral disclosure. It explains the short-circuit behavior (clarificationNeeded: false), the structure of each question (suggested_answer, options, dimension), and the effect of the force flag. It also notes that passing a category skips questions about category/platform. This is comprehensive for a non-destructive tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is thorough but not overly verbose. It front-loads the core purpose and then expands on behavior and structure. Every sentence contributes useful information. Could be slightly more compact, but it remains efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 9 parameters (1 required), high schema coverage, and no output schema, the description provides complete context. It explains the tool's behavior, response format, short-circuit logic, and ties to sibling tools (optimize_prompt). No critical gaps are present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 89%, so the schema already documents most parameters. The description adds value by explaining the structure of the generated questions (suggested_answer, options, dimension) and the effect of force: true. It also clarifies how category can skip certain questions. These details enhance understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Given an ambiguous draft prompt, return 1โ3 targeted clarifying questions instead of guessing.' It specifies the verb (return), resource (clarifying questions), and distinguishes from alternative behaviors (short-circuiting). This is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit when-to-use and when-not-to-use guidance: it explains the short-circuit behavior when the analyzer is highly confident and the prompt is non-trivially long, and mentions pipelining in front of optimize_prompt. It also describes the force parameter for overriding the short-circuit. This clearly differentiates usage contexts.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compose_promptA
Run the canonical ClarifyPrompt pipeline in ONE call: clarify (optional pre-stage) โ ground OR optimize (core) โ critique (optional post-stage) โ optional auto-revise. Use this when you want the four-tool happy path without orchestrating five round-trips. Short-circuits if pre_clarify surfaces questions โ caller answers and re-calls. When sources is non-empty the chain takes the strict ground_prompt branch; otherwise it goes through optimize_prompt. When auto_revise is true and critique returns a non-accept verdict with an improved rewrite, final_prompt is the rewrite. The stages array is a per-call audit log so callers can see exactly what ran.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The prompt to compose. | |
| pre_clarify | No | 'auto' = run clarify only if analyzer confidence is low / prompt is short. 'always' = force clarify. 'never' = skip. When clarification questions surface, the chain stops; caller answers and re-calls. | auto |
| max_questions | No | ||
| sources | No | When non-empty, the chain takes the strict ground_prompt branch (caller-provided sources pinned at highest priority). | |
| post_critique | No | Run the critique judge against the optimized output. Adds ~3-5s on a local model. | |
| revise_threshold | No | ||
| critique_criteria | No | Override the default 5 critique criteria. | |
| auto_revise | No | When true AND post_critique is true AND verdict !== 'accept' AND there's an improvedPrompt: `final_prompt` becomes the rewritten version instead of the raw optimization. | |
| max_iterations | No | Max revise-loop iterations. With `auto_revise: true` AND `post_critique: true`, the engine can feed each iteration's improvedPrompt back through optimize+critique up to this cap. Stops early at verdict=accept or when there's no improvedPrompt. Default 1 (single-shot, no loop). Hard max 5 to prevent cost runaways. | |
| clarify_model | No | Override the LLM model for the clarify pre-stage. Default: env LLM_MODEL. Useful for per-stage cost/quality routing โ e.g. run clarify on a cheap model while critique runs on a frontier one. | |
| optimize_model | No | Override the LLM model for the optimize/ground core stage. | |
| critique_model | No | Override the LLM model for the critique judge AND rewrite. | |
| category | No | ||
| platform | No | ||
| mode | No | ||
| enrich_context | No | ||
| session_id | No | ||
| file_path | No | ||
| file_language | No | ||
| file_excerpt | No | ||
| cwd | No | ||
| user_locale | No | ||
| user_pinned_instructions | No | ||
| skip_intent_resolution | No | ||
| include_bundle | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It details the pipeline flow, short-circuit behavior, branch conditions, and auto-revise loop. It mentions stages as an audit log and cost limits (max_iterations). However, it lacks disclosure on potential side effects, auth needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single paragraph that front-loads the purpose and then explains behaviors. It is dense but efficient for the complexity. Could be improved with bullet points for scannability, but remains concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 25 parameters, 40% schema coverage, and no output schema, the description falls short. It does not describe the output structure (e.g., final_prompt, stages) nor error conditions. Many contextual parameters (session_id, file_path, etc.) are undocumented, leaving gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 40%, so the description must compensate. It adds value for core parameters (pre_clarify, sources, post_critique, auto_revise, max_iterations, model overrides) explaining their behavior. However, many parameters (category, platform, mode, file_path, etc.) are not described, relying solely on schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool runs the canonical ClarifyPrompt pipeline in one call, covering clarify, ground/optimize, critique, and auto-revise. It distinguishes from sibling tools by explicitly noting it replaces orchestrating five round-trips. The branching based on sources (ground vs optimize) is also specified.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use the tool: when wanting the four-tool happy path without orchestrating. It covers short-circuit behavior for pre_clarify, branching conditions, and auto-revise. However, it does not explicitly state when not to use it (e.g., for fine-grained control, use individual tools), though this is implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
critique_promptA
LLM-as-judge for a prompt. Scores it 0โ10 across 5 default dimensions (clarity, specificity, intent_alignment, format_fitness, length_appropriateness) โ or your own custom criteria โ and returns per-dimension rationale + concrete suggestions, an overall score, and a verdict (accept / revise / reject). When the score is below revise_threshold (default 7.0), the tool also returns an improvedPrompt you can use as a drop-in replacement. Use it pre-flight (is this prompt good enough for the expensive model?), postmortem (was the prompt the cause of a bad output?), or to A/B-pick the best of N optimization variants. Pass original_prompt when critiquing an optimized version so the judge can verify intent was preserved.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The candidate prompt to critique. | |
| original_prompt | No | If `prompt` is an optimized version, the user's original ask. Used for the intent_alignment dimension. | |
| category | No | ||
| cwd | No | ||
| file_path | No | ||
| file_language | No | ||
| file_excerpt | No | ||
| user_locale | No | ||
| criteria | No | Override the default 5 criteria. Up to ~8 dimensions; more bloats the judge call. | |
| revise_threshold | No | Overall score below this triggers the rewrite pass. Default 7.0. | |
| skip_rewrite | No | Skip the rewrite pass even when below threshold (faster; just returns scores). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses key behaviors: it returns per-dimension rationale, concrete suggestions, an overall score, and a verdict. It explains that when below 'revise_threshold' (default 7.0), it returns an 'improvedPrompt'. It also mentions custom criteria and skip_rewrite. It does not discuss side effects or costs, but for a critique tool the disclosure is thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core action and results, then explains use cases and special parameters. Each sentence adds value without redundancy. It is appropriately sized for the complexityโneither too terse nor verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 11 parameters and no output schema, the description covers the main function, return values (rationale, suggestions, score, verdict, improvedPrompt), and key optional parameters. It does not explain every parameter, but the core functionality is well-documented. The output structure is sufficiently described for an agent to understand what to expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 45%, so the description must add meaning. It does for key parameters: 'prompt' (candidate prompt), 'original_prompt' (intent preservation for optimized versions), 'criteria' (custom dimensions), 'revise_threshold', and 'skip_rewrite'. However, parameters like 'cwd', 'file_path', 'file_language', 'file_excerpt', and 'user_locale' are not explained in the description, leaving gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with 'LLM-as-judge for a prompt', clearly stating the tool's core purpose. It specifies it scores 0โ10 across dimensions, returns rationale, suggestions, overall score, and a verdict (accept/revise/reject). The name and verb 'critique' align, and the description distinguishes from siblings by mentioning pre-flight, postmortem, and A/B testing use cases.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use the tool: 'pre-flight', 'postmortem', or 'to A/B-pick the best of N optimization variants'. It also advises passing 'original_prompt' when critiquing an optimized version. However, it does not mention when not to use it or provide explicit alternatives among the sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explain_last_curationA
Render a human-readable explanation of the Context Curator's decisions for the most recent (or a specified) optimization. Shows every candidate that was considered, whether it was selected or rejected, why, and how many tokens it used against the budget. Use this when an output felt off and you want to understand which grounding sources the engine chose.
| Name | Required | Description | Default |
|---|---|---|---|
| optimization_id | No | Optional trace ID. If omitted, explains the most recent trace. | |
| lookback_days | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided. The description does not explicitly state that the tool is read-only or has no side effects, but it describes the output in detail (candidates, selections, reasons, token usage). For a read-only explanation tool, this is adequate but leaves some ambiguity about mutability.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences: the first states the main function, the second adds detail and a use case. It is front-loaded with no extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately explains the return content (candidates, selection status, reasons, token usage). Parameters are mostly covered, and the use case is clear. Minor omission: doesn't specify if the tool queries stored data or triggers a new analysis.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: 'optimization_id' has a clear description; 'lookback_days' is only described via constraints. The tool description explains the main purpose but does not elaborate on 'lookback_days' beyond the schema, so it partially compensates for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool renders a human-readable explanation of curation decisions, specifying the resource (Context Curator's decisions for an optimization) and action (render explanation). It distinguishes from siblings like 'get_trace' or 'inspect_context' by focusing on curation decisions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear scenario: 'Use this when an output felt off and you want to understand which grounding sources the engine chose.' It implies a debugging use case but does not explicitly list when not to use it or compare to alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_traceB
Fetch the full trace for an optimization ID, including system prompt + output. Looks back 7 days by default.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| lookback_days | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden for behavioral disclosure. It only reveals the default lookback period and that the trace includes system prompt and output. It does not mention whether the operation is read-only, error handling, rate limits, or permission requirements, leaving significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences, front-loading the primary action and content, then adding the temporal scope. No unnecessary words or repetitions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, fetch operation), the description provides enough context: what it returns (full trace, system prompt, output) and default behavior. However, it lacks details on return format or error handling, which are not critical but would improve completeness. Since there is no output schema, the description could be slightly more explicit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. It adds meaning by stating the 'id' is an optimization ID and the 'lookback_days' defaults to 7. However, it does not explain the exact format of the id or provide further context for the parameters beyond what the schema already conveys (e.g., exclusiveMinimum, maximum).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Fetch', the resource 'full trace for an optimization ID', and includes what it contains ('system prompt + output'). It also provides the default lookback period, which helps differentiate from sibling tools like list_traces.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives, such as list_traces or inspect_context. It does not mention prerequisites, exclusions, or scenarios where another tool would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ground_promptA
Optimize a prompt against EXPLICIT caller-provided grounding sources (a spec, a transcript excerpt, an RFC, an internal doc, etc.). Each source is pinned at the highest priority โ above project rules, above pinned instructions โ and tracked individually in the trace. Use this when you want the rewrite to cite specific material rather than letting the curator decide what's relevant. Requires at least one non-empty source; will error rather than silently fall through to optimize_prompt. Sources are capped at 4000 chars each so a single large paste can't dominate the budget.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The prompt to optimize. | |
| sources | Yes | Caller-provided grounding sources. Must be non-empty. | |
| category | No | ||
| platform | No | ||
| mode | No | ||
| cwd | No | ||
| file_path | No | ||
| file_language | No | ||
| file_excerpt | No | ||
| session_id | No | ||
| user_locale | No | ||
| user_pinned_instructions | No | ||
| enrich_context | No | ||
| skip_intent_resolution | No | ||
| include_bundle | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses key behaviors: sources are pinned at highest priority, tracked individually in trace, capped at 4000 chars, requires at least one non-empty source, and error behavior. While no annotations exist, it covers most relevant aspects for decision-making.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Every sentence is purposeful: states purpose, priority, usage guidance, constraints, and error behavior. No redundant or filler content. Well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 15 params and no output schema or annotations, the description covers core functionality, usage scenario, and important constraints. Some optional params are left to schema descriptions, but the essential context for selection and invocation is present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds some context beyond the schema (e.g., priority over project rules, error behavior), but schema coverage is only 13%, and many optional parameters remain unexplained. The description compensates partially for the required params but not fully for all 15.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool optimizes a prompt against explicit grounding sources, distinguishes it from optimize_prompt by mentioning error behavior and priority, and provides specific examples of sources (spec, transcript, RFC, etc.).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly tells when to use this tool ('when you want the rewrite to cite specific material') and when not to ('will error rather than silently fall through to optimize_prompt'), providing clear alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_contextA
Preview the ContextBundle (workspace rules, frameworks, target-model capabilities, resolved analysis, session history) without running optimization. Returns the same bundle that optimize_prompt would assemble.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| category | No | ||
| cwd | No | ||
| file_path | No | ||
| file_language | No | ||
| file_excerpt | No | ||
| session_id | No | ||
| skip_intent_resolution | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Given that no annotations are provided, the description carries the full burden. It discloses that the tool is non-destructive ('without running optimization') and what it returns, which is sufficient for a preview operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long with no superfluous information. It front-loads the core action and provides clear, efficient context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 8 parameters, no output schema, and no annotations, the description is too brief. It lacks details on parameter usage, output format, and behavioral edge cases, making it insufficient for complex calls.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not explain any of the 8 parameters despite 0% schema description coverage. It adds no value over the schema, leaving the agent to infer meaning from parameter names alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Preview' and identifies the resource 'ContextBundle' with details on its contents. It explicitly distinguishes itself from the sibling tool 'optimize_prompt' by noting that it runs without optimization.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states it returns the same bundle as optimize_prompt would assemble, implying it is for previewing. However, it does not explicitly state when to use this over alternatives or provide exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_categoriesA
List all available prompt optimization categories with platform counts including custom platforms
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the burden of behavioral disclosure. It accurately implies a safe read operation but omits details such as ordering or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no extraneous words, efficiently conveying the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity (no parameters, no output schema), the description is largely complete. However, it could mention the read-only nature for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With zero parameters, the baseline is 4. The description adds no parameter info because none exist, but it implies output structure without an output schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists prompt optimization categories with platform counts, using specific language that distinguishes it from sibling tools like list_platforms or list_modes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives; no context or exclusion criteria are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modesA
List available output modes for prompt optimization
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It clearly indicates a read-only listing operation without side effects, which is adequate for a simple list tool. However, it could mention if any authentication or context requirements exist, but none are needed here.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no wasted words, front-loaded with the action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters and no output schema, the description fully captures what it does. It is complete for a simple list operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, and schema coverage is 100%. Baseline for 0 parameters is 4. The description does not need to add parameter info.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists available output modes for prompt optimization, using specific verb and resource. It distinguishes from siblings like list_categories and list_platforms by specifying 'for prompt optimization'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like list_categories or list_packs. Usage is impliedโwhen you need output modes for prompt optimizationโbut no exclusions or comparisons are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_packsB
List knowledge packs currently loaded in the persistent memory store.
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Filter by scope (e.g. 'user', 'project:myapp'). Omit to list all. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden for behavioral disclosure. It only states the read operation ('list') but lacks details on permissions, rate limits, side effects, or result format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of 10 words, front-loaded with the action and resource, containing zero superfluous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one optional parameter and no output schema, the description minimally covers the tool's purpose. However, it lacks usage guidance and behavioral details, leaving gaps for effective invocation among 22 siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear description of the 'scope' parameter including examples. The tool description adds the context 'currently loaded' but does not further enrich parameter semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List knowledge packs currently loaded in the persistent memory store,' with a specific verb and resource. It is distinct from siblings like load_knowledge_pack or unload_pack, but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as memory_list_facts or list_categories. The description provides no context for selecting this tool over others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_platformsB
List available platforms for a category, including custom registered platforms.
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | Category to list platforms for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds that custom registered platforms are included, which is a behavioral detail beyond the bare function. But without annotations, more details like auth requirements or rate limits are missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, efficient, front-loaded with the purpose. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one parameter and no output schema, the description is fairly complete. It covers what and scope. Missing return format but acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description adds no extra meaning beyond what the schema already provides for the category parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it lists platforms for a category, including custom ones. Verb 'list' and resource 'platforms' are specific. However, it does not explicitly differentiate from sibling list_categories, but context makes it clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives like register_platform or list_categories. Lacks usage context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tracesA
List recent optimization traces from the local tracer. Summary only; use get_trace for full records.
| Name | Required | Description | Default |
|---|---|---|---|
| day | No | UTC day YYYY-MM-DD; defaults to the most recent day with data | |
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description alone must convey behavioral traits. It notes 'recent' (though undefined) and 'from the local tracer,' but does not disclose ordering, pagination behavior, or whether the operation is read-only. The suggestion to use get_trace for full records adds some context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the primary purpose and then usage guidance. Every sentence adds value without redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with two optional parameters and no output schema, the description covers the main purpose and links to a more detailed sibling. It could be improved by clarifying what 'recent' means, but overall it's adequately complete given the tool's low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not add any meaning beyond the input schema. Schema coverage is 50% (only 'day' has a description). The parameter 'limit' lacks a description in both schema and tool description, leaving its purpose and constraints unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'List recent optimization traces' (specific verb+resource) and distinguishes from sibling 'get_trace' by noting 'Summary only; use get_trace for full records.' This explicitly differentiates the tool's purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description provides clear guidance to use 'get_trace' for full records, indicating when to use this tool vs. an alternative. However, it does not specify when not to use this tool (e.g., if more than recent data is needed) or other contextual triggers.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
load_knowledge_packA
Load a knowledge pack โ a markdown document with optional YAML frontmatter โ into the persistent memory store. The pack is chunked by heading, each chunk embedded, and made available for semantic retrieval during subsequent optimize_prompt calls. Packs can come from a local file path, an HTTPS URL, or be passed inline as raw markdown. Community pack registry: https://github.com/LumabyteCo/clarifyprompt-packs
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Local file path, HTTPS URL, or inline markdown body (auto-detected). | |
| source_type | No | Override source-type detection. `registry` marks a pack as community-sourced. | auto |
| scope | No | Scope to load under (e.g. 'user', 'project:myapp'). Defaults to pack frontmatter or 'user'. | |
| name | No | Override the pack name (else pulled from frontmatter). | |
| version | No | Override the pack version (else pulled from frontmatter or '0.0.0'). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description partially covers behavior: chunking, embedding, and retrieval usage during optimize_prompt. However, it omits details on overwriting existing packs, error handling, performance implications, or side effects like data persistence.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, front-loading the main action and then explaining chunking and source options. No wasted words, though slightly more structured formatting could improve readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers core functionality (loading, chunking, sources), but lacks details on overwrite behavior, size limits, or unload mechanism. Given no output schema and basic complexity, it is adequate but not thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds marginal value beyond schema: it explains auto-detection of source types and mentions the community pack registry, but mostly repeats schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool loads a knowledge pack (markdown with YAML frontmatter) into persistent memory for semantic retrieval, specifying chunking by heading and embedding. It distinguishes from siblings like list_packs (listing) and unload_pack (unloading) by focusing on loading for retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing to load documents for semantic retrieval, lists source types and a community registry, but does not explicitly exclude alternatives (e.g., memory_remember for facts) or provide when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_forgetA
Invalidate (soft-delete) a fact by its id. The fact is marked invalidated_at = now and won't appear in future memory_search or grounding, but its history is preserved (bi-temporal soft-delete). Use memory_list_facts first to find the id you want to forget.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Fact id (from memory_remember response, memory_search result, or memory_list_facts row). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses behavior: it's a soft-delete, marks invalidated_at, removes from future searches, and preserves history. This is comprehensive for a single-parameter tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action, no wasted words, and essential information is efficiently presented.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one required parameter and no output schema, the description is complete. It explains behavior, prerequisite, and effect on future operations. No gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and already explains the id's sources. The main description does not add new parameter semantics beyond what the schema provides, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Invalidate' and resource 'fact by its id'. It clearly distinguishes from siblings like memory_remember and memory_search by describing the bi-temporal soft-delete behavior, and it sets the context for how to obtain the id.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs to use memory_list_facts first to find the id, providing a clear prerequisite. However, it does not mention when not to use this tool or any alternatives, though for a simple delete this is adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_list_factsA
List live (non-invalidated) facts in persistent memory, optionally filtered by scope and predicate. Sorted by most-recently-observed first. Useful for inspecting what the engine knows, or finding fact ids to forget.
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Memory scope to filter by. Default 'user'. Examples: 'user', 'project:myapp', 'session:abc'. | user |
| predicate | No | Optional predicate filter (e.g., only 'prefers' facts). | |
| limit | No | Max facts to return. Default 50, hard max 100. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses core behaviors: lists live/non-invalidated facts, sorted by recency, optional filters. With no annotations, description carries full burden; missing details like pagination behavior, empty result handling, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two efficient sentences: first states operation and sorting, second provides use cases. No redundant information, well front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers purpose, filtering, sorting, and use cases. Lacks description of return format (e.g., fields like fact_id, predicate, value) but no output schema exists; would benefit from a brief hint about output structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline 3. Description mentions filtering by scope and predicate but adds no new meaning beyond schema descriptions which already detail defaults and examples. Limit parameter is not explicitly mentioned in description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb 'List' and resource 'live facts in persistent memory', with optional filtering by scope and predicate. Distinguishes from sibling tools like memory_search and memory_forget by specifying 'non-invalidated' facts and sorting order.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit use cases: 'inspecting what the engine knows' and 'finding fact ids to forget'. Implicitly excludes mutation or search operations, but does not explicitly state when not to use or name alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_rememberA
Explicitly add a fact to persistent memory. Use when the user says something the engine should remember across sessions (preferences, conventions, project facts). Complements save_outcome reflection, which extracts facts implicitly โ this is the explicit, user-driven path. Returns the new fact id, which can be passed to memory_forget later.
| Name | Required | Description | Default |
|---|---|---|---|
| subject | Yes | Who/what the fact is about. Examples: 'user', 'project', 'this codebase', a person's name. | |
| predicate | Yes | Short verb phrase. Examples: 'prefers', 'uses', 'avoids', 'requires', 'is'. | |
| object | Yes | The concrete value. Example: 'TypeScript with strict mode'. | |
| scope | No | Memory scope. Default 'user' (cross-session, cross-project). Use 'project:<name>' for project-local memory, 'session:<id>' for ephemeral session-only memory. | user |
| confidence | No | 0-1 confidence. Default 1.0 for explicit user remember. Reflection-extracted facts use 0.6-0.8. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It reveals the tool returns a fact id and implies persistence, but does not disclose potential side effects (e.g., overwrite behavior), required permissions, error handling, or whether it can fail silently.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences front-load the purpose and usage context, with no redundant phrases. Every sentence serves a distinct function: purpose, usage guidance, sibling differentiation, and return value note.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the parameter set (5 params, 3 required) and absence of output schema, the description covers the basic lifecycle (add, return id, forget). However, it omits details like whether adding duplicate facts creates duplicates or updates, and doesn't discuss scope isolation or session behavior beyond the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already explains all parameters. The description adds minimal meaning beyond the schema (only linking to `save_outcome` and `memory_forget`). Baseline 3 is appropriate as the description does not materially enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Explicitly add a fact to persistent memory' with a specific verb ('add') and resource ('fact'). It distinguishes from the sibling tool `save_outcome` by contrasting explicit vs implicit extraction, and notes the return of a new fact id for use with `memory_forget`.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states when to use: 'when the user says something the engine should remember across sessions' and provides examples. It mentions the complementary role of `save_outcome` and tees up `memory_forget` for the returned id, but does not explicitly list non-usage cases or other alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_searchA
Semantic search over the persistent memory store. Returns facts, pack chunks, and past optimizations ranked by vector similarity to the query. Useful for inspecting what ClarifyPrompt would retrieve for a given prompt, and for debugging curator decisions.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query โ usually the user's intent or a paraphrase of a future prompt. | |
| kinds | No | Which memory kinds to search. Default: facts + pack chunks. | |
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries the full burden. It discloses the search mechanism (vector similarity) and return types, but does not indicate whether the operation is read-only or any side effects, leaving ambiguity about safety.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no fluff, front-loaded with the core purpose and followed by use case examples. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, but description explains what is returned. Could be improved by mentioning result structure or pagination, but overall covers need-to-know aspects for a search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Two of three parameters have schema descriptions (67% coverage). Description does not add extra meaning beyond schema; it restates the purpose of the tool overall without detailing parameter usage. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Semantic search over the persistent memory store' with specific resource ('memory store') and action ('search'), and lists what is returned. It distinguishes from siblings like memory_list_facts which are likely non-semantic.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Useful for inspecting what ClarifyPrompt would retrieve for a given prompt, and for debugging curator decisions,' clarifying the context. No explicit exclusions or alternative comparisons, but context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
optimize_promptA
Optimize a prompt for a specific AI platform. Context-aware: auto-gathers workspace signals (CLAUDE.md / AGENTS.md / .cursorrules / package.json), resolves intent + category + recommended mode in a single analysis step, shapes the system prompt to the target model's capabilities, and grounds the rewrite in a priority-ordered Grounding Context. Supports 58+ platforms across 7 categories, plus custom registered platforms. Category, platform, and mode are all optional โ the engine chooses sane defaults from the analysis.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The prompt to optimize | |
| category | No | Prompt category. Auto-detected via the analyzer when omitted. When provided, the analyzer can still override if it's confident the hint is wrong. | |
| platform | No | Target platform ID (e.g. midjourney, dall-e, sora, suno, claude, cursor, or a custom platform ID). Uses category default when omitted. | |
| mode | No | Output mode. When omitted, the engine uses the analyzer's intent-derived recommendation (e.g. production-code โ technical, quick-draft โ concise). When passed, user choice wins. | |
| enrich_context | No | Use web search for context enrichment (Tavily/Brave/Serper/SerpAPI/Exa/SearXNG). Results merge into the single Grounding Context block. | |
| session_id | No | Session ID to stitch related optimizations so the engine can reuse accepted prior outputs as few-shot examples. Auto-generated when omitted. | |
| file_path | No | Active file path โ infers language and grounds the rewrite | |
| file_language | No | Explicit language override for the active file | |
| file_excerpt | No | Short excerpt (โค2 KB) of the active file to ground the rewrite | |
| cwd | No | Working directory to scan for CLAUDE.md / AGENTS.md / .cursorrules / package.json. Defaults to server cwd. | |
| user_locale | No | User locale hint (e.g. en-US, ar-EG) | |
| user_pinned_instructions | No | Pinned, always-applied user instructions (highest-priority grounding) | |
| include_bundle | No | Include the full resolved ContextBundle in the response (same shape as inspect_context returns) | |
| skip_intent_resolution | No | Skip the analyzer LLM call (faster; loses intent/category/mode recommendations) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses auto-gathering of workspace signals, intent resolution, mode recommendation, and grounding. It mentions support for many platforms and optional parameters with sensible defaults. It does not mention side effects, auth, or rate limits, but the coverage is good. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single paragraph of about 6 sentences, each adding meaningful information. It is front-loaded with the main purpose and logically flows through features. Slightly long but still efficient; no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 14 parameters and no output schema, the description covers the analysis pipeline, default behaviors, optional features, and even mentions response structure via include_bundle. It could explicitly state that the response is an optimized prompt string, but the inference is clear from context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining how parameters interact (e.g., category auto-detected, mode chosen from intent, session_id for few-shot). This goes beyond the schema descriptions and helps the agent understand the tool's behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Optimize a prompt for a specific AI platform.' It uses a specific verb (optimize) and resource (prompt) and distinguishes itself from siblings like compose_prompt or critique_prompt by emphasizing context-awareness, auto-analysis, and multi-platform support.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains that category, platform, and mode are optional with intelligent defaults, and that the engine auto-gathers workspace signals. However, it does not explicitly state when to use this tool vs alternatives like ground_prompt or compose_prompt, nor does it provide exclusions. The context is clear but lacks explicit when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
register_platformC
Register a new custom AI platform for prompt optimization.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique platform ID (lowercase, alphanumeric with hyphens) | |
| category | Yes | Category this platform belongs to | |
| label | Yes | Human-readable platform name | |
| description | Yes | Short description | |
| syntax_hints | No | ||
| instructions | No | ||
| instructions_file | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only says 'register a new platform' without mentioning side effects (e.g., overwriting an existing ID), authentication needs, or any implications. This is insufficient for safe invocation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise. It covers the core purpose without extra words. However, given the tool's complexity, slightly more structure (e.g., listing key prerequisites) could improve clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description lacks important context such as return values (no output schema), error conditions, and post-registration effects. For a tool with 7 parameters and no annotations, this is insufficient to ensure correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not mention any parameters or their roles. With a schema coverage of 57%, the description adds no value beyond what the schema provides. The three undocumented parameters (syntax_hints, instructions, instructions_file) are left entirely unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb (register) and resource (new custom AI platform for prompt optimization). This distinguishes it from sibling tools like update_platform and unregister_platform, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as update_platform or unregister_platform. There is no context about prerequisites or suitable scenarios, leaving the agent uncertain about selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_outcomeA
Tell ClarifyPrompt whether an optimization's output was accepted, edited, or rejected. Feeds two loops: (1) the session ring buffer so accepted prior outputs are injected as few-shot examples into future similar prompts, and (2) the persistent memory layer via reflection โ on accept/edit, ClarifyPrompt extracts atomic facts from the interaction and stores them; on reject, recent reflection facts from this session are invalidated. Reflection uses the same LLM you've configured; expect a 1โ3s latency on local models.
| Name | Required | Description | Default |
|---|---|---|---|
| optimization_id | Yes | The `id` returned from optimize_prompt | |
| session_id | Yes | The `sessionId` returned from optimize_prompt. Required so the outcome lands in the right session bucket. | |
| verdict | Yes | accepted = user used the output as-is; edited = user kept it with edits; rejected = user threw it away | |
| diff | No | Optional: the user's edited version or a diff. Helps reflection extract better facts. | |
| skip_reflection | No | Skip the LLM-based fact extraction pass (faster, no facts learned) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, but the description fully discloses the behavior: feeding the session ring buffer, triggering reflection for fact extraction/invalidation, and the latency impact on local models. It covers all significant side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise yet comprehensive. It front-loads the core purpose, then efficiently explains the two feedback loops and the reflection latency. Every sentence serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all essential aspects: the tool's function, its integration into two loops, behavior on each verdict, and a performance caveat. No output schema exists, but the side effects are fully described.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already has 100% description coverage, but the tool description adds operational context (e.g., how 'diff' helps reflection, the effect of 'skip_reflection') that provides additional meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it records the verdict of an optimization output (accepted/edited/rejected) and explains its role in two feedback loops, distinguishing it from sibling tools that handle other aspects of the optimization process.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage after obtaining an optimization output, but does not explicitly state when not to use it or list alternatives. It provides clear context for when it is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unload_packA
Remove a loaded knowledge pack (and all its chunks + embeddings) from the memory store.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Pack id (as returned by list_packs). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description adds moderate behavioral context by noting that unloading removes both chunks and embeddings. However, it does not disclose other important traits like destructiveness, reversibility, or authorization requirements, which would be expected for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-formed sentence that is concise and to the point. Every word adds value, with no extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (1 parameter, no output schema), the description is mostly complete. It explains the primary action and scope (pack, chunks, embeddings). Minor gaps remain, such as failure scenarios or state changes, but for a straightforward removal operation, it is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the parameter description in the schema is clear ('Pack id (as returned by list_packs)'). The tool description adds no additional semantic information beyond the schema, resulting in a baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (remove) and the resource (a loaded knowledge pack, including its chunks and embeddings). It effectively distinguishes this tool from siblings like 'load_knowledge_pack' and 'list_packs' by specifying its unique purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives (e.g., memory_forget for individual facts). It does not specify prerequisites or contraindications, leaving the agent to infer usage context from the tool name and schema alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unregister_platformB
Remove a custom platform, or clear instruction overrides on a built-in.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| category | Yes | ||
| remove_override_only | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description should fully disclose behavior. It mentions removal and clearing overrides but omits side effects, permission requirements, or consequences.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence, but it could add more detail without becoming overly verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and 0% schema coverage, the description is insufficient. It lacks information on return values, error conditions, and post-removal effects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description provides no explanation of the three parameters (id, category, remove_override_only) or their roles.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool removes a custom platform or clears instruction overrides on a built-in platform, distinguishing its purpose from siblings like register_platform and update_platform.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (removing or clearing overrides) but lacks explicit guidance on when not to use or alternatives among the listed siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_platformC
Update a custom platform or add/override instructions on a built-in platform.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| category | Yes | ||
| label | No | ||
| description | No | ||
| syntax_hints | No | ||
| syntax_hints_append | No | ||
| instructions | No | ||
| instructions_file | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description only says 'update' and 'add/override', indicating mutation but lacking details on side effects, authorization, or what happens to unspecified fields. Behavioral transparency is minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence covering both use cases without unnecessary words. It is well-structured for its length, though breaking it into two sentences could improve clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 8 parameters and no output schema, the description is insufficient. It omits key details like required fields, partial vs full update behavior, and the meaning of complex parameters (e.g., instructions_file vs instructions, syntax_hints vs syntax_hints_append).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain any of the 8 parameters (e.g., id, instructions, syntax_hints). The agent has no insight into how to correctly populate the fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb (update/add/override) and resource (platform), and distinguishes between custom and built-in platforms. However, it does not explicitly differentiate from sibling tools like register_platform, leaving some ambiguity about when to use each.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies two modes (update custom, add/override built-in) but provides no explicit guidance on when to use this tool versus alternatives like register_platform or unregister_platform.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
20 tool updates
v1.6.8- Added
clarify_with_user - Added
compose_prompt - Added
critique_prompt - Added
explain_last_curation - Added
get_trace - Added
ground_prompt - Added
inspect_context - Added
list_packs - Added
list_traces - Added
load_knowledge_pack - Added
memory_forget - Added
memory_list_facts - Added
memory_remember - Added
memory_search - Changed
optimize_prompt13 fields changed- changed
Input schema / properties / category / descriptionPrevious value: -"Prompt category. Auto-detected from prompt content when omitted."New value: +"Prompt category. Auto-detected via the analyzer when omitted. When provided, the analyzer can still override if it's confident the hint is wrong." - added
Input schema / properties / cwdAdded value: +{ + "description": "Working directory to scan for CLAUDE.md / AGENTS.md / .cursorrules / package.json. Defaults to server cwd.", + "type": "string" +} - changed
Input schema / properties / enrich_context / descriptionPrevious value: -"Use web search for context enrichment (supports Tavily, Brave, Serper, SerpAPI, Exa, SearXNG)"New value: +"Use web search for context enrichment (Tavily/Brave/Serper/SerpAPI/Exa/SearXNG). Results merge into the single Grounding Context block." - added
Input schema / properties / file_excerptAdded value: +{ + "description": "Short excerpt (โค2 KB) of the active file to ground the rewrite", + "type": "string" +} - added
Input schema / properties / file_languageAdded value: +{ + "description": "Explicit language override for the active file", + "type": "string" +} - added
Input schema / properties / file_pathAdded value: +{ + "description": "Active file path โ infers language and grounds the rewrite", + "type": "string" +} - added
Input schema / properties / include_bundleAdded value: +{ + "default": false, + "description": "Include the full resolved ContextBundle in the response (same shape as inspect_context returns)", + "type": "boolean" +} - removed
Input schema / properties / mode / defaultRemoved value: -"detailed" - changed
Input schema / properties / mode / descriptionPrevious value: -"Output mode"New value: +"Output mode. When omitted, the engine uses the analyzer's intent-derived recommendation (e.g. production-code โ technical, quick-draft โ concise). When passed, user choice wins." - added
Input schema / properties / session_idAdded value: +{ + "description": "Session ID to stitch related optimizations so the engine can reuse accepted prior outputs as few-shot examples. Auto-generated when omitted.", + "type": "string" +} - added
Input schema / properties / skip_intent_resolutionAdded value: +{ + "default": false, + "description": "Skip the analyzer LLM call (faster; loses intent/category/mode recommendations)", + "type": "boolean" +} - added
Input schema / properties / user_localeAdded value: +{ + "description": "User locale hint (e.g. en-US, ar-EG)", + "type": "string" +} - added
Input schema / properties / user_pinned_instructionsAdded value: +{ + "description": "Pinned, always-applied user instructions (highest-priority grounding)", + "type": "string" +}
- Changed
register_platform6 fields changed- changed
Input schema / properties / description / descriptionPrevious value: -"Short description of the platform"New value: +"Short description" - changed
Input schema / properties / id / descriptionPrevious value: -"Unique platform ID (lowercase, alphanumeric with hyphens, e.g. 'my-llm')"New value: +"Unique platform ID (lowercase, alphanumeric with hyphens)" - removed
Input schema / properties / instructions / descriptionRemoved value: -"Inline instructions for prompt optimization on this platform" - removed
Input schema / properties / instructions_file / descriptionRemoved value: -"Path to a .md file with detailed instructions (relative to config dir's instructions/ folder, or absolute)" - changed
Input schema / properties / label / descriptionPrevious value: -"Human-readable platform name (e.g. 'My Custom LLM')"New value: +"Human-readable platform name" - removed
Input schema / properties / syntax_hints / descriptionRemoved value: -"Platform-specific syntax hints (e.g. ['system prompts', 'JSON mode'])"
- Added
save_outcome - Added
unload_pack - Changed
unregister_platform3 fields changed- removed
Input schema / properties / category / descriptionRemoved value: -"Category the platform belongs to" - removed
Input schema / properties / id / descriptionRemoved value: -"Platform ID to remove" - removed
Input schema / properties / remove_override_only / descriptionRemoved value: -"If true, only remove instruction overrides (for built-in platforms)"
- Changed
update_platform8 fields changed- removed
Input schema / properties / category / descriptionRemoved value: -"Category the platform belongs to" - removed
Input schema / properties / description / descriptionRemoved value: -"Updated description (custom platforms only)" - removed
Input schema / properties / id / descriptionRemoved value: -"Platform ID to update" - removed
Input schema / properties / instructions / descriptionRemoved value: -"Inline instructions (replaces existing)" - removed
Input schema / properties / instructions_file / descriptionRemoved value: -"Path to .md instructions file (replaces existing)" - removed
Input schema / properties / label / descriptionRemoved value: -"Updated display name (custom platforms only)" - removed
Input schema / properties / syntax_hints / descriptionRemoved value: -"Replace syntax hints (custom platforms only)" - removed
Input schema / properties / syntax_hints_append / descriptionRemoved value: -"Additional syntax hints to append (works for both built-in and custom)"
7 tool updates
- Added
list_categories - Added
list_modes - Added
list_platforms - Added
optimize_prompt - Added
register_platform - Added
unregister_platform - Added
update_platform
TDQS
Most tools have clearly distinct purposes, but compose_prompt overlaps slightly with clarify_with_user, optimize_prompt, ground_prompt, and critique_prompt, as it bundles their functionality. The memory and platform tools are well-separated.
All tool names follow a consistent verb_noun snake_case pattern, with clear verbs like 'list', 'create', 'optimize', 'memory_', etc. There are no mixed conventions or vague names.
23 tools is appropriate for the comprehensive feature set of prompt optimization, memory management, platform registration, and inspection. Each tool serves a distinct function without unnecessary bloat.
The tool surface covers the full lifecycle of prompt optimization: clarification, grounding, optimization, critique, memory, and platform management. Minor gaps exist (e.g., no bulk optimization), but the core workflows are well-covered.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Cloudflare Workers MCP server: ai-prompt-optimizer
MCP server for Midjourney AI image generation and editing
One AI endpoint to search and call 22k+ MCP servers; 50+ hosted tools work instantly, no key.
31Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that provides access to the Midjourney Best Experience API for generating and manipulating images. It enables users to execute prompts and perform actions like upscaling, variations, and zooming directly within MCP-compatible applications.5MIT
- AlicenseAqualityDmaintenanceAn MCP server that uses Claude 3.5 Sonnet to transform ordinary prompts into structured, professionally engineered instructions for any LLM. It enhances AI interactions by adding context, requirements, and structural clarity to raw user inputs.13MIT
- AlicenseAqualityDmaintenanceAn advanced MCP server that intelligently enhances prompts using 44+ metaprompt strategies, with LLM-driven strategy selection and enterprise-grade features.8539MIT
- AlicenseAqualityDmaintenanceAn MCP server for deterministic prompt optimization in Claude Code. Score prompts across 7 quality dimensions, auto-select from 11 Anthropic techniques, and return a structural scaffold.1242MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LumabyteCo/clarifyprompt-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server