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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"table_index": "<table_index>",
"version": "<version>",
"new_content": "<new_content>"
},
"name": "replace_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | Yes | ||
| file_path | Yes | ||
| new_content | Yes | ||
| table_index | Yes |