Skip to main content
Glama
GraphiteAI

graphite-mcp

Official
by GraphiteAI

get_entity

Retrieve detailed information about a specific financial entity, such as a company or executive, by providing its unique ID from the Graphite Financial Knowledge Graph.

Instructions

Get detailed information about a specific entity by ID. Example: get_entity(entity_id='company:NVDA')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesEntity ID, e.g. 'company:AAPL', 'person:TIM_COOK_AAPL'

Implementation Reference

  • Tool schema/definition for 'get_entity' — declares the tool name, description, and inputSchema requiring an entity_id string.
    Tool(
        name="get_entity",
        description="Get detailed information about a specific entity by ID. Example: get_entity(entity_id='company:NVDA')",
        inputSchema={
            "type": "object",
            "properties": {
                "entity_id": {"type": "string", "description": "Entity ID, e.g. 'company:AAPL', 'person:TIM_COOK_AAPL'"},
            },
            "required": ["entity_id"],
        },
    ),
  • Registration of the 'get_entity' tool via @server.list_tools() returning a list of Tool objects.
    @server.list_tools()
    async def list_tools() -> list[Tool]:
        return [
            Tool(
                name="search_entities",
                description="Search the financial knowledge graph for companies, people, patents by name, ticker, or description. Example: search_entities(query='NVIDIA') or search_entities(query='semiconductor', sector='semiconductors')",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "query": {"type": "string", "description": "Search query (name, ticker, or keyword)"},
                        "entity_type": {"type": "string", "description": "Filter by type", "enum": ["company", "person", "patent", "product", "regulation", "event"]},
                        "sector": {"type": "string", "description": "Filter by sector: semiconductors, software, pharma, etc."},
                        "limit": {"type": "integer", "description": "Max results (default 20)", "default": 20},
                    },
                    "required": ["query"],
                },
            ),
            Tool(
                name="get_entity",
                description="Get detailed information about a specific entity by ID. Example: get_entity(entity_id='company:NVDA')",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "entity_id": {"type": "string", "description": "Entity ID, e.g. 'company:AAPL', 'person:TIM_COOK_AAPL'"},
                    },
                    "required": ["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"],
                },
            ),
            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"],
                },
            ),
            Tool(
                name="find_path",
                description="Find how two companies/entities are connected through the knowledge graph. Shows the chain of relationships. Example: find_path(source='company:AAPL', target='company:TSM')",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "source": {"type": "string", "description": "Source entity ID"},
                        "target": {"type": "string", "description": "Target entity ID"},
                        "max_depth": {"type": "integer", "description": "Max hops (default 6)", "default": 6},
                    },
                    "required": ["source", "target"],
                },
            ),
            Tool(
                name="exposure_analysis",
                description="Analyze a company's exposure: 1st and 2nd degree connections, sector concentration, dependency risks. Example: exposure_analysis(entity_id='company:TSM')",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "entity_id": {"type": "string", "description": "Entity ID to analyze"},
                    },
                    "required": ["entity_id"],
                },
            ),
            Tool(
                name="compare_entities",
                description="Compare two entities: shared connections, direct relationships, path distance. Example: compare_entities(entity_a='company:NVDA', entity_b='company:AMD')",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "entity_a": {"type": "string", "description": "First entity ID"},
                        "entity_b": {"type": "string", "description": "Second entity ID"},
                    },
                    "required": ["entity_a", "entity_b"],
                },
            ),
        ]
  • Handler for 'get_entity' — calls the REST API endpoint GET /api/v1/entities/{entity_id} via the _get helper and returns JSON result.
    elif name == "get_entity":
        result = await _get(f"/entities/{arguments['entity_id']}")
  • Helper function _get that performs the async HTTP GET request to the central server, used by the get_entity handler.
    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()
Behavior2/5

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

No annotations provided, so description carries full burden but only states 'Get detailed information' without specifying what details or behavioral traits. 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?

One sentence plus example, very concise and front-loaded. No unnecessary words.

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?

Simple tool with no output schema; description is mostly complete but could specify what 'detailed information' includes for full clarity.

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

Parameters3/5

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

Schema already has good description with examples; description adds example but minimal extra meaning. Schema coverage 100% so baseline 3.

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?

Description clearly states it gets detailed information about a specific entity by ID, using specific verb and resource. Distinguishes from siblings like search_entities and compare_entities.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance. Example implies use when you have an entity ID, but no exclusions or alternatives mentioned.

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