Skip to main content
Glama
code-rabi

LittleSis MCP

by code-rabi

get_relationship

Retrieve detailed information about connections between entities to analyze corporate influence and accountability.

Instructions

Get detailed information about a specific relationship between two entities

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe unique numerical ID of the relationship in LittleSis database

Implementation Reference

  • The handler function that implements the core logic of the 'get_relationship' tool. It calls the LittleSisApi.getRelationship method and formats the response as MCP tool content, handling errors appropriately.
    export async function handleGetRelationship(args: any) {
      try {
        const result = await LittleSisApi.getRelationship(args.id);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching relationship: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
  • The tool specification including the input schema that defines the expected arguments (relationship ID) for the 'get_relationship' tool.
    export const getRelationshipTool: Tool = {
      name: 'get_relationship',
      description: 'Get detailed information about a specific relationship between two entities',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'number',
            description: 'The unique numerical ID of the relationship in LittleSis database'
          }
        },
        required: ['id']
      }
    };
  • src/index.ts:72-81 (registration)
    Registration of the tool handler mapping, associating 'get_relationship' with handleGetRelationship function.
    const toolHandlers = {
      get_entity: handleGetEntity,
      get_entities: handleGetEntities,
      search_entities: handleSearchEntities,
      get_entity_extensions: handleGetEntityExtensions,
      get_entity_relationships: handleGetEntityRelationships,
      get_entity_connections: handleGetEntityConnections,
      get_entity_lists: handleGetEntityLists,
      get_relationship: handleGetRelationship,
    };
  • src/index.ts:67-69 (registration)
    Registration of the tool in the list of available tools returned by ListToolsRequest.
      // Relationship tools
      getRelationshipTool,
    ];
  • Helper method in LittleSisApi class that makes the actual API request to fetch relationship data from LittleSis.
    static async getRelationship(id: number): Promise<RelationshipWithEntities> {
      return makeApiRequest<Relationship>(`/relationships/${id}`) as Promise<RelationshipWithEntities>;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation, implying it's read-only, but doesn't clarify permissions, rate limits, error handling, or what 'detailed information' includes (e.g., fields, format). For a tool with zero annotation coverage, this is insufficient.

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

Conciseness4/5

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

The description is a single, clear sentence that efficiently conveys the core purpose without unnecessary words. It's appropriately sized for a simple tool, though it could be slightly more structured by front-loading key details like the required ID parameter.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'detailed information' returns (e.g., entity names, relationship type, dates), error cases (e.g., invalid ID), or dependencies. For a tool with no structured behavioral or output data, more context is needed.

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 description coverage is 100%, with the single parameter 'id' documented as 'The unique numerical ID of the relationship in LittleSis database'. The description adds no additional meaning beyond this, such as examples or constraints, so it meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('detailed information about a specific relationship between two entities'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'get_entity_relationships' or 'get_entity_connections', which might also retrieve relationship data.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing a relationship ID, or compare it to sibling tools like 'get_entity_relationships' (which might list relationships) or 'get_entity_connections' (which could involve relationships).

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/code-rabi/littlesis-mcp'

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