Skip to main content
Glama
Suzu-Gears

circuitjs-mcp

by Suzu-Gears

Evaluate JavaScript against the simulator

eval_js

Run arbitrary JavaScript inside CircuitJS1, using the sim object to inspect components and return JSON-serializable results.

Instructions

Advanced escape hatch: run arbitrary JavaScript inside the CircuitJS1 page. The code is the body of an async function receiving sim (the CircuitJS1 object, see https://www.falstad.com/circuit/doc/js-interface.html). Return a JSON-serializable value. Example: "return sim.getElements().filter(e => e.getType()==='ResistorElm').map(e => e.getCurrent())".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
Behavior4/5

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

With no annotations, the description carries the transparency burden. It clearly explains the execution model: code becomes an async function body, receives the `sim` object, and must return a JSON-serializable value. It does not spell out side effects or error behavior, but the phrase 'run arbitrary JavaScript' strongly implies mutating potential.

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 plus one example carry high information density with no filler. The core operational facts are front-loaded, and the example earns its place by clarifying the expected code shape.

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?

The description covers how to invoke the tool, what the code receives, the return contract, and links to the simulator's documented interface. It lacks explicit caveats about side effects or serialization failures, but given the tool's arbitrary-code nature and the provided example, an agent has enough to call it correctly.

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?

The single `code` parameter is fully elaborated despite 0% schema description coverage. The description defines what the code should look like, what context it receives, what it must return, and provides a practical example. This fully compensates for the schema's minimal parameter definition.

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 names a specific verb and resource: run arbitrary JavaScript inside the CircuitJS1 page. The 'advanced escape hatch' framing and concrete example clearly distinguish it from the sibling tools, which are more specialized operations.

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?

Usage context is only implied by 'Advanced escape hatch,' suggesting it is a fallback when the standard tools cannot express the needed operation. It does not explicitly state when not to use it or name any sibling alternatives for common cases.

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/Suzu-Gears/circuitjs-mcp'

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