Skip to main content
Glama
lucasgerads

spicelib-mcp

by lucasgerads

run_ac_analysis

Run an AC frequency sweep on a SPICE netlist to analyze frequency response. Results saved as .npz file containing frequency and complex traces.

Instructions

Run an AC frequency sweep on a SPICE netlist.

Injects a .ac dec <points_per_decade> <start_freq> <stop_freq> command into a temporary copy of the netlist (does not modify the original).

Results are saved to a .npz file next to the netlist. Load with: data = np.load('netlist_ac.npz') freq = data['frequency_hz'] # traces are stored as complex values, e.g. data['v(out)']

For sweeping a component value or parameter across multiple AC runs in parallel, use run_sweep(analysis_cmd=".ac dec N fstart fstop") instead.

Args: netlist_path: Absolute path to the netlist file (.net, .sp, .cir, etc.) start_freq: Start frequency with optional SPICE suffix, e.g. "1", "1k", "100" stop_freq: Stop frequency, e.g. "1G", "100meg" points_per_decade: Points per decade (default 20)

Returns: JSON summary with data_file path, frequency range, and trace names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
netlist_pathYes
start_freqYes
stop_freqYes
points_per_decadeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, but description discloses non-destructive behavior (temporary copy), output format (.npz), and how to load results. Could mention prerequisite netlist existence but still strong.

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?

Well-structured with paragraphs, front-loaded purpose, and an Args table. Every sentence provides essential information with no waste.

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?

Covers parameters, non-modification, output file details, and return format. Output schema exists but description's Returns section adequately describes the result. Complete for this tool.

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?

Despite 0% schema coverage, description includes an Args section with clear explanations and examples for each parameter (e.g., SPICE suffix for frequencies), adding significant meaning beyond 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?

Clearly states it runs an AC frequency sweep on a SPICE netlist, injects .ac command, does not modify original. Distinguishes from sibling run_sweep which is for parameter sweeps.

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 says to use run_sweep instead for sweeping component values across multiple AC runs, providing clear when-to-use and alternative.

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/lucasgerads/spicelib-mcp'

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