Skip to main content
Glama
GraphiteAI

graphite-mcp

Official
by GraphiteAI

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

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesEntity ID

Implementation Reference

  • 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"],
        },
    ),
  • 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")
  • 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",
  • 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()
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries the behavioral burden. It indicates a read operation ('Get known facts') but does not disclose performance characteristics, rate limits, or error conditions. Adequate for a simple read tool but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences totaling 12 words plus an example. Every word earns its place; no fluff. Front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description is largely complete. It explains what facts are returned (revenue, employee count, etc.) and provides an example. It could clarify the return format, but the context signals indicate low complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with one parameter (entity_id) described as 'Entity ID'. The description adds an example showing the expected format (e.g., 'company:AAPL'), which provides meaningful context beyond the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool retrieves known facts about an entity, with specific examples like revenue and employee count. Distinguishes from sibling tools such as 'get_entity' (general info) and 'search_entities' (search).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Includes an explicit example (get_facts(entity_id='company:AAPL')) that demonstrates proper usage. Does not explicitly mention when to avoid this tool or alternatives, but the example provides clear usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GraphiteAI/graphite-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server