Skip to main content
Glama

refine_prompt

Refine an AI prompt by providing answers to blocking questions or manual edits, then re-run analysis to get an updated preview pack.

Instructions

Refine a prompt by answering blocking questions or providing manual edits. Re-runs analysis and returns updated PreviewPack.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID from optimize_prompt
answersNoAnswers to blocking questions: { question_id: answer }
editsNoManual edits or additional context to incorporate
targetNoChange output target
Behavior3/5

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

With no annotations, the description is the sole source. It states the tool re-runs analysis and returns updated PreviewPack, indicating non-idempotent behavior. However, it does not disclose side effects, safety, or whether it modifies state.

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 with two clauses, efficient and front-loaded. No redundant information, though it could include a brief note on prerequisites.

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 no output schema and nested parameters, the description adequately explains the tool's purpose and return value. However, it lacks details on the output structure (PreviewPack) and the concept of blocking questions, which may be needed by an agent.

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 coverage is 100%, so parameters are already documented. The description adds context linking answers and edits to the tool's function, but does not provide additional guidance on when to use each parameter or the format of answers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool refines a prompt by answering blocking questions or providing manual edits, and it reruns analysis returning an updated PreviewPack. This differentiates it from sibling 'optimize_prompt' which likely does initial optimization, but it does not explicitly define 'blocking questions' or 'PreviewPack'.

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 usage after optimize_prompt by requiring a session_id from it, but it does not explicitly state when to use this tool or when not to use alternatives. No exclusions or alternatives are mentioned.

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/rishi-banerjee1/prompt-control-plane'

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