get_facts
Provide an entity ID to retrieve its known facts, including revenue, employee count, and more.
Instructions
Get known facts about an entity — revenue, employee count, etc. Example: get_facts(entity_id='company:AAPL')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | Entity ID |
Implementation Reference
- graphite_mcp/server.py:86-96 (registration)Tool registration for 'get_facts': defines the Tool object with name, description, and inputSchema (requires entity_id string). This is returned via list_tools().
Tool( name="get_facts", description="Get known facts about an entity — revenue, employee count, etc. Example: get_facts(entity_id='company:AAPL')", inputSchema={ "type": "object", "properties": { "entity_id": {"type": "string", "description": "Entity ID"}, }, "required": ["entity_id"], }, ), - graphite_mcp/server.py:159-160 (handler)Handler for 'get_facts': calls the REST API endpoint GET /api/v1/entities/{entity_id}/facts using the async _get helper and returns the JSON result as TextContent.
elif name == "get_facts": result = await _get(f"/entities/{arguments['entity_id']}/facts") - graphite_mcp/server.py:87-87 (schema)The input schema for get_facts accepts a single required string property 'entity_id'. No output schema is explicitly defined; the raw JSON response from the upstream API is returned verbatim.
name="get_facts", - graphite_mcp/server.py:30-42 (helper)Helper utilities: _headers() returns auth headers with X-API-Key, _url() constructs the full REST URL, and _get() performs the async HTTP GET request used by the get_facts handler.
def _headers() -> dict: return {"X-API-Key": CUSTOMER_API_KEY} def _url(path: str) -> str: return f"{CENTRAL_SERVER_URL.rstrip('/')}/api/v1{path}" 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()