Skip to main content
Glama

batch_edit_notebook

Apply multiple graph edits atomically in one transaction; validate changes in memory before saving, with optional ntopcl verification and nTop GUI reload.

Instructions

Atomically apply multiple graph edits (with $alias references) in a single transaction.

All operations run in memory first; the file is only saved if graph validation passes (and if verify_with_ntopcl=True, only if ntopcl evaluates verify_target with zero errors). Pass auto_reload_gui=True to automatically close the old nTop GUI window (if no unsaved Autosave edits) and reopen the updated file in a single clean window.

Supported op types: add_section, add_literal, add_block, add_variable, set_literal, rewire_input, set_output, set_visibility, promote_to_input.

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>",
      "operations": "<operations>"
    },
    "name": "batch_edit_notebook"
  }
}

Input Schema

NameRequiredDescriptionDefault
overwriteNo
operationsYes
output_pathNo
notebook_pathYes
verify_targetNo
auto_reload_guiNo
force_if_unsavedNo
verify_with_ntopclNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it discloses atomicity, in-memory-first execution, that the file is saved only if graph validation passes, the extra ntopcl gate, and the precondition that the GUI reload requires no unsaved Autosave edits. Not disclosed: what happens on validation failure, whether existing edits are rolled back, or any auth/permission requirements.

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?

Front-loaded with the core semantics in the first clause, then progressively narrower details (transaction behavior, verification gate, GUI reload, op catalog). Dense but every sentence carries information; only the GUI-reload sentence is arguably secondary to the editing contract.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The presence of an output schema means return values need not be explained, and the description covers the edit-and-commit contract well. However, for an 8-parameter write tool with zero annotation and zero schema-description coverage, silently omitting `overwrite`, `output_path`, and `force_if_unsaved` leaves the agent guessing about where the result lands and how to override the unsaved-edits guard.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 8 parameters, so the description must compensate. It adds real meaning for `operations` (the nine op types, `$alias` referencing), `verify_with_ntopcl`, `verify_target`, and `auto_reload_gui`, but `notebook_path`, `output_path`, `overwrite`, and `force_if_unsaved` are left entirely unexplained, including how `output_path`/`overwrite` interact with saving.

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?

Opens with a specific verb+resource+scope: 'Atomically apply multiple graph edits ... in a single transaction', then enumerates the nine supported `op` types. This clearly separates it from the single-operation siblings such as `add_notebook_block`, `set_notebook_literal`, and `rewire_block_input`, which an agent can rule out without opening either schema.

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?

The 'multiple edits / single transaction' framing plus the enumerated op list makes the selection condition (batch of edits, all-or-nothing) clear. It also states the conditional behavior of `verify_with_ntopcl` and when `auto_reload_gui` will and will not succeed. It never explicitly names a sibling as the alternative for single edits, so it stops short of explicit when-not guidance.

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