Skip to main content
Glama
ossenna-hq

ltspice-mcp

by ossenna-hq

measurement_stats

Read-onlyIdempotent

Aggregate .MEAS scalar results across .step sweeps or Monte Carlo runs. Compute min, max, mean, median, std, and percentiles to identify worst-case values and parameter drift.

Instructions

Use to AGGREGATE .MEAS scalar results across a .step sweep or Monte Carlo run. Answers questions like 'across 100 MC trials, what's the worst-case rise time?' or 'how does gain vary as R sweeps 1k..10k?'. Inputs the .log file produced by the run.

Returns per-measurement: min, max, mean, median, std, p10, p90, min_step_index (argmin) and max_step_index (argmax), failure count, and an optional histogram (set histogram_bins=0 to skip).

Accepts any job id: a sweep/MC batch aggregates across its runs; a single-simulation job aggregates its own log (one value per step for a .step run). WHEN-style .MEAS (constant level, varying crossing) is detected the same way on both paths and swaps to aggregating the 'at' (crossing) field; the aggregated_field output says which was used. On a plain single run, stats collapse to n=1 (one value per measurement): the headline stats are the value the simulator printed — for a WHEN that's the trigger level — and any AT/crossing time is returned separately in the entry's 'at' field, so a single-run WHEN/AT read isn't lost. (simulation_summary also just reads the raw scalars.)

Works with .MEAS from any analysis type (.tran/.ac/.dc/.op) — the measurement directives themselves embed the analysis context. Pass measurement=NAME to aggregate just one; otherwise returns all .MEAS in the log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNo'json' or 'text'
job_idNoJob ID. For a batch job (``run_montecarlo`` / ``run_sweep``) the tool loads each completed run's log, concatenates the .MEAS results (one row per run), and aggregates. For a completed single-simulation job it aggregates that run's log (per-step values for a .step run). Mutually exclusive with ``log_file``.
log_fileNoPath to .log file from a single ``.step`` run that already concatenates every step's .MEAS results. For Monte Carlo / multi-run sweep jobs that emit one log per run, pass ``job_id`` instead and the aggregator walks every run's log.
measurementNoIf given, stats for only this .MEAS; otherwise all measurements.
histogram_binsNoHistogram bin count. Set to 0 to skip histogram computation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statsYes
per_runNo
Behavior5/5

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

Annotations indicate readOnlyHint=true and idempotentHint=true, which are consistent with the description's non-destructive aggregation behavior. The description adds substantial behavioral details beyond annotations: it explains edge-case handling for WHEN-style .MEAS, the aggregated_field output, and behavior for single runs (n=1). It also notes what happens with different job types, enhancing transparency.

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 somewhat lengthy but front-loaded with the core purpose and examples. Each paragraph adds specific information, but some redundancy exists (e.g., repeating the job_id/log_file distinction already in the schema). It could be slightly condensed while maintaining clarity, but it is well-organized and not overly verbose.

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?

The tool is moderately complex with an output schema that likely covers return values. The description fully compensates for any gaps: it covers measurement aggregation, edge cases (WHEN-style), job types, and options like histogram_bins. It also mentions the output includes aggregated_field and 'at' fields, ensuring the agent understands the return format. This is comprehensive given the tool's complexity.

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 input schema already explains all parameters (job_id, log_file, measurement, histogram_bins, format). The description adds value by explaining the distinction between job_id and log_file use cases (batch vs single-run logs), but this is minimal beyond the schema. For example, it clarifies that job_id is for batch jobs and log_file for single .step logs, which is useful but not extensive.

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 identifies the tool's purpose: aggregating .MEAS scalar results from .step sweeps or Monte Carlo runs. It uses a specific verb ('AGGREGATE') and capitalizes key terms (.MEAS, .step, Monte Carlo), giving concrete examples of questions it answers ('what's the worst-case rise time?'). It distinguishes itself by focusing on .MEAS aggregation, setting it apart from sibling tools like signal_stats or simulation_summary.

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?

The description explicitly states when to use the tool: for aggregating .MEAS results across a sweep or Monte Carlo run, or for single-simulation jobs. It also provides alternatives: 'simulation_summary also just reads the raw scalars' and 'Pass measurement=NAME to aggregate just one'. This clear when-to-use guidance differentiates it from siblings.

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/ossenna-hq/MCP_LTSpice'

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