axiom_graph_update_section¶
- axiom_graph.mcp.server.axiom_graph_update_section(project_root, section_id, content=None, heading=None, new_id=None, after=None, tags=None)¶
Update a single section’s content, heading, or ID in a DocJSON file.
Loads the section’s JSON file, replaces the specified fields, writes the file back, and re-indexes. The caller provides plain markdown content – no need to construct full DocJSON.
Supports dot-path section IDs for nested sections (e.g.
database-layer.tables).When
new_idis provided, the section is renamed. Child section IDs are cascaded (dot-path prefix replacement). The new ID must be slug-safe (lowercase alphanumeric plus hyphens) and must not collide with an existing sibling.- Parameters:
- project_root str
Absolute path to the indexed project.
- section_id str
Full qualified section ID, e.g.
myproject::docs.architecture::database-layerormyproject::docs.architecture::database-layer.tables.- content str | None
New markdown content for the section. If omitted, content is left unchanged.
- heading str | None
New heading for the section. If omitted, heading is left unchanged.
- new_id str | None
New short slug for the section ID (e.g.
"rest-api"). Must be slug-safe. Children are cascaded.- after str | None
Optional short sibling ID to reorder after. Moves the target section to the position immediately after the named sibling within the same parent. Within-parent only – referencing a sibling under a different parent returns an error.
- tags list[str] | None
Optional list of tag strings to set on the section. Pass an empty list to clear tags. Tags are written to the section object in the JSON file and picked up by re-indexing.
- Return type:
str