Skip to main content
Glama

run_sweep

Run a sequential grid search that creates one child run per parameter combination, ranked by a chosen metric. Use it to compare hyperparameters with shared fixed params.

Instructions

Run a grid search: one sweep run plus one child run per combination, executed one after another.

Input Schema

NameRequiredDescriptionDefault
gridYesParam -> list of values, e.g. {'alpha': [0.1, 1, 10], 'layers': [1, 2]}
modeNoWhether lower or higher metric is bettermax
stepYesStep to execute for every combination
waitNoWait for the whole sweep (up to timeout_s)
metricNoMetric that ranks the runs, e.g. 'val_rmse'
paramsNoFixed params shared by all runs
max_runsNoRefuse grids larger than this
timeout_sNoMax seconds to wait
extra_argsNoExtra command-line arguments for every run

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It usefully states that execution creates one sweep run plus child runs and runs combinations one after another, but it does not disclose permissions, failure behavior, blocking semantics, or side effects.

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 description is a single front-loaded sentence with no wasted words. It communicates the core action and execution model efficiently.

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?

The tool has nine parameters, a nested grid object, and an output schema, so the description is only moderately complete. It explains the run structure but omits operational details such as blocking behavior, failure handling, and how the sweep relates to start_sweep/finish_sweep.

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 100%, so the schema already documents all nine parameters, including grid, mode, step, wait, metric, and max_runs. The description adds the notion that each combination produces a child run, but it otherwise does not add meaning beyond the schema.

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 states a specific verb and resource ('Run a grid search') and explains the resulting run structure: one sweep run plus one child run per combination, executed sequentially. This is clear, but it does not distinguish the tool from sibling tools such as start_sweep, run_step, or finish_sweep.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description contains no explicit guidance about when to use this tool instead of start_sweep, run_step, or other sibling tools. The name and short description imply a grid-search use case, but there are no stated exclusions, prerequisites, or alternative-selection rules.

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