Skip to main content
Glama

get_entities

Retrieve detailed information about multiple corporate entities simultaneously to analyze relationships and track corporate influence for accountability research.

Instructions

Get information about multiple entities at once (up to 300 entities per request)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesArray of entity IDs to retrieve (maximum 300)

Implementation Reference

  • The handler function that implements the core logic of the 'get_entities' tool. It calls LittleSisApi.getEntities with the provided ids and returns a formatted text response with JSON data or an error message.
    export async function handleGetEntities(args: any) { try { const result = await LittleSisApi.getEntities(args.ids); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching entities: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; }
  • The Tool definition providing the schema, name, and description for the 'get_entities' tool, used in tool listing.
    export const getEntitesTool: Tool = { name: 'get_entities', description: 'Get information about multiple entities at once (up to 300 entities per request)', inputSchema: { type: 'object', properties: { ids: { type: 'array', items: { type: 'number' }, description: 'Array of entity IDs to retrieve (maximum 300)', maxItems: 300 } }, required: ['ids'] } };
  • src/index.ts:72-81 (registration)
    The toolHandlers object that registers the 'get_entities' tool name to its handler function handleGetEntities, used in the call tool request 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, };
  • The LittleSisApi.getEntities static method, which performs the actual API request to fetch multiple entities and is called by the tool handler.
    static async getEntities(ids: number[]): Promise<LittleSisApiResponse<Entity[]>> { if (ids.length > 300) { throw new Error('Maximum 300 entities per request'); } return makeApiRequest<Entity[]>(`/entities?ids=${ids.join(',')}`); }

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