Skip to main content
Glama

rewire_block_input

Rewire a block input to a new source block ID or update its expression string in a .ntop notebook; optionally write to a new path or overwrite with a snapshot.

Instructions

Rewire an input slot of a block to another block ID and/or update its expression string.

Args: notebook_path: Source .ntop file path. block_target: Block ID or unique block name to edit. input_index: 0-based index into the block's inputs array. new_instance_id: New source block ID to connect (or -1 to disconnect). expression: Optional expression string for this input slot. output_path: Optional destination .ntop file path. overwrite: If True and output_path is omitted, overwrite notebook_path in place (with timestamped snapshot).

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": {
      "notebook_path": "<notebook_path>",
      "block_target": "<block_target>",
      "input_index": "<input_index>"
    },
    "name": "rewire_block_input"
  }
}

Input Schema

NameRequiredDescriptionDefault
overwriteNo
expressionNo
input_indexYes
output_pathNo
block_targetYes
notebook_pathYes
new_instance_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does provide valuable non-obvious behavior: passing -1 as new_instance_id disconnects rather than connects, and overwriting in place creates a timestamped snapshot first. These are exactly the destructive/rollback facts an agent needs. It still omits error behavior (unknown block_target, out-of-range input_index) and whether the rewrite is reversible.

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 core action is front-loaded in one sentence, followed by a compact Args block where every line contributes information that the schema does not. It is docstring-shaped rather than prose, which is slightly repetitive of parameter names, but nothing is wasted.

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?

For a 7-parameter graph mutation with no annotations, the description covers the operation, the disconnect sentinel, and the snapshot safety net, and an output schema exists so return values need not be explained. Remaining gaps are error cases and permission/validation expectations.

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 0%, so the description must document all 7 parameters, and it does: 0-based indexing for input_index, block ID or unique name for block_target, the -1 sentinel for disconnection, and the output_path/overwrite interaction. It adds real semantics beyond the bare schema types, though it does not specify expression syntax or name-matching rules.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Rewire an input slot of a block to another block ID and/or update its expression string" gives a specific verb (rewire), a specific resource (block input slot), and names the two editable facets (source connection, expression). It is clearly distinct from add_notebook_block or add_notebook_literal, though it never names a sibling it could be confused with (e.g. promote_to_input).

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

Usage Guidelines2/5

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

There is no when-to-use or when-not guidance, and no routing to alternatives such as promote_to_input or batch_edit_notebook, which plausibly overlap with editing a block's input wiring. The only conditional guidance is inside the parameter notes (overwrite behavior, -1 to disconnect), which is capability description rather than usage selection.

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