get_relationships
Retrieve all relationships—such as suppliers, competitors, partners, and dependencies—for a company entity by providing its entity ID.
Instructions
Get all relationships for an entity — suppliers, competitors, partners, dependencies, etc. Example: get_relationships(entity_id='company:NVDA')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | Entity ID |
Implementation Reference
- graphite_mcp/server.py:156-157 (handler)The handler for the 'get_relationships' tool. Calls the REST API endpoint /entities/{entity_id}/relationships via the _get helper.
elif name == "get_relationships": result = await _get(f"/entities/{arguments['entity_id']}/relationships") - graphite_mcp/server.py:75-85 (schema)Schema definition for the 'get_relationships' tool, declaring its input schema (requires a string entity_id).
Tool( name="get_relationships", description="Get all relationships for an entity — suppliers, competitors, partners, dependencies, etc. Example: get_relationships(entity_id='company:NVDA')", inputSchema={ "type": "object", "properties": { "entity_id": {"type": "string", "description": "Entity ID"}, }, "required": ["entity_id"], }, ), - graphite_mcp/server.py:47-48 (registration)Registration of 'get_relationships' as an MCP tool via the @server.list_tools() decorator.
@server.list_tools() async def list_tools() -> list[Tool]: - graphite_mcp/server.py:38-42 (helper)The _get helper function used by the handler to perform the actual HTTP GET request to the central API.
async def _get(path: str, params: Optional[dict] = None) -> dict: async with httpx.AsyncClient(timeout=30) as client: resp = await client.get(_url(path), params=params, headers=_headers()) resp.raise_for_status() return resp.json()