Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Spice Measure

spice_measure

Derive steady-state, rise/fall time, overshoot, settling time, 3 dB bandwidth, or interpolated values from a simulation CSV to analyze circuit response without running ngspice.

Instructions

Derive a number from a simulation table (the result.csv of spice_simulate, or any CSV whose first column is the x axis): steady_state value, rise_time or fall_time (10 % to 90 %), overshoot (percent), settling_time (within a tolerance band), bandwidth_3db (low-pass -3.0103 dB frequency from an ac table), bandpass_3db (peak, lower and upper -3.0103 dB corners and bandwidth) or value_at (interpolated). Units follow the column (volt, ampere, decibel for .db, degree for .phase_deg). The formulas are in the result. Needs no ngspice.

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": {
      "csv_file": "<csv_file>",
      "measurement": "<measurement>"
    },
    "name": "spice_measure"
  }
}

Input Schema

NameRequiredDescriptionDefault
atNovalue_at only: the x position with unit, e.g. '1 ms' for a time table, '1 kHz' for frequency, '2 V' for a DC sweep
columnNoColumn name, e.g. 'v(out)' (ac tables: 'v(out)' means v(out).mag; use 'v(out).db' or '.phase_deg' to say otherwise). May be empty when the table has one data column.
csv_fileYesPath to the table, e.g. the result.csv artifact of spice_simulate (header row, first column = time, frequency or sweep)
toleranceNosettling_time only: half-width of the band as a share of the step, 0 < tol < 1 (default 0.02 = 2 %)
measurementYesOne of: steady_state, rise_time, fall_time, overshoot, settling_time, bandwidth_3db, bandpass_3db, value_at
final_fractionNoShare of the x span at the end that defines the steady-state value, 0 < f <= 0.5 (default 0.1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations the description carries the full burden: it discloses that the tool is pure post-processing ("Needs no ngspice") and that formulas live in the returned CSV, which is useful behavioral context. It does not state that the operation is read-only/non-destructive, nor what happens on insufficient data, a missing column, or an inapplicable measurement — real gaps for an unannotated tool.

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 the purpose, then the measurement catalog, then unit and dependency notes in two short closing sentences. The long parenthetical measurement list is dense but every clause carries information; there is almost no 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?

For a 6-parameter computation tool with no output schema and no annotations, the description covers purpose, valid measurement values, units, and the surprising fact that no simulator is needed. What's missing is failure behavior and confirmation that exactly one scalar number is returned per call.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3; the description earns an extra point by defining the semantics of each measurement option (rise/fall 10–90 %, overshoot as percent, settling within a tolerance band, the -3.0103 dB thresholds) and by noting that units follow the column (volt, ampere, decibel, degree). It adds no detail on the at/column/tolerance/final_fraction interactions beyond the schema.

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?

Uses a specific verb plus resource ("Derive a number from a simulation table") and then enumerates exactly the eight measurement types. The reference to "the result.csv of spice_simulate" plus "Needs no ngspice" separates it cleanly from the simulation sibling and from geometry_measure.

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?

Clearly establishes the input context (post-simulation result.csv or any CSV with x in the first column) and the fact that no ngspice session is required, which tells the agent when this tool applies. It stops short of explicit when-not guidance, e.g. what to do if the table lacks an x column or if the requested measurement doesn't fit the data.

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

Deploy Server

Other Tools