Skip to main content
Glama

set_component_attribute

Idempotent

Updates a specific component attribute in an LTspice .asc schematic. Handles standard slots like SpiceLine, Value, and SpiceModel, and supports arbitrary key=value pairs via SpiceLine.

Instructions

Set a schematic-only component attribute. The standard LTspice slots are Value, Value2, SpiceLine, SpiceLine2, SpiceModel, InstName — anything else is rejected, since LTspice silently ignores unknown SYMATTR keys at netlist time. To set arbitrary KEY=val pairs (e.g. W=10u L=0.5u), pass them as the SpiceLine value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to .asc schematic
referenceYesComponent reference (e.g., 'M1', 'R1')
attributeYesAttribute name (e.g., 'SpiceLine', 'SpiceModel', 'Value2')
valueYesAttribute value (e.g., 'W=10u L=0.5u')
Behavior4/5

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

Annotations already indicate write operation and idempotency. Description adds constraints (only specific slots accepted) and netlist behavior (silently ignores unknown SYMATTR keys). No contradiction. Misses noting that setting an attribute overwrites previous value, but idempotent hint mitigates this.

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?

Two sentences that front-load the purpose and add crucial details. Every sentence earns its place with no fluff.

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?

Comprehensive enough for a constrained set operation. With 4 required parameters fully described, and no output schema needed for a side-effect tool, the description covers key behavioral constraints and usage tips. Could mention if attribute names are case-sensitive, but not essential.

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?

All 4 parameters have schema descriptions (100% coverage). Description adds meaning by listing valid attribute values and giving examples like 'W=10u L=0.5u' for SpiceLine, enriching understanding 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?

Clearly states 'Set a schematic-only component attribute' with specific verb and resource. Lists standard LTspice slots (Value, Value2, etc.) and indicates what is rejected, distinguishing it from siblings like set_component_value.

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 when to use (to set standard slots) and what not to use (anything else rejected). Provides alternative: for arbitrary KEY=val pairs, pass as SpiceLine. This is clear guidance on when and how to use versus alternatives.

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