Skip to main content
Glama

package_custom_block

Package a notebook branch into a standalone reusable Custom Block .ntop for in-place GUI hot-updates, preserving its UUID when needed so re-imports trigger nTop's native update prompt.

Instructions

Package a notebook branch into a standalone reusable Custom Block .ntop for in-place GUI hot-updates.

When output_path already exists and preserve_existing_uuid=True, the Custom Block's internal function UUID is preserved so re-importing it (File -> Import -> Custom Block) inside an already-open parent notebook triggers nTop's native "Update Custom Block" prompt without closing the main window.

Args: notebook_path: Source .ntop file path. output_block: Block ID or unique name to set as the Custom Block's output. output_path: Destination .ntop path for the Custom Block. block_name: Display name of the Custom Block in nTop. input_targets: Optional list of variable IDs/names to promote to Custom Block inputs. description: Optional Custom Block description. prune: If True (default), prune blocks unrelated to output_block. preserve_existing_uuid: If True and output_path exists, preserve its existing def.function UUID for hot-update. verify_with_ntopcl: If True (default), run ntopcl -t to confirm valid Custom Block inputs & output.

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>",
      "output_block": "<output_block>",
      "output_path": "<output_path>",
      "block_name": "<block_name>"
    },
    "name": "package_custom_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
pruneNo
block_nameYes
descriptionNo
output_pathYes
output_blockYes
input_targetsNo
notebook_pathYes
verify_with_ntopclNo
preserve_existing_uuidNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does meaningful work: it discloses that `prune` drops unrelated blocks by default, that `verify_with_ntopcl` spawns an external `ntopcl -t` process, and that the destination file is written at `output_path`. It omits what happens if `output_path` exists and `preserve_existing_uuid=False` (overwrite? fail?), whether the source notebook is mutated, and what occurs when verification fails.

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 purpose and the hot-update rationale are front-loaded before the Args block, and each argument gets one line. The `preserve_existing_uuid` semantics are stated twice — once in the prose preamble and again in Args — which is mild redundancy but also reinforcing for the most subtle parameter.

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?

This is a 9-parameter file-writing mutation tool with no annotations, but an output schema exists so return values need no explanation, and the description supplies the workflow context, defaults, and the external-process side effect. Remaining gaps are edge-case dispositions (destination collision, source-notebook impact, verification-failure handling) rather than core calling information.

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?

Schema description coverage is 0% across 9 parameters, so the description must compensate, and the Args block does: it explains what `output_block`, `input_targets`, `prune`, `verify_with_ntopcl`, and `preserve_existing_uuid` actually change operationally, going well beyond the bare titles. Minor weakness: the `prev` behavior of `preserve_existing_uuid=False` is unstated and the `description` entry is circular, but overall the coverage gap is filled.

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?

Specific verb and resource: "Package a notebook branch into a standalone reusable Custom Block `.ntop`", plus the distinguishing outcome (in-place GUI hot-updates via preserved `function` UUID). No sibling in the list produces a packaged Custom Block artifact, so an agent can identify this tool's role without opening the 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 description gives a concrete usage scenario (re-importing into an already-open parent notebook via `File -> Import -> Custom Block` triggers nTop's native update prompt without closing the main window), which tells the agent exactly when this beats a plain export. It does not state exclusions or name alternatives such as `promote_to_input` or `prune_notebook_graph`, leaving the when-not guidance implicit.

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