Skip to main content
Glama

start_sweep

Creates a sweep (HPO study or grid search) that groups trial runs under one sweep_id, so you can log each trial and view the sweep as a collapsible fan with its best trial highlighted.

Instructions

Create a sweep (an HPO study / grid search) that groups trial runs. Pass its sweep_id to log_run for each trial; the map shows the sweep as one collapsible fan with the best trial highlighted. Use run_sweep instead to have mltree launch a grid itself.

Input Schema

NameRequiredDescriptionDefault
modeNoWhether lower or higher metric is bettermax
nameNoShort label, e.g. 'alpha x layers grid'
stepYesStep the trials run, e.g. 'train'
metricNoMetric that ranks the trials, e.g. 'val_rmse'
search_spaceNoOptional search space, e.g. {'alpha': [0.1, 1, 10]}
parent_run_idNoRun the sweep branches from (e.g. the baseline)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose meaningful behavior: it creates a grouping that persists, its id must be threaded into subsequent log_run calls, and the map renders the group as a collapsible fan with the best trial highlighted. It does not say whether creation mutates/commits project state or what happens on a duplicate/invalid step, so it stops short of full disclosure.

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?

Three tight sentences: what it creates, how to consume its output, and the sibling alternative. The parenthetical 'an HPO study / grid search' is a worthwhile disambiguation rather than filler.

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?

An output schema exists so return values need not be explained, and the description covers the creation semantics, the id hand-off, and the routing decision. It leaves open what happens if metric is omitted (no best-trial ranking) and whether the sweep must be closed with finish_sweep, both of which an agent would benefit from knowing.

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% and each parameter carries its own description (mode, name, step, metric, search_space, parent_run_id), so the schema does the parameter work. The description adds no syntax or semantics for any of the six parameters beyond referencing the returned sweep_id, so baseline 3 applies.

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 ('Create a sweep') and immediately glosses it as 'an HPO study / grid search that groups trial runs', which makes the concept unambiguous. It also distinguishes the tool from its closest sibling by describing what log_run and run_sweep do relative to it.

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

Usage Guidelines5/5

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

Gives explicit usage protocol ('Pass its sweep_id to log_run for each trial') and an explicit alternative with the condition that selects it ('Use run_sweep instead to have mltree launch a grid itself'). An agent knows both the follow-up step and when to pick the other tool.

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