Skip to main content
Glama
nuno-morais

Prompt Enhancer MCP

by nuno-morais

optimize_prompt

Refines rough prompt drafts with a local LLM to produce structured, cost-effective prompts for paid APIs.

Instructions

Optimizes a rough prompt draft using a local LLM before sending it to a paid API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
autoNoMaster switch for all automatic enhancement passes: Chain-of-Thought injection, anti-hallucination guardrails, intent classification, and lint auto-repair. The legacy auto_cot/auto_guardrails/auto_intent/auto_repair booleans are still accepted and override this per pass.
draftYesThe raw draft idea
modelNoOverride for the model
engineNoThe underlying LLM engine to use
contextNoOptional background/domain context (project description, glossary, relevant facts) to help the model correctly interpret domain-specific terms in the draft
verbosityNoHow much detail to return alongside the optimized prompt: 'quiet' = prompt only, 'explain' = plus a 1-line summary of what the critic pass changed, 'verbose' = plus token stats and a critic-pass diff. The legacy explain/show_stats/show_diff booleans are still accepted and override this.quiet
brainstormNoWhen true, instructs the target model to generate multiple personas/perspectives for open-ended brainstorming
session_idNoOptional ID to maintain conversation state. Provide a unique string. When making tweaks to a previously generated prompt, pass the same session_id.
interactiveNoWhen true, instructs the calling assistant to pause and ask for user approval before answering the optimized prompt. Defaults to true to allow iteration.
auto_contextNoAutomatically scan the local project (package.json, git) for context to append to the prompt.
target_modelNoThe target API/format this prompt will be sent togeneric
Behavior3/5

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

No annotations are provided, so the description must convey behavioral traits. It states the tool uses a local LLM (free, no external cost) and modifies the prompt, but it does not disclose potential resource usage, rate limits, or side effects. The description is adequate but lacks depth.

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 sentence that is concise and front-loaded. It earns its place, but could be slightly more informative without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 11 parameters and no output schema or annotations. The description does not explain return values, the optimization process, or when to use specific parameters. It provides a high-level overview but lacks the detail needed for complete understanding.

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

Parameters3/5

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

All 11 parameters are described in the schema (100% coverage), so the description does not need to add meaning. It adds no further explanation beyond the schema. Baseline score of 3 is appropriate.

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 function: it optimizes a rough prompt draft using a local LLM. It also provides context (before sending to a paid API) that distinguishes it from sibling tools like check_health, generate_system_prompt, lint_prompt, and score_prompt.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when preparing prompts for paid APIs to reduce costs, but it does not explicitly state when to use this tool versus alternatives like lint_prompt or generate_system_prompt. No exclusions are provided.

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/nuno-morais/prompt-enhancer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server