Skip to main content
Glama
GraphiteAI

graphite-mcp

Official
by GraphiteAI

compare_entities

Compare two entities by evaluating shared connections, direct relationships, and path distance. Input entity IDs to analyze links.

Instructions

Compare two entities: shared connections, direct relationships, path distance. Example: compare_entities(entity_a='company:NVDA', entity_b='company:AMD')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_aYesFirst entity ID
entity_bYesSecond entity ID

Implementation Reference

  • Tool registration in the list_tools() function — defines the name, description, and inputSchema for 'compare_entities'
    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 logic in call_tool() — calls the REST API endpoint /graph/compare with params 'a' and 'b' from the arguments
    elif name == "compare_entities":
        result = await _get("/graph/compare", params={
            "a": arguments["entity_a"],
            "b": arguments["entity_b"],
        })
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that the tool returns shared connections, direct relationships, and path distance. This is good but lacks details on output format, performance, or potential limits.

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?

The description is concise: two sentences plus an example. Every word is meaningful, and the structure is front-loaded with the key action. No unnecessary information.

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

Completeness3/5

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

Without an output schema, the description should clarify the return value. It lists comparison aspects but does not specify the format or structure of the output. This is adequate for a mid-complexity tool but could be more complete.

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 brief descriptions. The description adds value by showing an example with a specific entity format (e.g., 'company:NVDA'), clarifying the expected parameter structure beyond the schema's generic 'First entity ID'.

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 the tool's purpose: comparing two entities across three specific aspects (shared connections, direct relationships, path distance). It distinguishes from siblings like 'get_relationships' and 'find_path' by focusing on a multi-faceted comparison. The example further clarifies the intent.

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?

The description implies usage for comparing entities but lacks explicit guidance on when to use this tool versus alternatives like 'get_relationships' or 'find_path'. No exclusionary criteria or contextual conditions are provided.

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