Skip to main content
Glama

get_entities

Retrieve detailed information on up to 300 entities in a single request using this tool, enabling efficient tracking and analysis of corporate power and relationships for enhanced insights.

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

  • Handler function that executes the get_entities tool: fetches multiple entities from LittleSis API using the provided IDs and returns the result as formatted JSON.
    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 }; }
  • Tool schema definition including input schema for get_entities: requires an array of up to 300 entity IDs.
    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)
    Registration of the get_entities handler in the main toolHandlers mapping used by the MCP server.
    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)
    Inclusion of the get_entities tool schema (getEntitesTool) in the list of available tools returned by ListToolsRequest.
    const tools = [ // Entity tools getEntityTool, getEntitesTool, searchEntitesTool, getEntityExtensionsTool, getEntityRelationshipsTool, getEntityConnectionsTool, getEntityListsTool, // Relationship tools getRelationshipTool, ];
  • API client method called by the handler to fetch entities from LittleSis API.
    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(',')}`); }

Other Tools

Related 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