Clarifyprompt-MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LLM_MODEL | Yes | Model name/ID (e.g., qwen2.5:7b, gpt-4o, claude-sonnet-4-20250514). | |
| LLM_API_KEY | No | API key for the LLM provider. Required for cloud providers like OpenAI or Anthropic, but not needed for local Ollama. | |
| LLM_API_URL | Yes | API endpoint URL (e.g., http://localhost:11434/v1 for Ollama, https://api.openai.com/v1 for OpenAI, or https://api.anthropic.com/v1 for Anthropic). | |
| SEARCH_API_KEY | No | API key for the selected web search provider. | |
| SEARCH_PROVIDER | No | Optional web search provider for context enrichment. Supported providers include: tavily, brave, serper, serpapi, exa, or searxng. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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. |
| list_categoriesA | List all available prompt optimization categories with platform counts including custom platforms |
| list_platformsB | List available platforms for a category, including custom registered platforms. |
| list_modesA | List available output modes for prompt optimization |
| register_platformC | Register a new custom AI platform for prompt optimization. |
| update_platformC | Update a custom platform or add/override instructions on a built-in platform. |
| unregister_platformB | Remove a custom platform, or clear instruction overrides on a built-in. |
| 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. |
| list_tracesA | List recent optimization traces from the local tracer. Summary only; use get_trace for full records. |
| get_traceB | Fetch the full trace for an optimization ID, including system prompt + output. Looks back 7 days by default. |
| 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. |
| 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. |
| 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 |
| 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_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. |
| 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. |
| 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 |
| list_packsB | List knowledge packs currently loaded in the persistent memory store. |
| unload_packA | Remove a loaded knowledge pack (and all its chunks + embeddings) from the memory store. |
| clarify_with_userA | Given an ambiguous draft prompt, return 1–3 targeted clarifying questions instead of guessing. Each question carries a |
| 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. |
| 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 ( |
| 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 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| categories | Full category configuration with all platforms and modes |
Latest Blog Posts
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