Skip to main content
Glama

get_entity_lists

Retrieve lists containing a specific entity, such as Fortune 1000 or lobbying registries, to track corporate affiliations and influence networks.

Instructions

Get the lists that an entity appears on (e.g., Fortune 1000, lobbying lists)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe entity ID

Implementation Reference

  • Handler function that executes the 'get_entity_lists' tool: calls LittleSisApi.getEntityLists with the provided entity ID, formats the JSON response, and handles errors.
    export async function handleGetEntityLists(args: any) { try { const result = await LittleSisApi.getEntityLists(args.id); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching entity lists: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; }
  • Tool schema definition for 'get_entity_lists', specifying input as an object with required 'id' number property.
    export const getEntityListsTool: Tool = { name: 'get_entity_lists', description: 'Get the lists that an entity appears on (e.g., Fortune 1000, lobbying lists)', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'The entity ID' } }, required: ['id'] } };
  • src/index.ts:72-81 (registration)
    Registration of tool handlers in the mapping object used by CallToolRequestSchema handler to dispatch 'get_entity_lists' to handleGetEntityLists.
    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)
    Registration of tool specifications in the tools array returned by ListToolsRequestSchema handler, including getEntityListsTool.
    const tools = [ // Entity tools getEntityTool, getEntitesTool, searchEntitesTool, getEntityExtensionsTool, getEntityRelationshipsTool, getEntityConnectionsTool, getEntityListsTool, // Relationship tools getRelationshipTool, ];
  • API helper method called by the handler to fetch entity lists from LittleSis API endpoint /entities/{id}/lists.
    static async getEntityLists(id: number): Promise<LittleSisApiResponse<List[]>> { return makeApiRequest<List[]>(`/entities/${id}/lists`); }

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