MCP tools
3. The remote MCP endpoint
POST/v1/live/mcp
3.1 Transport#
| Property | Value |
|---|---|
| URL | https://graphlife.example.com/v1/live/mcp |
| Method | POST only. GET and DELETE answer 405 with code method_not_allowed. |
| Body | One JSON-RPC 2.0 request object per POST. |
| Response | One JSON object, Content-Type: application/json. There is no event stream. |
| Sessions | None. The endpoint is stateless; no session id is issued or expected. |
| Server name | graphlife, version 1.0.0 |
| Maximum request body | 69,970,602 bytes, about 70 MB (the 50 MiB document limit, plus base64 and envelope overhead). The whole body is buffered in memory before it is parsed. A larger body answers HTTP 413; a body that is not valid JSON answers HTTP 400 with JSON-RPC error -32700 and id: null. |
Supported protocol revisions, newest first: 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05.
Supported JSON-RPC methods:
| Method | Behaviour |
|---|---|
initialize |
Answers with the client's own protocolVersion when it is in the list above, otherwise 2025-06-18. Returns capabilities.tools.listChanged = false, the server info and usage instructions. |
server/discover |
Returns supportedVersions, capabilities, server info, instructions, ttlMs (300000) and cacheScope: "public". |
tools/list |
Returns the tools the calling credential may use, with ttlMs 300000 and cacheScope: "private". |
tools/call |
Runs one tool. |
notifications/* (no id) |
Answered with HTTP 202 and an empty body. |
| Any other method | HTTP 404 with JSON-RPC error -32601 ("Method not found"). This includes ping, resources and prompts, none of which are implemented. |
A request may declare its protocol version in params._meta["io.modelcontextprotocol/protocolVersion"]. An unlisted version answers HTTP 400 with JSON-RPC error -32022 and the supported list. For version 2026-07-28 and later, the headers MCP-Protocol-Version, Mcp-Method and, for tools/call, Mcp-Name are required and must match the body; a mismatch answers HTTP 400 with error -32020. Clients using an earlier revision need none of these headers.
Origin check. If a request carries an Origin header, its authority must equal the Host header, otherwise the endpoint answers 403 with code bad_origin. Server-side clients normally send no Origin header and are unaffected. A browser page on another origin cannot call this endpoint.
3.2 Authentication#
Every request needs Authorization: Bearer <credential>. Three kinds of credential are accepted.
| Credential | Prefix | How it is obtained | Reach |
|---|---|---|---|
| Live key | glk_ |
Created by the graph's owner (or an organisation owner or admin) with POST /v1/graphs/{graphId}/keys. Shown once; only a hash is stored. |
The graph it was created for, plus any graph it later makes with create_graph. |
| OAuth access token | glo_ |
Granted through the browser-based OAuth flow below. | The graphs the user ticked on the consent page. |
| Account session token | (JWT) | Returned by account sign-in. Valid for one hour. | The account's own graphs and its organisation graphs, by role. It never includes create_graph. |
Authentication failures:
| Situation | HTTP status | Body |
|---|---|---|
| No or unknown bearer token | 401 |
{"error":{"code":"unauthorized"}} |
| Session token of an account that has no graph on the server and belongs to no organisation | 401 |
{"error":{"code":"unauthorized"}} |
| Revoked live key | 403 |
{"error":{"code":"revoked"}} |
| Live key past its expiry | 401 |
{"error":{"code":"key_expired"}} |
| Live key on an organisation graph whose creator has left the organisation, or no longer shares any group with the key | 404 |
{"error":{"code":"not_found"}} |
| Unknown, revoked or expired OAuth token | 401 |
{"error":{"code":"invalid_token"}} |
| OAuth token issued for a different resource | 403 |
{"error":{"code":"invalid_token"}} |
The bodies above show only code; every error object also carries message and requestId (see Errors and request ids).
On any authentication failure the response also carries a WWW-Authenticate header naming the OAuth resource metadata URL, which is how an OAuth-capable client discovers the flow.
A live key and a session token are also accepted on the plain POST /v1/live endpoint, as is an OAuth access token.
Creating a live key#
curl -X POST https://graphlife.example.com/v1/graphs/$GRAPH_ID/keys \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"label": "CRM integration",
"scope": {
"tools": ["stats","search","node","neighbors","subgraph","paths","search_prose",
"add_to_graph","add_capture","update_node"],
"allNodes": true,
"level": "full",
"groups": []
}
}'
Response:
{ "keyId": "…", "token": "glk_…", "graphId": "…", "expiresAt": null }
The token is shown only in this response. scope is required and must be a JSON object; otherwise the request answers 400 missing_scope. A graph the caller does not own answers 404 not_found. The body may also carry expiresAt (epoch seconds) and, on an organisation graph, serviceAccount; both are described in the integration API chapter. $SESSION_TOKEN is the access token of a signed-in account that owns the graph; signing in is covered in Accounts and sessions.
The example above is for a personal graph. On an organisation graph, only an owner or admin may create a key (other members receive 403 forbidden), and a key cannot be wider than the member who creates it: allNodes, account tools and tools outside the creator's role are refused with 400 scope_too_wide, and groups the creator is not in are refused with 409 scope_exceeds_yours. For an organisation graph, therefore, remove "allNodes": true from the example and either list group ids in groups or leave it empty to reach the creator's own groups. The key's reach is intersected with the creator's current role on every call.
Related calls, all authenticated with the session token:
| Call | Purpose |
|---|---|
GET/v1/graphs/{graphId}/keys |
Returns {"keys": [...]}, each with keyId, label, scope, createdAt, revokedAt, lastUsedAt, useCount, expiresAt, rotatedAt, mintedBy and principal. The token itself is never returned again. |
DELETE/v1/graphs/{graphId}/keys/{keyId} |
Revoke a key. Answers {"status":"ok"}. |
PATCH/v1/graphs/{graphId}/keys/{keyId} |
Change a key's label or expiry, or add listing and integration tools to it. |
POST/v1/graphs/{graphId}/keys/{keyId}/rotate |
Give a key a new secret. |
A live key works until it is revoked, reaches its expiry (if it was given one), or its graph is removed from the server. Editing only adds tools; to narrow a key's scope, revoke it and create another. Expiry, rotation and editing are described in the integration API chapter.
OAuth 2.1 flow#
The server is its own authorization server. It supports the authorization-code grant with PKCE (S256) for public clients, and refresh tokens. There is no client-credentials grant, no client secret and no machine-to-machine flow: a person must sign in and consent in a browser.
| Endpoint | Purpose |
|---|---|
GET/.well-known/oauth-protected-resource (also with /v1/live/mcp appended) |
Protected-resource metadata. The resource identifier is <origin>/v1/live/mcp. |
GET/.well-known/oauth-authorization-server and GET /.well-known/openid-configuration |
Authorization-server metadata. |
POST/oauth/register |
Dynamic client registration (JSON body). Public clients only; token_endpoint_auth_method must be none. Up to 10 redirect URIs, each https, http on loopback, or a private-use scheme. Limited to 20 registrations per hour per client address. |
GET/oauth/authorize |
Sign-in page, then a consent page where the user chooses one or more graphs and either read or read-and-write access. |
POST/oauth/token |
Form-encoded. grant_type is authorization_code or refresh_token. Limited to 120 requests per 15 minutes per client address. |
POST/oauth/revoke |
Form-encoded token (an access or a refresh token). Answers 200 whether or not the token existed. Limited to 120 requests per 15 minutes per client address. |
A client may also identify itself with a Client ID Metadata Document, by using an HTTPS URL as its client_id.
| Property | Value |
|---|---|
| Scopes | graph:read, graph:write |
| Authorization code lifetime | 5 minutes, single use |
| Access token lifetime | 30 days (expires_in 2592000) |
| Refresh tokens | Issued with each access token and rotated on use |
| Token type | Opaque bearer tokens, stored hashed; revocation is immediate |
What an OAuth grant can do: graph:read gives the read tools; graph:read graph:write gives the read and write tools. An OAuth grant reads every node of the graphs chosen (it is not narrowed to groups at consent time) and never includes create_graph. On an organisation graph the grant is additionally limited, on every call, to what the consenting member's role allows. The account holder can list, change or revoke grants afterwards with a session token: GET /v1/oauth/grants, PATCH /v1/oauth/grants/{id} (JSON body with any of graphIds, canWrite, allNodes, groups) and DELETE /v1/oauth/grants/{id}. A change takes effect on the grant's next call.
Deployment note. The issuer and the resource identifier are derived from the request's Host header. The scheme is https unless the host is localhost or 127.0.0.1; when the server runs behind a reverse proxy with the environment variable TRUST_PROXY=true, the X-Forwarded-Proto header is used instead. A reverse proxy in front of the server must therefore pass the public host name through unchanged, or OAuth tokens will be bound to the wrong resource and rejected.
3.3 Result and error format for tools/call#
Every tool result has this shape:
{
"jsonrpc": "2.0",
"id": 7,
"result": {
"resultType": "complete",
"content": [ { "type": "text", "text": "<JSON-encoded tool result>" } ],
"isError": false
}
}
content[0].textis the tool's result serialised as JSON. Parse it to get the object or array described for each tool below.contextreturns prose. Itstextis therefore a JSON-encoded string (quoted, with escaped line breaks).- A tool failure is returned as a normal result with
"isError": trueand a sentence intext. The HTTP status is still200. This includes an unknown tool name, a tool outside the credential's scope, bad arguments and "not found". - The sentence is written for an assistant, not for a program: MCP results carry no machine-readable error code. Failures that have no dedicated sentence are reported as
Refused: <code>.(for exampleRefused: graph_required.), and argument errors asBad arguments: …. A program that needs to branch on the cause should callPOST /v1/live, which returns the code. - Structured output (
structuredContent) and output schemas are not provided.
Failures, with the machine code and HTTP status that the plain POST /v1/live endpoint returns for the same failure:
| Meaning | /v1/live code and status |
|---|---|
| Tool not allowed by this credential's scope, or a tool name that does not exist (the scope check runs first, so an unknown name is reported the same way) | forbidden (403) |
| Node, edge, group or graph not found or not visible | not_found (404) |
More than one graph reachable and no graph argument given |
graph_required (400) |
| Missing or over-long label or name (limit 120 characters) | bad_label (400) |
| Entity kind this credential may not create | kind_out_of_scope (403) |
| Group not held by this credential | group_out_of_scope (403) |
set_groups with no groups, or leaving the node in none |
no_groups (400) |
| More than 32 groups on one node | too_many_groups (400) |
| Group mirrors an external connector and is managed there | connector_group (409) |
| Edge type not in the allowed list | bad_type (400) |
related_to without attributes.predicate |
bad_predicate (400) |
Date not YYYY, YYYY-MM or YYYY-MM-DD |
bad_date (400) |
Wrong type for label, kind, attributes, aliases, validFrom or validTo; empty capture text; malformed asOf; unknown node kind; primary not among the node's groups; missing validTo on end_edge |
bad_request (400) |
An argument of the wrong JSON type, or a malformed entity or relation in add_to_graph |
bad_args (400); for a wrong-typed argument the error object also carries arg, the argument's name |
dataBase64 missing or invalid |
bad_data (400) |
| File over 50 MB | document_too_large (413) |
| Storage quota reached | storage_full (413) |
| Account already holds 100 graphs | too_many_graphs (403) |
Node changed by someone else since baseRevision |
edit_conflict (409). On /v1/live the error object also carries node (the node as it is now), fields, changedBy, changedAt and revision (the value to retry from). |
| Graph moved into an organisation during the call | graph_moved (409) |
| Write with a session token to a personal graph last synchronised by an older GraphLife app | app_update_required (409) |
| Rate limit (every credential; see section 3.6) | rate_limited (429) |
| Listing cursor that does not belong to this listing | bad_cursor (400) |
changedSince token that can no longer be followed |
resync_required (409) |
A numeric argument sent with the wrong JSON type (for example "limit": "5" as a string) is refused: POST /v1/live answers 400 bad_args with arg naming the argument, and /v1/live/mcp returns a tool result reading Bad arguments: limit. Send numbers as JSON numbers.
3.4 Common argument: graph#
Every tool except list_graphs and create_graph accepts an optional string argument graph, the graph id to act on. When the credential reaches exactly one graph, omit it. When it reaches several, it is required; a call without it is refused rather than guessed. Naming a graph outside the credential's reach is reported as not found.
3.5 Tool reference#
tools/list returns only the tools the calling credential may use. Each definition carries name, title, description, inputSchema and annotations (readOnlyHint on every tool; destructiveHint, idempotentHint and openWorldHint where they apply). The descriptions returned by the server are addressed to an assistant working on one person's graph; they are instructions for a language model, not reference text.
Twenty-eight tools are offered over MCP. The "Scope" line names the scope tool the credential must hold.
Read tools#
stats — Size and composition of the graph. Scope: stats.
| Parameter | Type | Required | Notes |
|---|---|---|---|
graph |
string | no | See 3.4. |
Returns {"nodesByKind": {"<kind>": <count>, …}, "totalNodes": <count>}. Counts cover only nodes the credential can see.
list_graphs — The graphs this credential reaches. Scope: stats. No parameters.
Returns an array of {"id", "label", "nodes"}. nodes is omitted for an organisation graph.
search — Find nodes by name. Scope: search.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
query |
string | yes | A name or fragment. Three or more characters use the full-text index; shorter queries fall back to a substring match on labels. | |
limit |
integer | no | 15 | Clamped to 1…maxNodes. |
semantic |
boolean | no | false |
Also rank by meaning, so a question or a description can find nodes that share no word with it. Takes effect only where the graph has vectors (see "Semantic (vector) matching" under context); otherwise the search is by label alone. |
Returns an array of {"id", "kind", "label"}, with "withheld": true and a masked label on nodes readable only as existence. Without semantic, search matches labels only, not attributes or prose.
search_prose — Search inside long-form text stored in a node's text attribute. Scope: search_prose.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
query |
string | yes | Words to find. | |
limit |
integer | no | 8 | Clamped to 1…maxNodes. |
Returns an array of {"text", "node", "nodeId", "paragraph"}: the matching paragraph, the label and id of the node it is written on, and the paragraph's position. Only nodes readable in full are returned. A scope that redacts text gets an empty array.
node — Everything visible about one node. Scope: node.
| Parameter | Type | Required | Notes |
|---|---|---|---|
graph |
string | no | |
id |
string | yes | Node id, from search. |
Returns {"id", "kind", "label", "props"}. props holds the node's attributes, including subtype; the attribute named owner and any attribute listed in the scope's redactProps are always removed. The node's aliases, validity dates and group memberships are not part of this result. A withheld node returns a masked label, props containing at most doc_type, and "withheld": true. An invisible or missing id is reported as not found.
neighbors — The direct connections of one node. Scope: neighbors.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
id |
string | yes | ||
limit |
integer | no | 100 | Clamped to 1…maxNodes. |
Returns an array of {"edgeId", "type", "predicate"?, "direction", "neighborId", "neighborKind", "neighborLabel", "validFrom"?, "validTo"?}. direction is "out" when the edge starts at the node asked about and "in" when it ends there. predicate appears on related_to edges and carries the verb. A withheld neighbour has a masked label, "withheld": true and no dates. The edgeId values are what delete_edge, end_edge and restore_edge take. An id that is missing or not visible returns an empty array, not an error.
subgraph — The neighbourhood around a node, several hops out. Scope: subgraph.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
id |
string | yes | ||
depth |
integer | no | 2 | Clamped to 1…3. |
limit |
integer | no | 120 | Maximum nodes. Clamped to 1…maxNodes. |
Returns {"nodes": [{"id","kind","label","depth"}, …], "edges": [{"id","src","dst","type","predicate"?,"validFrom"?,"validTo"?}, …]}. Nearest nodes come first. Edges are only those between returned nodes. An id that is missing or not visible returns {"nodes": [], "edges": []}, not an error.
paths — How two nodes are connected. Scope: paths.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
from |
string | yes | Starting node id. | |
to |
string | yes | Destination node id. | |
maxHops |
integer | no | 4 | Clamped to 1…4. |
Returns an array of up to five {"nodeIds": […], "edgeTypes": […], "hops": <n>}.
context — Ranked, token-budgeted context for a question, as prose. Scope: search and subgraph.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
query |
string | yes | The question. | |
maxTokens |
integer | no | 1200 | Token budget for the answer text. This endpoint applies no upper or lower bound to it. |
depth |
integer | no | 2 | Hops walked from the best match. Effectively 1…3. |
asOf |
string | no | Answer as of a date (YYYY, YYYY-MM, YYYY-MM-DD). Any other form is refused (bad_request). |
|
strict |
boolean | no | false |
With asOf, also omit facts whose start date is unknown. |
Returns a single string. It contains no node ids and no citation markers. When nothing matches it returns the sentence "Nothing visible in this graph matches that question."; when the budget cut the answer short, a closing sentence says so.
Semantic (vector) matching is blended in only when both of the following hold; otherwise retrieval is by node label alone. Both are off by default.
- The operator has configured an embedding provider with the environment variable
EMBED_PROVIDER(voyageoropenai) and its companionEMBED_*settings (EMBED_API_KEYis required unlessEMBED_BASE_URLpoints at the same machine). Configuring it sends graph text to that provider. - Server-side AI has been turned on for the graph by its owner (a per-graph setting).
When the operator has also configured a reranking model (RERANK_PROVIDER, voyage or cohere), the candidates found by meaning are reranked by it before they are used.
list_groups — The groups this credential can read and file into. Scope: stats.
| Parameter | Type | Required |
|---|---|---|
graph |
string | no |
Returns an array of {"id", "name", "color", "nodes", "writeTarget"}. writeTarget is true for the group new nodes are filed into. A credential with allNodes sees every group of the graph; any other credential sees only the groups it holds.
get_document — The stored file or files behind a node. Scope: node.
| Parameter | Type | Required | Notes |
|---|---|---|---|
graph |
string | no | |
id |
string | yes | The node id. Must be readable in full. |
Returns an array of {"id", "nodeId", "name", "mediaType", "size", "dataBase64"}, one entry per stored file, oldest first, and an empty array when the node has no stored file. Every file is returned whole, inline as base64; there is no listing without the bytes, and no ranged or streamed download.
get_nodes — What node answers, for several ids in one call. Scope: node.
| Parameter | Type | Required | Notes |
|---|---|---|---|
graph |
string | no | |
ids |
array of strings | yes | 1 to 100 node ids (fewer if the scope's maxNodes is lower). |
Returns {"nodes": [...], "missing": [...]}. Each entry of nodes is what node returns for that id; ids that are not visible or do not exist are listed under missing. An empty or over-long ids answers bad_args.
list_nodes and list_edges — Every node, or every relationship whose two ends are visible, a page at a time, with a cursor and a syncToken for following later changes. Scope: list_nodes and list_edges respectively. Their parameters (filters, limit, cursor, changedSince) and paging rules are described in Listing and paging.
Write tools#
Writes go straight into the graph. There is no review step on this endpoint. Writes to one graph are applied one at a time, in arrival order.
add_to_graph — Add new entities and relations. Scope: add_to_graph.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
entities |
array of objects | no | [] |
See "Entity fields" below. |
relations |
array of objects | no | [] |
Each: subject_local_id, predicate, object_local_id (all three required), and optional attributes, valid_from, valid_to, source_span, confidence. |
sourceText |
string | no | The original wording the facts came from. Stored verbatim as the source. | |
resolve |
boolean | no | true |
false creates every entity as new, merging into nothing. |
Entity fields:
| Field | Required | Notes |
|---|---|---|
local_id |
yes | Meaningful only inside one call; it lets relations refer to entities that have no server id yet. |
kind |
yes | One of the six kinds or one of the subtype words listed in section 2.1. |
label |
yes | The display name. |
aliases |
no | Array of strings. |
attributes |
no | A flat object. Each value is stored as a string; nested objects and arrays, empty values and null are dropped. To set a subtype explicitly beside a coarse kind, send it as attributes.subtype (there is no top-level subtype field). |
date, place, role, org |
no | Stored as attributes of the same name. date is also used as valid_from when that is absent. |
valid_from, valid_to |
no | Dates. |
source_span, confidence |
no | The quoted wording, and a number from 0 to 1. |
Relation predicates are met_at, worked_at, located_in, introduced_by, owns, attended, authored, held, at_org, at_place, participant, parent_of, sibling_of, spouse_of, partner_of, studied_at, member_of, lived_in, traveled_to and related_to. A related_to relation must carry the verb in attributes.predicate.
Two different things happen to an entity the server will not create:
- An entity whose
kindis not a recognised word, or is a kind this credential may not create (see "Who may create nodes" in section 2.2), causes the whole call to be refused withkind_out_of_scope. Nothing is written. - An entity that is malformed, lacks a required field, repeats a
local_id, or names one of the recognised-but-not-creatable wordspage,fileorcodebaseis dropped on its own and listed inrejectedEntities; the rest of the call is applied.
By default an entity is matched against the nodes already in the graph, and when it matches one it is merged into it. The existing node's attributes are kept unchanged, so new details sent this way about a known node are not stored. To change an existing node, use update_node. Possible duplicates that were not merged are counted in candidatesQueued.
Returns:
| Field | Meaning |
|---|---|
nodesCreated, nodesMerged, edgesCreated, candidatesQueued |
Counts of what happened. |
nodesRequested, relationsRequested |
Counts of what was sent. |
complete |
true only when nothing was rejected. |
sourceId |
Id of the stored source text. |
nodeIds |
Ids created or merged onto. |
resolved |
Map from each local_id to its node id. |
rejectedEntities |
Present when any entity was dropped. Reasons: malformed, missing_field, unknown_kind, duplicate_local_id. |
rejectedRelations |
Present when any relation was dropped. Reasons: malformed, unknown_predicate, dangling_endpoint, related_to_without_predicate. |
A partly applied write is not an error. Always check complete.
update_node — Revise an existing node. Scope: update_node.
| Parameter | Type | Required | Notes |
|---|---|---|---|
graph |
string | no | |
id |
string | yes | Node id. Must be readable in full. |
label |
string | no | A corrected name. |
attributes |
object | no | Merged over the existing attributes. A null value removes that attribute. The attribute text holds long-form prose and is indexed by paragraph for search_prose; description is a one-line field. |
aliases |
array of strings | no | Added. Existing aliases are never removed. |
replaceAttributes |
boolean | no | Replace the attribute map instead of merging. Default false. |
validFrom |
string or null | no | Omit to leave unchanged; null clears it. |
validTo |
string or null | no | Omit to leave unchanged; null clears it. |
baseRevision |
integer | no | The graph revision the edit was based on. If someone else changed the same fields since, the call is refused. Omit to overwrite. |
The handler also accepts an optional string kind, which is not listed in the published schema. It must be one of the six kinds (individual, place, event, concept, document, other); any other value is refused as a bad argument. On an organisation graph, only an owner or admin may change a node's kind or subtype or use replaceAttributes; other members receive forbidden.
Returns the node after the change, including id, label, kind, attributes, validFrom and validTo.
add_capture — Store text verbatim, without extracting anything. Scope: add_capture.
| Parameter | Type | Required |
|---|---|---|
graph |
string | no |
text |
string | yes |
Returns {"sourceId", "characters"}. Empty or whitespace-only text is refused (bad_request). A capture is not a node. This endpoint has no tool that reads a capture back.
add_document — Store a file. Scope: add_to_graph.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
dataBase64 |
string | yes | File bytes, base64. Limit 50 MB after decoding. | |
filename |
string | yes | ||
mediaType |
string | no | application/octet-stream |
|
nodeId |
string | no | Attach to this existing node. Omit to create a new document node. | |
label |
string | no | the filename | Name for a newly created node. |
docType |
string | no | Stored as doc_type on a newly created node. |
|
attributes |
object | no | Attributes for a newly created node. |
Returns {"nodeId", "nodeIds": [nodeId], "created", "bytes"}. created is true when a new document node was made and false when the file was attached to nodeId. Creating a new document node requires that the credential may create nodes (section 2.2); otherwise the call is refused with kind_out_of_scope.
Stored files count against the storage quota of the account or organisation that owns the graph; an upload over the quota is refused with storage_full. The quota is set by the operator with the environment variable QUOTA_BYTES and defaults to 2 GiB per account or organisation. Files are stored unencrypted in the server's database. This endpoint has no tool that deletes a stored file (see section 5).
add_edge — Connect two existing nodes by id. Scope: add_to_graph.
| Parameter | Type | Required | Notes |
|---|---|---|---|
graph |
string | no | |
src |
string | yes | From this node id. |
dst |
string | yes | To this node id. |
type |
string | yes | One of met_at, worked_at, located_in, introduced_by, owns, attended, authored, held, at_org, at_place, participant, same_as, related_to, parent_of, sibling_of, spouse_of, partner_of, studied_at, member_of, lived_in, traveled_to. |
attributes |
object | no | For related_to, {"predicate": "<verb>"} is required. |
validFrom |
string | no | |
validTo |
string | no |
Returns {"added", "src", "dst", "type"}. added is false when that relationship already exists or when src and dst are the same node. The id of the new edge is not returned; read it with neighbors. Both nodes must be readable in full by the credential.
end_edge — Record that a relationship ended on a date, keeping it as history. Scope: delete_edge.
| Parameter | Type | Required |
|---|---|---|
graph |
string | no |
id |
string | yes (edge id) |
validTo |
string | yes |
Returns {"ended": true, "id"}.
delete_node — Remove a node and every relationship touching it. Scope: delete_node.
| Parameter | Type | Required |
|---|---|---|
graph |
string | no |
id |
string | yes |
Returns {"id", "label", "deleted": true, "edgesRemoved", "restorable": true}. On an organisation graph edgesRemoved counts only the relationships to nodes the caller can read. The deletion is soft: the data is retracted, not erased, and restore_node reverses it. There is no tool that permanently erases a node.
restore_node — Undo delete_node. Scope: delete_node.
| Parameter | Type | Required |
|---|---|---|
graph |
string | no |
id |
string | yes |
Returns {"restored": true|false, "id"}. false means the node was not deleted. Only a deletion made with delete_node can be undone; a node removed any other way is reported as not found.
delete_edge — Remove one relationship. Scope: delete_edge.
| Parameter | Type | Required |
|---|---|---|
graph |
string | no |
id |
string | yes (edge id, from neighbors) |
Returns {"id", "deleted": true, "src", "dst", "type"}. Soft, and reversible with restore_edge.
restore_edge — Undo delete_edge. Scope: delete_edge.
| Parameter | Type | Required |
|---|---|---|
graph |
string | no |
id |
string | yes |
Returns {"restored": true|false, "id"}. false when the edge is already present or has been drawn again since.
create_group — Make a new, empty group. Scope: create_group.
| Parameter | Type | Required | Notes |
|---|---|---|---|
graph |
string | no | |
name |
string | yes | 1 to 120 characters. |
color |
integer | no | Swatch number, 1 to 12; default 1. |
Returns {"groupId", "name", "usableByThisKey"}, plus a note when the credential could not be given the new group. A graph holds at most 500 groups; creating one more is refused with an error.
update_group — Rename or recolour a group the credential holds. Scope: create_group.
| Parameter | Type | Required |
|---|---|---|
graph |
string | no |
id |
string | yes (group id) |
name |
string | no |
color |
integer | no |
Returns {"id", "name", "color"}. A credential that reads the graph through allNodes without holding the group itself receives not found.
set_groups — File a node into groups. This changes who can read it. Scope: set_groups.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
graph |
string | no | ||
id |
string | yes | Node id. Must be readable in full. | |
groups |
array of strings | yes | Group ids from list_groups or create_group. May be empty only together with replace: true. |
|
replace |
boolean | no | false |
true makes these the node's only groups among those the credential holds. Groups it does not hold, and connector-managed groups, are never removed. |
primary |
string | no | The group whose colour the node shows. Must be one the node is in afterwards. | |
baseRevision |
integer | no | As for update_node. |
Returns {"nodeId", "groups": […]}, where groups is the sorted list of ids that was sent, not the node's full membership afterwards. A node may be in at most 32 groups. Every group named, including primary, must be one the credential holds (group_out_of_scope otherwise); a credential that reads through allNodes alone holds no group.
Account tool#
create_graph — Make a new, empty graph on the account and reach it from the same credential. Scope: create_graph.
| Parameter | Type | Required | Notes |
|---|---|---|---|
label |
string | yes | 1 to 120 characters. |
Returns {"id", "label", "nodes": 0, "note"}. Only a live key on a personal graph can call it: OAuth tokens, session tokens and keys on organisation graphs are refused. An account may hold at most 100 personal graphs.
3.6 Rate limits and audit#
- Calls made with a live key or an OAuth token are limited per credential, by default to 100 per second with a burst of 1,000 (see Rate limits in the integration API chapter).
- Over MCP, a rate-limited
tools/callis a tool result readingRate limited; retry in N s., with aRetry-Afterheader on the200. Any other MCP method is refused with HTTP429, theRetry-Afterheader and JSON-RPC error-32000. - Calls made with an account session token are limited per account to 20 per second with a burst of 60.
- Calls to
ask(HTTP only) have their own limit of 20 per minute per credential. - Tool calls that complete are written to the server's audit log as
live.<tool>, with one exception: reads made with a session token on the account's own personal graph are not logged. Refused calls are not logged. For a live key the server also records the last-used time and a use count.