get_entity
Retrieve detailed information about a specific person or organization using its unique LittleSis ID to access corporate influence data and relationships.
Instructions
Get detailed information about a specific entity (person or organization) from LittleSis by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The unique numerical ID of the entity in LittleSis database |
Implementation Reference
- src/tools/entity-tools.ts:157-179 (handler)The handleGetEntity function that executes the get_entity tool: extracts id from args, calls LittleSisApi.getEntity, formats result as text content or error.export async function handleGetEntity(args: any) { try { const result = await LittleSisApi.getEntity(args.id); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching entity: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
- src/tools/entity-tools.ts:5-18 (schema)Tool schema definition for get_entity, specifying name, description, and inputSchema requiring numeric 'id'.export const getEntityTool: Tool = { name: 'get_entity', description: 'Get detailed information about a specific entity (person or organization) from LittleSis by ID', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'The unique numerical ID of the entity in LittleSis database' } }, required: ['id'] } };
- src/index.ts:72-81 (registration)Registration of get_entity tool handler in the toolHandlers mapping used by 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, };
- src/index.ts:59-69 (registration)Inclusion of getEntityTool in the tools array returned by ListToolsRequestSchema handler.// Entity tools getEntityTool, getEntitesTool, searchEntitesTool, getEntityExtensionsTool, getEntityRelationshipsTool, getEntityConnectionsTool, getEntityListsTool, // Relationship tools getRelationshipTool, ];
- src/api.ts:46-48 (helper)LittleSisApi.getEntity static method called by the handler to fetch entity data from LittleSis API.static async getEntity(id: number): Promise<LittleSisApiResponse<Entity>> { return makeApiRequest<Entity>(`/entities/${id}`); }