Skip to main content
Glama
code-rabi

LittleSis MCP

by code-rabi

get_entity_extensions

Retrieve entity type classifications and associated details for corporate influence tracking. Identify relationships between persons, organizations, and businesses to support accountability research.

Instructions

Get the types/extensions associated with an entity (Person, Organization, Business, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe entity ID
detailsNoInclude additional details contained within extensions

Implementation Reference

  • The handler function that executes the tool logic: calls LittleSisApi.getEntityExtensions with id and details, formats the JSON response, and handles errors.
    export async function handleGetEntityExtensions(args: any) {
      try {
        const result = await LittleSisApi.getEntityExtensions(args.id, args.details);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching entity extensions: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
  • Tool definition with input schema specifying required 'id' (number) and optional 'details' (boolean).
    export const getEntityExtensionsTool: Tool = {
      name: 'get_entity_extensions',
      description: 'Get the types/extensions associated with an entity (Person, Organization, Business, etc.)',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'number',
            description: 'The entity ID'
          },
          details: {
            type: 'boolean',
            description: 'Include additional details contained within extensions',
            default: false
          }
        },
        required: ['id']
      }
    };
  • src/index.ts:72-81 (registration)
    Registration of tool handlers mapping 'get_entity_extensions' to handleGetEntityExtensions function, used by the CallToolRequestSchema handler.
    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,
    };
  • API client method that performs the HTTP request to LittleSis API for entity extensions.
    static async getEntityExtensions(id: number, details: boolean = false): Promise<LittleSisApiResponse<Extension[]>> {
      const detailsParam = details ? '?details=TRUE' : '';
      return makeApiRequest<Extension[]>(`/entities/${id}/extensions${detailsParam}`);
    }
  • src/index.ts:58-69 (registration)
    Tool list registration including getEntityExtensionsTool for ListToolsRequestSchema.
    const tools = [
      // Entity tools
      getEntityTool,
      getEntitesTool,
      searchEntitesTool,
      getEntityExtensionsTool,
      getEntityRelationshipsTool,
      getEntityConnectionsTool,
      getEntityListsTool,
      // Relationship tools
      getRelationshipTool,
    ];

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