Skip to main content
Glama

Simulate a Rust circuit: power on every wire and which devices run

simulate_circuit
Read-onlyIdempotent

[Calculators] Simulate a Rust circuit: power on every wire and which devices run. The circuit simulator's solver (https://rust.wiki/calculators/circuit-simulator), Rust's power rules since the April 2024 rework: each part's inputs and outputs (rW), whether it's on, device and battery status ("Needs 10, gets 4", "Empty in 4 h 0 min"), the power on every wire, power_generated, devices_on of devices_total, and a page link that opens the same circuit on the board. A device takes its full draw or nothing; splitters share evenly between connected outputs; batteries give only what the parts after them draw, up to their maximum. Wiring something back into itself is reported as short_circuit. Part and device names come from get_circuit_parts / get_electricity_data. Give the user the page link: it opens the circuit on the interactive board.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "parts": "<parts>"
    },
    "name": "simulate_circuit"
  }
}

Input Schema

NameRequiredDescriptionDefault
partsYesComma-separated `label:Part` - a part from /calculators/circuit-simulator (Large Solar Panel, Wind Turbine, Large Battery, Splitter, Electrical Branch, Switch, AND Switch...) or a powered device by name (Auto Turret, Ceiling Light, SAM Site...). Settings in brackets: `b:Large Battery(charge=50)`, `br:Electrical Branch(b=10)`, `sw:Switch(state=0)`.
wiresNoComma-separated `from>to` wires between labels, each end optionally `.port` - a port name or 1-based number (`sp.Out 2>t`, `br.Branch Out>l`, `g>sw.Switch On`). Default: first output to first input.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare a safe read-only, idempotent, closed-world operation, and the description goes well beyond them by stating the solver's rules: a device takes its full draw or nothing, splitters share evenly across connected outputs, batteries supply only what downstream parts draw, and self-wiring is reported as short_circuit. That is exactly the simulation semantics an agent needs to interpret results.

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?

It is front-loaded with the purpose, then the returned fields, then the wiring rules. There is mild redundancy: the title restates the first sentence, and the 'page link opens the circuit on the board' idea appears twice.

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?

With no output schema, the description compensates by enumerating the returned fields (inputs/outputs in rW, on state, device/battery status strings, per-wire power, power_generated, devices_on of devices_total, page) so an agent knows what it gets back. For a two-parameter simulation tool this is complete.

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 description coverage is 100%, so the baseline is 3, and the description adds real value by pointing to get_circuit_parts / get_electricity_data as the source of valid part and device names, plus naming the configurable device and part families. It stops short of explaining the bracket-settings or port syntax itself, which the schema already covers.

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 opens with a specific verb plus resource ('Simulate a Rust circuit') and immediately scopes the result ('power on every wire and which devices run'), which separates it cleanly from calculate_power or the get_circuit_parts / get_electricity_data lookups it references.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It tells the agent where valid part and device names come from (get_circuit_parts / get_electricity_data) and instructs giving the user the page link, which is real contextual guidance. However, there is no explicit 'use this when X, not calculate_power' routing or statement of when-not to use it, so usage is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources