Skip to main content
Glama

GEML — a plain-text document format built to be edited in place, one section at a time

Rename a block id

geml_rename
Idempotent

Rename a block id AND every reference to it in the same document, in one id-boundary-safe write. Use this rather than geml_set or a text search-and-replace, which would also hit ids that merely share a prefix. A Markdown heading's anchor is its text, so it is renamed by changing the heading with geml_set (part: head), not here. An old id that does not exist, or a new one already taken, is refused. 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. This server is STATELESS: the document travels in source and a write comes back as document for you to save; it holds no other documents, so a cross-document reference such as [[other.geml#id]] cannot be resolved here and is reported as unresolvable-document.

Input Schema

NameRequiredDescriptionDefault
newYesNew id
oldYesCurrent id
nameNoThe document's file name, e.g. notes/spec.geml or README.md — it decides whether the text is read as GEML or as Markdown (a `.md` name), and it is how the document is called in messages. Default: document.geml.
sourceYesThe document's full text. This server keeps no files: what you send is the document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly=false, destructive=false, idempotent=true), and the description adds substantial context on top: refusal semantics (nonexistent `old`, taken `new`), the returned payload shape, a `notes` channel for side effects, refusal behavior with `hint` and an unchanged file, and the stateless document-in/document-out model including why cross-document refs surface as `unresolvable-document`.

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?

Front-loaded with the core behavior and scope, and each sentence carries distinct information (alternatives, Markdown exception, refusal rules, return shape, stateless model). It is dense and long for a 4-param tool, with the stateless explanation partly restating the schema's 'this server keeps no files', but nothing is padding.

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?

No output schema exists, and the description compensates fully by documenting the return shape (`{ok, file, diagnostics, revision}`, optional `notes`, `ok: false` with `hint`). Combined with the statelessness and cross-document limitation, an agent has everything needed to call and interpret the 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 100%, so the baseline is 3, but the description adds meaning beyond the terse schema text: `old` must exist and `new` must be free or the call is refused, and `name` is what selects GEML vs Markdown interpretation. That is real semantic value over 'Current id' / 'New id'.

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+resource (rename a block id) and immediately narrows scope: it renames the id AND every reference to it in one boundary-safe write. It explicitly distinguishes itself from geml_set and from plain text search-and-replace, so an agent can pick it apart from siblings without opening any schema.

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?

Gives explicit when-to-use guidance ('Use this rather than geml_set or a text search-and-replace, which would also hit ids that merely share a prefix') and a clear when-not-to-use carve-out: Markdown heading anchors must be changed via geml_set on `part: head`, not here. Alternatives and exclusion conditions are both named.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.