Skip to main content
Glama
ossenna-hq

ltspice-mcp

by ossenna-hq

resonance

Read-onlyIdempotent

Detect resonance peaks in AC sweeps to estimate Q factor and -3 dB bandwidth for RLC circuits, crystals, and peaking amplifiers.

Instructions

Detect magnitude peaks in an AC sweep and estimate Q factor + -3 dB bandwidth for each. Useful for RLC resonators, crystal oscillators, peaking amps, or any response with distinct resonant modes.

Q = f_peak / Δf(-3 dB from peak). Q is returned as null for peaks without two flanking -3 dB crossings inside the swept range — widen the sweep if you need Q for a boundary peak.

min_prominence_db=3 rejects the gentle hump of a filter's passband (which isn't a resonance). Tight resonances (Q > 30) need dense sampling near f_peak — log sweeps with <50 pts/decade will under-sample the peak and give inflated Q/bandwidth.

For overall filter characterization use bode_metrics(mode='filter'); for stability margins use stability_metrics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepNoStep index for .step sweeps
formatNo
job_idNoAnalyze a completed job run by id instead of a raw_file path; pair with ``run_index``. Lets you read a sweep / Monte-Carlo run's peaks.
signalYesSignal name (e.g. 'V(out)')
raw_fileNoPath to AC analysis .raw result file. Pass this OR ``job_id`` (a job run), not both.
max_peaksNoMaximum peaks returned (1..1000)
run_indexNo0-based run to analyze when ``job_id`` is given (default 0).
min_prominence_dbNoMinimum peak prominence in dB. Smaller = more sensitive but also catches gentle humps. 3 dB rejects filter-passband shoulders.
min_separation_decadesNoMerge peaks closer than this many decades (find_peaks can emit duplicates on shoulders).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
peaksYes
signalYes
warningsYes
num_peaks_detectedYes
Behavior5/5

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

Annotations declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the tool is safe for reads. The description adds value beyond these by explaining the Q calculation formula, null behavior for boundary peaks, the effect of min_prominence_db (rejecting passband humps), and the sampling-density warning for high-Q resonances. No contradiction with annotations.

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 well-structured and front-loaded with the core purpose. Each sentence provides actionable information: the formula, the null case, the prominence default, the sampling warning, and alternative tools. No filler. The length is appropriate for the tool's complexity.

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?

Given the tool's moderate complexity, high schema coverage, and presence of an output schema, the description covers critical edge cases (boundary peaks, sampling density, prominence filtering) and directs users to alternative tools. It fully compensates for any gaps in the structured data.

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 89%, so most parameters are documented. The description adds semantic insight: it explains min_prominence_db's role in rejecting gentle humps, min_separation_decades merging behavior, and the impact of log sweep density on Q accuracy. It also clarifies the default behavior of parameters like step. While not exhaustive, it meaningfully enriches 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?

The description clearly states the verb ('Detect magnitude peaks in an AC sweep and estimate Q factor + -3 dB bandwidth for each') and the resource (AC sweep peaks). It explicitly distinguishes from siblings like bode_metrics and stability_metrics by naming them and their different purposes, and lists specific use cases (RLC resonators, crystal oscillators, peaking amps).

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?

Provides explicit when-to-use context (for resonant modes) and alternative tool guidance: 'For overall filter characterization use bode_metrics(mode='filter'); for stability margins use stability_metrics.' Also explains when Q is not returned (boundary peaks) and advises widening sweep or adjusting sampling. This is strong usage guidance.

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