Skip to main content
Glama
ossenna-hq

ltspice-mcp

by ossenna-hq

edit_directive

Add or remove SPICE directives and comments in LTspice circuits, with exact or regex matching to ensure errors surface immediately.

Instructions

Add or remove a SPICE directive or .asc free-text comment. Set kind=comment for annotation text; default is a SPICE directive. Works on .cir/.net and .asc; kind=comment is .asc-only. remove matches against directives AND comments, so callers can delete either kind without knowing which it is. Adding a .param is not supported here — use the 'parameter' tool to set .PARAM values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoOptional X coordinate when adding to an .asc schematic. Default: directives are auto-placed in free space near the schematic's lower-left; comments default to the sheet origin (0,0).
yNoOptional Y coordinate (see ``x``).
kindNo``directive`` (default) — emit a SPICE directive line. ``comment`` — emit a free-text annotation. .asc-only; the tool refuses ``kind='comment'`` on .cir/.net since plain netlists already accept ``*`` / ``;`` comments inline.directive
pathYesPath to circuit file (.cir, .net, or .asc)
sizeNoFont size (.asc only). 1=small, 2=normal (default), 3=large.
actionYesWhether to add or remove the directive
instructionYesSPICE directive text (e.g., '.tran 10m', '.ac dec 100 1 1G'). For ``kind='comment'`` this is the comment text instead. For remove: literal exact match by default — copy the line verbatim from ``read_circuit``. Pass ``regex:<pattern>`` to use a regex (matches against directives AND comments). Raises an error when nothing matched, so a typo can't silently leave the directive in place.
Behavior4/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, which are somewhat ambiguous, but the description discloses key behavioral traits: comment is .asc-only (with refusal on .cir/.net), remove uses exact match or regex, and errors when nothing matches to prevent silent failures. This adds value beyond the sparse annotations, though it could mention idempotency or side effects more explicitly.

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 compact, front-loaded with the core purpose and key rules, and every sentence earns its place. It covers the essential distinctions (kind, file types, remove behavior, param exclusion) without padding, making it easy to scan.

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 7 parameters (3 required) and no output schema, the description covers the tool's operation thoroughly: file type constraints, default behaviors, matching semantics for remove, error handling, and cross-tool guidance. Combined with the detailed schema, an agent has sufficient information to select and invoke it correctly.

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 100% with rich param descriptions, so baseline is 3. The description enhances semantics by clarifying that 'instruction' holds directive text, comment text, or regex patterns for remove, and by noting the auto-placement behavior for x/y coordinates. It adds practical value like the regarding comment-only on .asc, which the schema already notes but the description reinforces via examples.

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 tool adds or removes SPICE directives or .asc free-text comments, specifying the two kinds and the file types. It distinguishes from the 'parameter' sibling by explicitly excluding .param support, and the resource (directive/comment) is well-defined.

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?

It provides detailed when-to-use guidance: default kind is directive, comment is .asc-only, and removal matches both kinds. It explicitly directs callers to use the 'parameter' tool for .param, and instructs to copy lines verbatim from read_circuit for remove operations, minimizing ambiguity.

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