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
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The current prompt to refine. | |
| feedback | Yes | What should be improved. Examples: "make it more specific", "add error handling requirements", "focus on performance". | |
| preserveStructure | No | Whether to keep the original structure. Default: true. | |
| targetModel | No | Target AI model for optimization. | |
| workspaceContext | No | Project 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. |