Skip to main content
Glama

delete_node

Delete a single node and its entire subtree from a mindmap, including cleanup of links pointing to deleted nodes. The root node cannot be deleted.

Instructions

Delete a single node and its entire subtree from a mindmap.

This is the SAFE way to delete a node. It reads the full mindmap, removes the target node and all its descendants, cleans free_links pointing to deleted nodes, and syncs the remaining nodes back.

The root node (parent=0) cannot be deleted — returns an error.

The algorithm mirrors the Flutter client's MindMapManager._deleteNodeRecursive:

  1. Recursively collect all descendant order_indexes

  2. Clean free_links in remaining nodes that point to deleted nodes

  3. Remove all deleted nodes in one pass

  4. Sync the remaining nodes back

Args: id_mindmap: Mindmap ID order_index: Order index of the node to delete (1-based)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_mindmapYes
order_indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: recursive subtree deletion, cleaning of free_links, and that the root node cannot be deleted. It also references the algorithm steps, offering deep transparency.

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 well-structured with a concise first-line summary followed by detailed sections. It is efficient but includes algorithm steps that, while informative, could be slightly trimmed for tighter focus.

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?

The description covers key aspects: what it does, constraints, algorithm details. An output schema exists but is not referenced, and lack of mention about idempotency or node existence handling is a minor gap. Overall, it is sufficiently complete for a deletion tool.

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 coverage is 0%, so the description compensates by explaining that 'order_index' is 1-based and that 'id_mindmap' is the mindmap ID. While the schema provides types, the description adds semantic meaning beyond the bare property titles.

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 clearly states 'Delete a single node and its entire subtree from a mindmap' with a specific verb, resource, and context. It distinguishes from sibling tools like delete_assignment or delete_message by focusing on mindmap nodes and noting the subtree deletion.

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 labels this as 'the SAFE way to delete a node' and explains the algorithm, providing context for when to use it. However, it does not explicitly mention alternatives or scenarios where other tools might be preferred (e.g., bulk deletions), though few siblings directly compete with this function.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sebastien-VZN/axomind-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server