Skip to main content
Glama

run_parameter_sweep

Run batch DOE or parameter sweeps on nTop notebooks with explicit input sets or Cartesian grids, then save per-run outputs and a consolidated CSV summary.

Instructions

Run a batch DOE / parameter sweep across multiple input sets using ntopcl.

Provide EITHER parameter_sets (list of explicit input dicts) OR parameter_grid (dict of {param_name: [v1, v2, ...]} expanded as a Cartesian product).

Args: notebook_path: Path to the .ntop notebook. parameter_sets: Explicit list of parameter dictionaries, one per run. parameter_grid: Cartesian grid dictionary of parameter value lists. output_dir: Directory to store run_000/, run_001/, ... and sweep_summary.csv. max_workers: Parallel ntopcl worker processes (default 1). max_threads_per_run: Pass -m to each ntopcl invocation. include_properties: Pass -p to include top-level properties in each output.json. trust_notebook: Pass --trustnotebook if needed. timeout_per_run: Timeout per individual run in seconds. export_csv: Write a consolidated sweep_summary.csv table.

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": {
      "notebook_path": "<notebook_path>"
    },
    "name": "run_parameter_sweep"
  }
}

Input Schema

NameRequiredDescriptionDefault
export_csvNo
output_dirNo
max_workersNo
notebook_pathYes
parameter_gridNo
parameter_setsNo
trust_notebookNo
timeout_per_runNo
include_propertiesNo
max_threads_per_runNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the on-disk footprint (`run_000/`, `run_001/`, `sweep_summary.csv`), that max_workers spawns parallel `ntopcl` worker processes, and which CLI flags are forwarded (`-m`, `-p`, `--trustnotebook`). It stops short of stating failure/timeout consequences, whether existing output_dir contents are overwritten, or resource cost of parallelism.

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?

Front-loaded with purpose and the either/or constraint before the Args block, so an agent gets the essential contract in the first two sentences. The backtick-heavy flag mappings add some noise, but no sentence is genuinely redundant.

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 needn't be explained, and every parameter is documented along with the on-disk outputs. Missing are preconditions (environment/`ntopcl` availability) and behavior when a run fails or times out — gaps for a 10-parameter batch tool with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the schema supplies only titles, yet the Args block explains all ten parameters with meaning beyond the title — cataloging what parameter_grid expansion does (Cartesian product), what -m/-p/--trustnotebook map to, and what export_csv produces. This fully compensates for the empty schema documentation.

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?

States a specific verb+resource: 'Run a batch DOE / parameter sweep across multiple input sets using `ntopcl`'. The word 'batch' and the sweep framing distinguish it from the single-run siblings run_notebook/run_notebook_async, but no sibling is named explicitly, so the agent must infer the boundary.

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

Usage Guidelines3/5

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

The description gives one strong selection rule — 'Provide EITHER `parameter_sets` ... OR `parameter_grid`' — which constrains how to call it. However, it never says when to choose a sweep over run_notebook, nor what prerequisites (e.g. an `ntopcl` environment) must exist, so the when-to-use decision against alternatives is left implicit.

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