update_block
Modify existing document blocks including paragraphs, code, lists, and tables by updating content, titles, items, headers, or programming language specifications.
Instructions
Update existing block content based on block type.
Supports updating different block types:
- paragraph: content
- code: content, language (optional)
- list: title (optional), items
- table: header, rows
Args:
project_id: Project identifier
block_id: Block ID to update
content: New content for paragraph/code blocks
title: New title for list blocks
items: New items for list blocks
language: Programming language for code blocks
header: New header for table blocks
rows: New rows for table blocks
feature_id: Feature identifier (for RBT documents)
doc_type: Document type - REQ/BP/TASK (for RBT documents)
file_path: File path relative to docs/ (for general documents)
Returns:
Success message dictionary
Example:
# Update paragraph block
update_block(
project_id="knowledge-smith",
file_path="docs/guide.md",
block_id="blk-paragraph-1",
content="Updated paragraph content."
)
# Update list block
update_block(
project_id="knowledge-smith",
feature_id="rbt-mcp-tool",
doc_type="REQ",
block_id="blk-requirements",
title="**Updated Requirements**",
items=["Req 1", "Req 2", "Req 3"]
)
# Update code block
update_block(
project_id="knowledge-smith",
file_path="docs/examples.md",
block_id="blk-code-sample",
content="def hello():\n print('Hello')",
language="python"
)
# Update table block
update_block(
project_id="knowledge-smith",
feature_id="test",
doc_type="BP",
block_id="blk-table-data",
header=["Name", "Value"],
rows=[["Item1", "100"], ["Item2", "200"]]
)
@REQ: REQ-rbt-mcp-tool
@BP: BP-rbt-mcp-tool
@TASK: TASK-010-UpdateBlockTool
Input Schema
Name | Required | Description | Default |
---|---|---|---|
block_id | Yes | ||
content | No | ||
doc_type | No | ||
feature_id | No | ||
file_path | No | ||
header | No | ||
items | No | ||
language | No | ||
project_id | Yes | ||
rows | No | ||
title | No |
Input Schema (JSON Schema)
{
"properties": {
"block_id": {
"title": "Block Id",
"type": "string"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Content"
},
"doc_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Doc Type"
},
"feature_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Feature Id"
},
"file_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "File Path"
},
"header": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Header"
},
"items": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Items"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"project_id": {
"title": "Project Id",
"type": "string"
},
"rows": {
"anyOf": [
{
"items": {
"items": {
"type": "string"
},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Rows"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
}
},
"required": [
"project_id",
"block_id"
],
"type": "object"
}