Skip to main content
Glama

Delete blocks

geml_delete
DestructiveIdempotent

Remove blocks from a GEML document by id, address, or filter match; dangling references become diagnostics without blocking deletion, and selectors that match nothing are skipped.

Instructions

Remove one or more blocks, each named by an id or any address geml_list prints; a filter (=== type, {key=value}) removes every block it matches. Each block takes the blank line that separated it from its neighbours, so deleting what geml_add inserted leaves the file as it was. To undo a deletion, geml_revert the removed id; to change a block rather than remove it, use geml_set. References left pointing at a removed block come back as diagnostics but do NOT block the deletion — read them, then repair the references or revert. A selector that names nothing is skipped, so repeating a call changes nothing. Returns {ok, file, diagnostics, revision}, with notes when the write did something to say out loud (a block it dropped, an address it changed); a refusal is ok: false with a hint, and the file is unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesThe blocks to remove: ids or addresses
fileYesDocument path relative to the server's --root directory, e.g. notes/spec.geml

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.6
    • changedInput schema / properties / ids / description
      Previous value: -"Block ids to remove"New value: +"The blocks to remove: ids or addresses"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive/idempotent/not-read-only, and the description goes well beyond them: dangling references produce diagnostics but do NOT block deletion, repeated calls with unmatched selectors change nothing, a refusal returns ok:false with a hint and leaves the file unchanged, and notes appear when the write altered addresses. This is the exact behavioral context needed for a destructive mutation.

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 paragraph is long but front-loaded with the core action and every sentence carries non-trivial information (rollback, idempotence, diagnostics, refusal semantics). It loses a point only because the return-value detail could be tighter given no output schema exists to carry it.

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

Completeness5/5

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

With no output schema, the description compensates fully by spelling out the return shape (`{ok, file, diagnostics, revision}`, optional `notes`, refusal with `hint`). Combined with the behavioral warnings, an agent has everything needed to invoke and interpret the call.

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 100%, so the baseline is 3, but the description materially enriches the `ids` parameter: it accepts ids or 'any address geml_list prints', plus filter syntax (`=== type`, `{key=value}`) that removes every match. That selector grammar is not in the schema and is essential to calling the tool correctly.

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?

States a specific verb (remove) and resource (one or more blocks), and immediately distinguishes the operation from siblings by name (geml_add inserts, geml_set changes, geml_revert undoes). An agent can tell exactly what this does versus the other ten tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing: 'To undo a deletion, geml_revert the removed id; to change a block rather than remove it, use geml_set.' It also covers the no-op case (a selector naming nothing is skipped) and what to do about dangling references, so both when-to-use and when-not-to-use are covered.

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