Context-aware MCP prompt compiler with a composable pipeline: clarify_with_user → ground_prompt OR optimize_prompt → critique_prompt, all in one call via compose_prompt. Persistent memory, knowledge packs, explicit token-budget curation, reflective learning, 58+ AI platforms, workspace signals (CLAUDE.md / AGENTS.md / .cursorrules), reasoning-model support. Deterministic eval harness ships with the package.
ClarifyPrompt demonstrates solid tool engineering with 24 well-named, purpose-driven tools. All tools have clear descriptions (100-300 chars typical) and explicit input schemas with typed parameters. Tool naming follows verb_noun conventions consistently (optimize_prompt, clarify_with_user, ground_prompt, etc.). Parameter enums are used appropriately for constrained inputs (category, platform, mode). However, output schemas are not documented in the provided source, only input schemas are visible. Error handling guidance is implicit rather than explicit in descriptions. The server shows strong composition patterns (stateless operations, idempotent semantics) but lacks explicit error recovery documentation and response field specifications needed for production agent chaining.
Apply user-answered elicitation form fields back into the prompt, enriching it with the elicited details.
Gather workspace signals (git branch/diff, environment variables, package.json, CLAUDE.md, AGENTS.md, .cursorrules) into a context bundle for grounding.
Ask clarifying questions to disambiguate the user's intent before optimization. Detects whether clarification is needed, generates targeted questions across intent dimensions (what, who, where, when, why, how), and suggests answers when possible.
End-to-end prompt engineering in one call: clarify_with_user → ground_prompt OR optimize_prompt → critique_prompt. Auto-revise on low critique scores. Returns the final prompt, all intermediate stages, and the full pipeline result. Supports reasoning models and post-critique iteration.
Score and critique an optimized prompt across multiple dimensions (clarity, completeness, specificity, constraint clarity, output format, grounding, tone fit). Returns an overall score, per-dimension scores, a verdict, and an optionally-improved rewrite.
Query the token budget curator: how many tokens remain in the budget, and what is the allocation breakdown by platform/category? Useful for deciding whether to use expensive optimization strategies.
Output schemas not documented. Tool descriptions specify what tools return conceptually (e.g., 'Returns the final prompt, all intermediate stages, and the full pipeline result') but the JSON Schema structure for response objects is not visible in source code.
Error handling guidance missing. Tool descriptions do not explain failure modes, when to retry, or recovery strategies. E.g., optimize_prompt does not document what happens if web_search fails or if grounding context is unavailable.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 69 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 47 | - | v1 |
Build an interactive elicitation form for a given prompt. Returns form fields, constraints, and suggested answers based on the prompt's intent and category.
Ground a prompt in priority-ordered context sources (git diff, environment variables, analysis, docs, code snippets, web search results). Reweights and de-duplicates sources, then inlines them into the prompt.
List all prompt categories (chat, image, voice, video, music, code, document) and their descriptions.
List persistent memory facts, optionally filtered by scope and/or predicate.
List all available knowledge packs (built-in and custom), including their descriptions and sizes.
List all output modes (concise, detailed, structured, step-by-step, bullet-points, technical, simple) and their descriptions.
List all registered AI platforms (58+ built-in across 7 categories) and their metadata. Optional category filter.
List optimization trace files from a specific day (or all days). Traces contain latency, model, category, platform, strategy metadata for each optimization run.
Load a knowledge pack (JSON or YAML) into memory. Packs contain vectors of domain knowledge (e.g. coding best practices, platform-specific tips) that enrich the grounding context and improve optimization quality.
Delete a persistent memory fact by ID.
Store a persistent memory fact as a subject–predicate–object triple (e.g. subject='claude', predicate='prefers-mode', object='technical'). The fact is embedded and searchable.
Search persistent memory (facts from past optimizations, reflections, elicitation answers) by vector similarity and optional filters. Returns ranked results with embedding distance and confidence scores.
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.
Read a single optimization trace by ID.
Reflect on an optimization outcome (success/failure) and store the reflection as a persistent memory fact for future learning.
Register a custom AI platform with optimization hints, system prompt template, and token budgets. Returns the created platform definition.
Unload a knowledge pack from memory (clearing its embeddings and facts).
Unregister a custom platform by ID. Built-in platforms cannot be unregistered.
Some parameters lack examples or format hints. 'optimize_prompt' accepts 'platform' as a free-form string ('e.g. midjourney, dall-e, sora, suno, claude, cursor'); should document that custom platform IDs also work or provide format constraints.
Destructive/write operations lack confirmation or dry-run patterns. 'unregister_platform', 'memory_forget', and 'unload_knowledge_pack' can delete state but descriptions do not mention rollback or confirmation steps.
Tool chaining IDs unclear. If 'compose_prompt' returns an optimization_id, and 'reflect_on_outcome' accepts that ID, the response schema should document this clearly so agents can extract and pass the ID.