Skip to main content
Glama
code-rabi

LittleSis MCP

by code-rabi

get_entity_connections

Find relationships between entities in corporate power networks. Retrieve connected entities by ID, filter by relationship type, and paginate results for comprehensive analysis.

Instructions

Get other entities that this entity has relationships with

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe entity ID
category_idNoFilter connections by relationship category
pageNoPage number for pagination

Implementation Reference

  • The main handler function that executes the tool logic: validates args, calls LittleSisApi.getEntityConnections, formats JSON response or error.
    export async function handleGetEntityConnections(args: any) {
      try {
        const result = await LittleSisApi.getEntityConnections(args.id, {
          category_id: args.category_id,
          page: args.page
        });
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching entity connections: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
  • Tool object definition containing the input schema for validation and tool discovery.
    export const getEntityConnectionsTool: Tool = {
      name: 'get_entity_connections',
      description: 'Get other entities that this entity has relationships with',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'number',
            description: 'The entity ID'
          },
          category_id: {
            type: 'number',
            description: 'Filter connections by relationship category'
          },
          page: {
            type: 'number',
            description: 'Page number for pagination',
            minimum: 1
          }
        },
        required: ['id']
      }
    };
  • src/index.ts:72-81 (registration)
    Registration of tool handlers in the server, mapping 'get_entity_connections' to its handler 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:58-69 (registration)
    Registration of available tools list including getEntityConnectionsTool for ListToolsRequest.
    const tools = [
      // Entity tools
      getEntityTool,
      getEntitesTool,
      searchEntitesTool,
      getEntityExtensionsTool,
      getEntityRelationshipsTool,
      getEntityConnectionsTool,
      getEntityListsTool,
      // Relationship tools
      getRelationshipTool,
    ];
  • LittleSisApi helper method that makes the HTTP request to fetch entity connections, used by the handler.
    static async getEntityConnections(id: number, params?: EntityConnectionsParams): Promise<LittleSisApiResponse<Entity[]>> {
      const searchParams = new URLSearchParams();
      if (params?.category_id) searchParams.append('category_id', params.category_id.toString());
      if (params?.page) searchParams.append('page', params.page.toString());
      
      const paramString = searchParams.toString();
      const endpoint = `/entities/${id}/connections${paramString ? '?' + paramString : ''}`;
      return makeApiRequest<Entity[]>(endpoint);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions retrieving entities with relationships but fails to describe key traits like whether it's read-only, pagination behavior (implied by 'page' parameter but not explained), rate limits, or authentication needs. This leaves significant gaps for a tool with parameters and no output schema.

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, efficient sentence that directly states the tool's function without unnecessary words. It is appropriately sized and front-loaded, though it could be slightly more informative without losing conciseness.

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 tool has 3 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, output format, and differentiation from siblings, making it inadequate for an agent to fully understand how to use the tool effectively in context.

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%, so the input schema already documents all parameters (id, category_id, page) with descriptions. The description adds no additional meaning beyond what the schema provides, such as explaining relationship categories or pagination details, meeting the baseline for high schema coverage.

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

Purpose3/5

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

The description states the tool's purpose as retrieving related entities based on relationships, which is clear but vague. It specifies 'other entities' and 'relationships' but doesn't distinguish it from sibling tools like 'get_entity_relationships' or 'get_relationship', leaving ambiguity about scope and differentiation.

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 is provided on when to use this tool versus alternatives such as 'get_entity_relationships' or 'search_entities'. The description implies usage for relationship-based queries but offers no explicit context, exclusions, or comparisons to sibling tools, leaving the agent to infer usage scenarios.

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