axiom_graph_add_link¶
- axiom_graph.mcp.server.axiom_graph_add_link(project_root, section_id='', node_id='', node_ids=None, links=None)¶
Link doc sections to the code nodes they describe, so drift flags them.
Loads the section’s JSON file, appends the link(s), writes the file back, and re-indexes once. When
node_idsis provided, all links are added in a single pass with one re-index – much faster than calling this tool N times.linksdoes the same across several sections of one doc.Adding a link does not verify the section. A section whose
linksalready holds an entry without a usable node id (a hand edit such as{"target": ...}) is refused with anERRORnaming the entry, and nothing is written; correct the entry first.- Parameters:
- project_root str
Absolute path to the indexed project.
- section_id str
Full qualified section ID, e.g.
myproject::docs/architecture::database-layer.- node_id str
The code node ID to link to (single-link mode).
- node_ids list[str] | None
List of code node IDs to link to (batch mode). When provided,
node_idis ignored.- links list[dict] | None
Cross-section batch – list of
{"section_id", "node_id"}items, all sections of one doc; one write and one re-index. Items spanning docs, or naming a missing section, fail the whole call and nothing is written. Leavesection_id/node_id/node_idsunset when using it.
- Return type:
str