graphlife Docs graphlife.app

MCP tools

5. MCP tool to HTTP equivalence

Every MCP tool has a plain-HTTP form on the same server: POST /v1/live with {"tool": …, "args": …}, or POST /v1/live/{tool} with the arguments as the body (see the integration API chapter).

MCP tool (/v1/live/mcp) Plain HTTP
stats POST/v1/live {"tool":"stats"}
list_graphs POST/v1/live {"tool":"list_graphs"}
search POST/v1/live {"tool":"search","args":{"query":…}}
search_prose POST/v1/live {"tool":"search_prose",…}
node POST/v1/live {"tool":"node","args":{"id":…}}
neighbors POST/v1/live {"tool":"neighbors",…}
subgraph POST/v1/live {"tool":"subgraph",…}
paths POST/v1/live {"tool":"paths","args":{"from":…,"to":…}}
context POST/v1/live {"tool":"context",…} (returns prose only)
list_groups POST/v1/live {"tool":"list_groups"}
get_document POST/v1/live {"tool":"get_document",…}; the graph's owner (on an organisation graph, an owner or admin who can read the node) may also use GET /v1/graphs/{graphId}/documents/{nodeId} with a session token
get_nodes POST/v1/live {"tool":"get_nodes","args":{"ids":[…]}}
list_nodes / list_edges POST/v1/live with the same tool name
add_to_graph POST/v1/live {"tool":"add_to_graph",…}
update_node POST/v1/live {"tool":"update_node",…}
add_capture POST/v1/live {"tool":"add_capture",…}
add_document POST/v1/live {"tool":"add_document",…}
add_edge POST/v1/live {"tool":"add_edge",…}
end_edge POST/v1/live {"tool":"end_edge",…}
delete_node / restore_node POST/v1/live with the same tool name
delete_edge / restore_edge POST/v1/live with the same tool name
create_group POST/v1/live {"tool":"create_group",…}
update_group POST/v1/live {"tool":"update_group",…}
set_groups POST/v1/live {"tool":"set_groups",…}
create_graph POST/v1/live {"tool":"create_graph","args":{"label":…}}

Where the two sides do not line up:

Capability MCP Plain HTTP Note
Ask a question and receive a written answer with sources Not available POST/v1/ask with body {q, graph?, asOf?, strict?, maxTokens?}, or POST /v1/live with {"tool":"ask","args":{"q":…}} Deliberately not offered over MCP, because an assistant already composes its own answer from context. Requires the search and subgraph scope tools. Limited to 20 calls per minute per credential; q is required and at most 2000 characters; maxTokens (the context budget) defaults to 2000 and is clamped to 500…6000. POST /v1/ask returns the object directly, POST /v1/live wraps it in {"result": …}: {"answer", "llm", "reason"?, "sources", "conflicts", "asOf"?, "truncated"}, where each source is {"marker", "id", "kind", "label"}. A language model writes the answer only when all of these hold; all are off by default: server-side AI is turned on for the graph by its owner, and either the organisation has stored its own model-provider key or the operator has set the environment variables ANTHROPIC_API_KEY and LLM_MONTHLY_TOKENS (a monthly token budget greater than zero). ASK_MODEL optionally names the model. Otherwise the answer is extractive ("llm": false) and reason says why: server_ai_off, no_model, budget, or llm_unavailable when the model call failed.
Delete a stored file Not available DELETE/v1/graphs/{graphId}/documents/{nodeId} with a session token Removes every file stored for that node. Available to the graph's owner, or on an organisation graph to an owner or admin who can read the node. A live key or OAuth token cannot delete a stored file.
Graph revision after a write Not returned Returned as revision by POST /v1/live Needed for baseRevision.
Tool discovery tools/list GET/v1/live/tools, and GET /v1/openapi.json tools/list and GET /v1/live/tools list only the tools the credential holds (GET /v1/live/tools also lists ask). GET /v1/openapi.json is public and describes every tool, whatever the caller holds (see OpenAPI and tool discovery).
Create, list and revoke keys; manage OAuth grants Not available Session-authenticated routes (section 3.2) Requires a signed-in account, not a key.