Skip to main content
Glama

Refine a prompt with AgentForge

agentforge_refine_prompt

Refines vague coding requests into structured, agent-specific prompts by extracting requirements, filling edge cases, and running quality checks. Ideal for under-specified tasks before handing to a coding agent.

Instructions

Turn a rough, plain-language coding request into a structured, tool-tuned prompt for an AI coding agent.

AgentForge extracts the real requirements, fills in missing edge cases, formats the prompt for the target agent's conventions, and runs it through a Quality Engine before returning it. Reach for this when a request is vague or under-specified and you want a sharper prompt before handing it to a coding agent.

Args:

  • request (string, required): the coding task in plain language, 1-4000 chars.

  • target_tool (string): one of claude-code, codex, cursor, aider, continue, windsurf, kimi, generic. Default: claude-code.

  • style (string): plan-first, direct-edit, or explore-first. Default: plan-first.

Returns the refined prompt as text. structuredContent additionally carries: { "prompt": string, "tier": "free" | "pro", "quality": { "score": number, "max_score": number, "passed": boolean } | null, "usage": { "used_today": number, "limit": number | null } }

Errors are returned as text, e.g.:

  • "API key not configured" — set AGENTFORGE_API_KEY.

  • "invalid or revoked API key" (401) — check the key at agentforge.sciscale.org.

  • "daily free limit reached" (429) — upgrade to Pro for unlimited calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYesThe coding task or feature request, in plain language. Rough and under-specified is fine — that is exactly what gets refined.
target_toolNoThe AI coding agent the prompt is formatted for.claude-code
styleNoExecution style baked into the prompt: 'plan-first' plans before coding, 'direct-edit' makes the smallest change, 'explore-first' maps the codebase first.plan-first

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe refined, tool-tuned prompt — hand this to your coding agent.
tierYesAccount tier that produced it: 'free' or 'pro'.
qualityYesQuality Engine score, or null if scoring was unavailable.
usageYesToday's usage for this account; 'limit' is null for unlimited Pro.
Behavior4/5

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

Annotations convey side-effect potential (not readOnly, not destructive). Description adds context: uses API key, daily limit, quality engine. No contradiction with annotations.

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?

Well-structured with sections, bullet points, and front-loaded main action. A bit lengthy but every sentence adds value.

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

Completeness5/5

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

Covers return format (text + structuredContent), errors, API usage, and all parameters. Output schema exists, so return detail is sufficient.

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

Parameters4/5

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

Schema has 100% coverage with descriptions. Description adds extra nuance: 'request' accepts rough input, lists enum options for target_tool and style with explanations.

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?

Description clearly states verb 'refine', resource 'prompt', and the transformation from rough to structured. With no sibling tools, differentiation is not needed.

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?

Explicitly says 'Reach for this when a request is vague or under-specified'. Also lists error conditions. Lacks explicit when-not-to-use, but given no siblings, that is acceptable.

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/sciscale-studio/agentforge-mcp'

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