Skip to main content
Glama

Improve prompt

improve_prompt

Rewrite a generation prompt and get the result back at once. mode "improve" (default) returns { originalPrompt, improvedPrompt }, a more detailed prompt for better output; "rephrase" returns { originalPrompt, rephrasedPrompt }, the same idea worded differently. Nothing is generated or saved. Spends chat credits per call. context is accepted but not used in either mode. Use get_prompt_suggestions for fresh ideas instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>",
      "llm_model": "<llm_model>"
    },
    "name": "improve_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoimprove
promptYesThe prompt to rewrite.
contextNoIgnored by the server in both modes.
chatModelNoOptional Bedrock model id; defaults to Claude Sonnet.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / chatModel / description
      Added value: +"Optional Bedrock model id; defaults to Claude Sonnet."
    • addedInput schema / properties / context / description
      Added value: +"Ignored by the server in both modes."
    • addedInput schema / properties / prompt / description
      Added value: +"The prompt to rewrite."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Adds context well beyond the annotations: it discloses that nothing is generated or saved (clarifying the readOnlyHint=false / destructiveHint=false profile) and that each call spends chat credits. It also flags the ignored context parameter, which the agent otherwise could not infer.

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 core action and mode semantics are front-loaded in the first sentence, and every subsequent clause (return shapes, no persistence, credit cost, ignored context, alternative tool) carries actionable information with no filler.

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?

With no output schema, the description compensates by naming the returned fields for both modes. Combined with cost, persistence, and ignored-parameter notes, an agent has everything needed to call this correctly.

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 coverage is 83%, so the baseline is 3; the description adds value by explaining what each mode returns and confirming context is unused. It does not touch chatModel defaults or conversation_id handling, but those are already documented in the schema, so the gain is modest.

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?

States a specific verb and resource ("Rewrite a generation prompt") and enumerates both modes with their exact return shapes, so an agent knows precisely what comes back. It also contrasts itself with the sibling get_prompt_suggestions, removing ambiguity.

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 distinguishes improve (more detailed prompt) from rephrase (same idea reworded) and routes the agent to get_prompt_suggestions when fresh ideas are wanted. It also warns that context is ignored, which prevents misuse. It stops short of stating prerequisites or when to prefer improvement over rephrasing for a given task, so not a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.