Skip to main content
Glama
GraphiteAI

graphite-mcp

Official
by GraphiteAI

get_relationships

Retrieve all relationships—such as suppliers, competitors, partners, and dependencies—for a company entity by providing its entity ID.

Instructions

Get all relationships for an entity — suppliers, competitors, partners, dependencies, etc. Example: get_relationships(entity_id='company:NVDA')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesEntity ID

Implementation Reference

  • The handler for the 'get_relationships' tool. Calls the REST API endpoint /entities/{entity_id}/relationships via the _get helper.
    elif name == "get_relationships":
        result = await _get(f"/entities/{arguments['entity_id']}/relationships")
  • Schema definition for the 'get_relationships' tool, declaring its input schema (requires a string 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"],
        },
    ),
  • Registration of 'get_relationships' as an MCP tool via the @server.list_tools() decorator.
    @server.list_tools()
    async def list_tools() -> list[Tool]:
  • The _get helper function used by the handler to perform the actual HTTP GET request to the central API.
    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 must convey behavior. It implies a read operation but doesn't mention error handling, rate limits, or return format. The brief description 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 an example, no fluff. Everything is front-loaded and efficient.

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 single-parameter tool, the description covers purpose and provides an example. Minor gap: no mention of output structure or read-only nature.

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 coverage is 100% with 'Entity ID' description; the example adds format context (e.g., 'company:NVDA') but no additional semantic detail beyond schema.

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 retrieves all relationships for an entity, listing specific types (suppliers, competitors, etc.), and contrasts with sibling tools like get_entity.

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 explicit guidance on when to use this tool versus alternatives. The example provides context but no exclusion criteria or when-not-to-use advice.

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