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
| Name | Required | Description | Default |
|---|---|---|---|
| prune | No | ||
| block_name | Yes | ||
| description | No | ||
| output_path | Yes | ||
| output_block | Yes | ||
| input_targets | No | ||
| notebook_path | Yes | ||
| verify_with_ntopcl | No | ||
| preserve_existing_uuid | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |