Skip to main content
Glama

Optimise a prompt across rounds

evolve_prompt

Use this for multi-round prompt optimisation on a finished test. Runs several rounds of rewrites on our side against your synthetic cases and checks, keeps a rewrite only when it improves held-out pass rate, and returns immediately so you do not have to wait in one call. Check back later with get_test or open the link to read the winning prompt and model verdict. Spends credit.

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": {
      "test_id": "<test_id>"
    },
    "name": "evolve_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoOptimise against the test's checks (default) or human ratings.
budgetNoHow many rounds to search: quick (default) or thorough.
targetNoModel id from the test to optimise for (for example a cheaper model). Defaults to the test's current top model.
test_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true; the description adds real value on top with the retention rule (a rewrite is kept only if held-out pass rate improves), the async return, and the credit cost. It does not say whether a running job can be cancelled, whether concurrent calls are allowed, or how much credit a quick vs thorough run consumes.

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?

Three sentences, front-loaded with the purpose and the async contract, and the follow-up path comes last. Slight redundancy between "multi-round" and "several rounds of rewrites", but nothing that wastes a reader's attention.

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?

For a credit-spending, non-read-only tool with no output schema and a required test_id, the description covers purpose, async behaviour, where results land, and cost. Missing only failure/cancellation behaviour and cost magnitude, which an agent calling this would want before committing.

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 75% with two enums already self-describing, so the schema does most of the work. The description only loosely gestures at mode ("synthetic cases and checks") and budget ("several rounds"), saying nothing about what target selects beyond what the schema states. Baseline 3 is appropriate.

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?

Names a specific verb and resource: multi-round prompt optimisation scoped to "a finished test", with the async nature made explicit ("returns immediately"). An agent can distinguish it from a single-shot rewrite, though it never names improve_prompt or test_prompt as the contrasting siblings.

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?

Gives a clear precondition ("on a finished test") and tells the agent how to follow up ("Check back later with get_test or open the link"). It stops short of explicit exclusions, e.g. when to pick improve_prompt for a single rewrite instead of spending credit on rounds.

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.