Skip to main content
Glama

delete_node

Delete an integer key from a specified BST or AVL tree, updating the tree and rebalancing AVL trees as needed.

Instructions

Delete a key from the specified tree.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe integer key to delete
treeTypeYesThe type of tree to delete from

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden for a destructive mutation, yet it says nothing about irreversibility, what happens if the key is absent (error vs silent no-op), or whether an AVL tree rebalances after removal. These are exactly the traits an agent needs before calling a delete.

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?

A single short sentence with the action front-loaded and no filler. It is efficient, though the terseness contributes to the missing behavioral detail rather than reflecting deliberate economy.

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

Completeness2/5

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

For a two-parameter destructive tool with no annotations and no output schema, the description should at minimum say what is returned or what occurs when the key is not found, and it does not. An agent could invoke it but cannot predict the outcome.

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 100% and the enum on treeType ('bst'/'avl') is self-documenting, so the schema does the heavy lifting. The description adds no format or constraint detail beyond what is already structured, which is the baseline-3 case.

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?

States a specific verb ('Delete') and resource ('a key from the specified tree'), so the operation is unambiguous. It does not, however, differentiate itself from sibling reset_tree, which also removes data, leaving the agent to infer that this deletes one key rather than clearing the tree.

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?

No guidance on when to use this versus reset_tree (bulk removal) or on prerequisites such as the key existing in the tree. Usage must be inferred entirely from the name.

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