Skip to main content
Glama
xXMSGXx
by xXMSGXx

refine_prompt

Improve AI prompts by applying targeted feedback to enhance clarity, specificity, and model compatibility while preserving original structure and project context.

Instructions

Iteratively improve an existing prompt based on specific feedback.

Use this tool when you need to: • Improve a prompt that didn't get good results • Add missing context or constraints • Make a prompt more specific or clearer • Adapt a prompt for a different AI model

The tool preserves the original structure while applying targeted improvements.

IMPORTANT: When available, pass workspace context (file structure, package.json, tech stack) to ensure refined prompts comply with the user's project scope and original request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe current prompt to refine.
feedbackYesWhat should be improved. Examples: "make it more specific", "add error handling requirements", "focus on performance".
preserveStructureNoWhether to keep the original structure. Default: true.
targetModelNoTarget AI model for optimization.
workspaceContextNoProject context to ensure the refined prompt aligns with the codebase. Include: file/folder structure, package.json dependencies, tech stack (React, Node, etc.), relevant code snippets, and the original user request. This ensures the refined prompt complies with project conventions and scope.
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 key behavioral traits: 'preserves the original structure while applying targeted improvements' and emphasizes the importance of workspace context for compliance. However, it doesn't mention potential limitations like rate limits, error handling, or authentication needs.

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 well-structured and front-loaded with the core purpose. Each sentence adds value: the first states the purpose, the bulleted list provides usage guidelines, and the final sentences add important behavioral context without redundancy.

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 no annotations and no output schema, the description does a good job covering purpose, usage, and some behavioral context. However, it could better address what the refined prompt output looks like or any constraints on the refinement process to be 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?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal parameter semantics beyond the schema, mentioning workspace context importance but not elaborating on other parameters like feedback examples or target model implications.

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: 'Iteratively improve an existing prompt based on specific feedback.' It uses specific verbs ('improve', 'add', 'make', 'adapt') and distinguishes from sibling tools like analyze_prompt and generate_prompt by focusing on refinement rather than analysis or generation.

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

Usage Guidelines5/5

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

The description provides explicit usage scenarios in a bulleted list: 'when you need to: • Improve a prompt that didn't get good results • Add missing context or constraints • Make a prompt more specific or clearer • Adapt a prompt for a different AI model.' This clearly differentiates when to use this tool versus alternatives.

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/xXMSGXx/promptarchitect-mcp'

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