get_entity_extensions
Retrieve entity-specific extensions and details (Person, Organization, Business) using the entity ID, enabling analysis of corporate influence and relationships via LittleSis MCP.
Instructions
Get the types/extensions associated with an entity (Person, Organization, Business, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| details | No | Include additional details contained within extensions | |
| id | Yes | The entity ID |
Implementation Reference
- src/tools/entity-tools.ts:229-251 (handler)The handler function that executes the get_entity_extensions tool logic. It calls the LittleSisApi.getEntityExtensions method with the provided arguments and returns the formatted response or error.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 }; } }
- src/tools/entity-tools.ts:67-85 (schema)The Tool object defining the schema, name, description, and input validation schema for the get_entity_extensions tool.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)The server toolHandlers mapping that registers the handleGetEntityExtensions function for the 'get_entity_extensions' tool name, enabling the server to dispatch calls to the correct 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, };
- src/api.ts:67-70 (helper)Supporting API utility method in LittleSisApi class that performs the actual HTTP request to fetch entity extensions from the LittleSis API.static async getEntityExtensions(id: number, details: boolean = false): Promise<LittleSisApiResponse<Extension[]>> { const detailsParam = details ? '?details=TRUE' : ''; return makeApiRequest<Extension[]>(`/entities/${id}/extensions${detailsParam}`); }