Skip to main content
Glama

circuit_step

Destructive

Puts the circuit opened with build_circuit together, one step after another, each checked as the lab checks it: a card type from the catalog (list_primitives), ports by name, settings inside their ranges and the cards the account's plan has. Steps run in order; one that cannot be done stops the rest and says why, and the ones before it stay done. The answer gives each card's id, ports and settings, the wires, and what the circuit still needs before it runs.

    Args:
        steps: One to twelve steps, each an object with an op:
            {"op": "add_card", "type": "ticker", "id": "tk", "params": {"symbol": "KO"}, "after": "x"}
                a card from the catalog; id (optional, lower case, like "tk") names it, after (optional)
                places it to the right of another card; params left out keep the card's own
            {"op": "connect", "from": "tk.ticker", "to": "tpl.ticker"} an output port to an input port
            {"op": "set_card", "card": "bt", "params": {"horizon": "2y"}} changes settings
            {"op": "remove_card", "card": "tk"}; {"op": "disconnect", "from": "...", "to": "..."}
            {"op": "set_anchor", "date": "YYYY-MM-DD"} the day the forward test starts from (else the last
                three years, up to the last month's end)
            {"op": "clear"} empties the circuit
            A Signal Module's rule is its config, one JSON object written as text, e.g. {"direction": "long",
            "entry": {"indicator": "rsi", "params": {"length": 2}, "operator": "crosses_below", "value": 10},
            "exit": {"indicator": "rsi", "params": {"length": 2}, "operator": "crosses_above", "value": 70},
            "confirm": null}. A forward test covers three years at most; asked for more, it is held at three.
            The SEC cards: sec_insider_buying, sec_fund_holdings, sec_company_industry and report_words each
            take a universe's stockset and hand their survivors to a portfolio_builder and a
            portfolio_backtest; sec_company_events and sec_activist_stakes are each a test on their own, a
            universe's stockset in.
    

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": {
      "steps": "<steps>"
    },
    "name": "circuit_step"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description adds substantial behavioral detail beyond the annotations: steps run in order, a failing step stops the rest while prior steps remain applied, and the response includes card ids, ports, settings, wires, and remaining requirements. It also discloses constraints such as the three-year forward-test cap and special SEC card semantics, consistent with the mutation and destructive annotations.

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?

The description is front-loaded with purpose and then structured into an Args section with detailed op examples, which suits the complexity. It is somewhat dense and prose-heavy, but most detail earns its place by covering otherwise undocumented parameters.

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 the near-empty input schema and no output schema, the description supplies the missing operational semantics: step ordering, failure behavior, return content, forward-test limits, and special card families. It is complete enough for an agent to invoke the tool 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 input schema describes almost nothing about the steps array or its objects. The description compensates thoroughly by documenting each op type (add_card, connect, set_card, remove_card, disconnect, set_anchor, clear) with examples, optional fields, and a full Signal Module rule JSON example.

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 states a specific verb and resource: it puts together the circuit opened with build_circuit, one step at a time. It clearly distinguishes this assembly/step tool from siblings like build_circuit and run_circuit by describing its role in the workflow.

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

Usage Guidelines4/5

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

It establishes the prerequisite context by referencing the circuit opened with build_circuit and points to list_primitives for card types. It does not explicitly enumerate when to use this instead of alternatives such as circuit_draft or run_circuit, but the workflow role is clear.

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