entity.relationships

Phase 0 stub

Query relationships for a canonical entity.

CategoryEntity
JSON-RPCtools/call
EndpointPOST /mcp
Sourcepackages/mcp-tools/src/tools/entity-relationships.ts

Description

Walks the knowledge graph for a single entity id. Returns directed edges with kind and strength. Same pluggable-entity-type model as `entity.resolve` — works identically over `person`, `account`, `repo`, etc.

Input schema

FieldTypeRequiredDescription
entity_idstringyesCanonical entity ID.
relationship_typestringnoOptional relationship type filter (e.g. `colleague`, `family`).
limitinteger > 0noMaximum relationships to return.

Output shape

typescript
{
  ok: boolean;
  relationships?: Array<{
    from_id: string;
    to_id: string;
    kind: string;
    strength: string;
  }>;
  error?: string;
  message?: string;
}

Example call

JSON-RPC tools/call request body (omit the JSON-RPC envelope when using an SDK; the SDK adds it for you):

jsontools/call params
{
  "name": "entity.relationships",
  "arguments": { "entity_id": "entity_01HXSARAH", "limit": 5 }
}

Example response

Tool results are always wrapped as content[0].text with a stringified JSON body. The shape below is what you get back from JSON.parse(result.content[0].text):

jsonparsed result body
{
  "ok": false,
  "error": "feature_not_available",
  "message": "Entity relationships require knowledge graph consolidation (not yet available)."
}

Errors this tool can return

CodeMeaning
invalid_argumentsTool input failed Zod validation.
unauthorizedMissing or invalid bearer token.
feature_not_availableThe tool is registered but the underlying capability is not wired in this build.

See the full error catalog for resolution steps on each code, plus the standard transport-layer responses (401, 429).

Notes