Skip to main content
Glama

loop_regression

Automates the regression loop: test all cases, score responses, analyze failures, improve the prompt, and repeat until all scores meet the threshold or max iterations are reached.

Instructions

Run the full regression loop: test all cases → score → improve → repeat.

Stops when BOTH conditions are met:

  • Overall pass rate >= threshold

  • Every individual test case score >= threshold Or when max iterations are exhausted.

Loop:

  1. Run all test cases, score responses, call post_test_result for each.

  2. Call get_regression_status.

  3. If pass rate >= threshold AND all individual scores >= threshold → SUCCESS.

  4. If iteration >= maxIterations → EXHAUSTED. Report best result.

  5. Analyse failures, write improved prompt, call post_prompt_suggestion + apply_suggestion.

  6. Go to 1.

After the loop: call pull_ui_history and save results locally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYes
thresholdNoPass score 0–100 (default: workspace goal or 70)
maxIterationsNoMax iterations (default: workspace goal or 5)
Behavior4/5

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

With no annotations, the description carries full burden. It details the entire loop process, including calling other tools (post_test_result, get_regression_status, etc.) and end actions (pull_ui_history). It doesn't explicitly state whether the tool is destructive or requires specific permissions, but the step-by-step disclosure is thorough.

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 long but well-structured as a numbered list, front-loaded with the core loop summary. Some procedural details could be shortened, but the structure aids readability for an AI agent.

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?

Given the tool's complexity (multi-step loop with multiple sub-calls and conditions) and the lack of output schema/annotations, the description is comprehensive. It covers all steps, stop conditions, and post-loop actions, enabling an agent to correctly invoke the tool and integrate with sibling tools.

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 description coverage is 67% (2 of 3 parameters have descriptions). The description adds context on how 'threshold' and 'maxIterations' are used in the loop conditions, but doesn't add new semantic meaning beyond the schema. WorkspaceId lacks description in schema, and description doesn't compensate. Baseline 3 is appropriate.

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?

The description clearly states the tool's purpose: 'Run the full regression loop: test all cases → score → improve → repeat.' It uses a specific verb ('run') and resource ('full regression loop'), and distinguishes from siblings like 'run_regression_testsuite' (single run) and 'loop_optimization' (different optimization loop).

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?

The description provides clear context on when the loop stops (BOTH conditions met or max iterations). It doesn't explicitly state when to use this tool vs alternatives like 'run_regression_testsuite' or 'loop_optimization', but the detailed loop behavior implies it's for full automated regression improvement. Lacks explicit exclusions.

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/jurek-f/prompt-lab-mcp'

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