Skip to main content
Glama
nuno-morais

Prompt Enhancer MCP

by nuno-morais

optimize_prompt

Rewrite rough prompt drafts into structured, optimized versions using a local LLM, saving tokens and improving output quality before sending to paid APIs.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draftYesThe raw draft idea
modelNoOverride for the model
engineNoThe underlying LLM engine to use (ollama or anthropic)
contextNoOptional background/domain context (project description, glossary, relevant facts) to help the model correctly interpret domain-specific terms in the draft
explainNoWhen true, includes a 1-line summary of what the critic pass changed, as a second content block
auto_cotNoAutomatically inject Chain-of-Thought (CoT) instructions if the task is complex.
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.
show_statsNoShow a token count and prompt efficiency analysis.
interactiveNoWhen true, instructs the calling assistant to pause and ask for user approval before answering the optimized prompt. Defaults to true to allow iteration.
target_modelNoThe target API/format this prompt will be sent togeneric
auto_guardrailsNoAutomatically generate and inject negative constraints (anti-hallucination guardrails).
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 mentions using a local LLM and the purpose (optimization before paid API), but does not detail the optimization process, side effects, or what happens if the draft is already optimal. More specific behavioral context would improve transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is concise and front-loaded with the most critical information. Every word earns its place with no redundancy or fluff.

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?

Given the tool has 12 parameters and no output schema, the description should set expectations for what the tool returns (e.g., the optimized prompt). It lacks this information, though the schema descriptions for parameters are detailed. The context is adequate but not fully complete.

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?

The input schema covers 100% of parameters with descriptions, meeting the baseline. The tool description adds overall context (local LLM, paid API) but does not provide additional meaning beyond what the schema already offers for each parameter.

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 verb (optimizes), the resource (rough prompt draft), and the context (using a local LLM before sending to a paid API). It effectively distinguishes the tool from its sibling 'check_health', which is unrelated.

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 implies when to use the tool (when you have a rough draft and want to avoid paying for API calls before optimization). However, it does not explicitly state when not to use it or mention alternatives, but given the sparse sibling list, the guidance is sufficient.

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