Skip to main content
Glama

replace_table

Replace an entire table in Markdown or GitBook HTML with new pipe-table content, using a version hash to ensure the update targets the correct revision. Original formatting is preserved.

Instructions

Replace an entire table with new content. Requires version from read_table.

Provide new_content as a pipe table string (header row + delimiter + data rows). The server writes back in the ORIGINAL file format: pipe stays pipe, GitBook HTML stays GitBook HTML (attributes preserved).

On success returns ONLY v:{new_hash}. On error returns JSON with "error" and "message" fields.

Args: file_path: Absolute path to the Markdown file. table_index: 0-based table index from list_tables. version: 12-char hex hash from read_table (after "v:"). new_content: Full pipe table string including header and delimiter rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionYes
file_pathYes
new_contentYes
table_indexYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and succeeds: it specifies success return format ('v:{new_hash}'), error format (JSON with 'error' and 'message'), and a notable side effect (preserving the original file format, including GitBook HTML attributes). It also implies concurrency control by requiring a version hash.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lean and front-loaded: action, key prerequisite, input format, and behavior, followed by a readable argument list. No unnecessary fluff or repetition.

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?

Given there is no output schema and no annotations, the description covers all essential information: parameter requirements, expected input format, return and error behavior, and file format handling. An agent has everything needed to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides zero descriptions, but the Args section explains every parameter in detail: file_path is an absolute Markdown path, table_index is a 0-based index from list_tables, version is a 12-char hex hash after 'v:', and new_content is a full pipe table string. This fully compensates for the schema's lack of documentation.

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 opens with a specific action and resource: 'Replace an entire table with new content.' It distinguishes this tool from sibling operations like update_cells or insert_row by scope, and reinforces the Markdown context by mentioning pipe tables and GitBook HTML preservation.

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?

It gives explicit prerequisites: version must come from read_table and table_index from list_tables, which defines the intended workflow. It does not name sibling alternatives, but the phrase 'entire table' and the requirement to provide full new content make the usage context clear enough for an agent to select it correctly.

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