Skip to main content
Glama
GraphiteAI

graphite-mcp

Official
by GraphiteAI

search_entities

Search for companies, people, and patents in the financial knowledge graph by name, ticker, or keyword. Filter results by type, sector, or limit.

Instructions

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')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (name, ticker, or keyword)
entity_typeNoFilter by type
sectorNoFilter by sector: semiconductors, software, pharma, etc.
limitNoMax results (default 20)

Implementation Reference

  • Tool definition (schema) for search_entities: defines name, description, and inputSchema with 'query' (required), 'entity_type', 'sector', and 'limit' (optional) parameters.
    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"],
        },
  • Registration: search_entities is included as a Tool in the list returned by the @server.list_tools() handler, making it available to MCP clients.
    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"],
        },
    ),
  • Handler: when the tool name is 'search_entities', it calls the central REST API endpoint /api/v1/search with the query, entity_type, sector, and limit parameters.
    if name == "search_entities":
        result = await _get("/search", params={
            "q": arguments["query"],
            "type": arguments.get("entity_type"),
            "sector": arguments.get("sector"),
            "limit": arguments.get("limit", 20),
        })
  • Helper function _get: used by the search_entities handler to make the actual HTTP GET request to the central server.
    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?

Without annotations, the description fails to disclose search behavior (e.g., exact vs fuzzy matching), return structure, or potential side effects. The mention of 'by name, ticker, or description' largely repeats the schema.

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 with clear front-loading of purpose and a succinct example, no redundant information.

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

Completeness2/5

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

Missing output schema and no description of return format, pagination, or error handling. For a search tool, this leaves significant gaps in what the agent can expect.

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?

Input schema covers all 4 params with 100% description coverage. The description adds value with a concrete example showing how to combine query and sector, aiding parameter understanding.

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?

The description clearly states it searches the financial knowledge graph for specific entity types (companies, people, patents) by name, ticker, or description, distinguishing it from sibling tools like get_entity or find_path.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like get_entity or compare_entities. Examples show usage but don't explain selection criteria.

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