Skip to main content
Glama

resonance

Read-onlyIdempotent

Detect magnitude peaks in an AC sweep and calculate Q factor with -3 dB bandwidth for resonant circuits like RLC resonators or crystal oscillators.

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
raw_fileYesPath to AC analysis .raw result file
signalYesSignal name (e.g. 'V(out)')
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).
max_peaksNoMaximum peaks returned (1..1000)
stepNoStep index for .step sweeps
formatNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
peaksYes
num_peaks_detectedYes
warningsYes
signalYes
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, and idempotentHint. Description adds value by explaining that Q is returned as null for boundary peaks without flanking crossings and warns about under-sampling causing inflated Q/bandwidth. 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is well-structured with purpose first, then usage notes and parameter tips. It is somewhat verbose but each sentence adds value. Could be slightly more concise, but still effective.

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?

Given the complexity (7 parameters, output schema exists), the description is fairly complete. It covers the Q calculation formula, null case, and practical advice. With an output schema, return values need not be detailed here.

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 high (86% or more), so baseline is 3. Description adds extra context: explains min_prominence_db in detail and mentions min_separation_decades for merging duplicates, which goes beyond the schema descriptions.

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 it detects magnitude peaks in AC sweep and estimates Q factor and -3 dB bandwidth. This specific verb+resource combination distinguishes it from sibling tools like bode_metrics and stability_metrics.

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?

Explicitly states when to use (RLC resonators, crystal oscillators, peaking amps) and when not to use (for filter characterization use bode_metrics; for stability margins use stability_metrics). Also provides parameter advice like min_prominence_db and sampling density.

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/Cognitohazard/ltspice-mcp'

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