Skip to main content
Glama
LumabyteCo

Clarifyprompt-MCP

optimize_prompt

Refines prompts for 58+ AI platforms by analyzing intent and platform capabilities, automatically selecting the optimal category and output mode.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe prompt to optimize
categoryNoPrompt category. Auto-detected via the analyzer when omitted. When provided, the analyzer can still override if it's confident the hint is wrong.
platformNoTarget platform ID (e.g. midjourney, dall-e, sora, suno, claude, cursor, or a custom platform ID). Uses category default when omitted.
modeNoOutput 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_contextNoUse web search for context enrichment (Tavily/Brave/Serper/SerpAPI/Exa/SearXNG). Results merge into the single Grounding Context block.
session_idNoSession ID to stitch related optimizations so the engine can reuse accepted prior outputs as few-shot examples. Auto-generated when omitted.
file_pathNoActive file path — infers language and grounds the rewrite
file_languageNoExplicit language override for the active file
file_excerptNoShort excerpt (≤2 KB) of the active file to ground the rewrite
cwdNoWorking directory to scan for CLAUDE.md / AGENTS.md / .cursorrules / package.json. Defaults to server cwd.
user_localeNoUser locale hint (e.g. en-US, ar-EG)
user_pinned_instructionsNoPinned, always-applied user instructions (highest-priority grounding)
include_bundleNoInclude the full resolved ContextBundle in the response (same shape as inspect_context returns)
skip_intent_resolutionNoSkip the analyzer LLM call (faster; loses intent/category/mode recommendations)
Behavior4/5

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.

Conciseness4/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

Install Server

Other Tools

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