Skip to main content
Glama

get_entity_lists

Retrieve lists associated with an entity, such as Fortune 1000 or lobbying lists, using the entity ID. Enhance insights into corporate influence and accountability through LittleSis MCP.

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

  • The async handler function that executes the get_entity_lists tool: extracts entity ID from args, calls LittleSisApi.getEntityLists, formats response as JSON text content or error message.
    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 metadata definition including name 'get_entity_lists', description, and input schema that requires a numeric 'id' parameter.
    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)
    Server tool handlers registry mapping snake_case tool name 'get_entity_lists' to its handler function for execution during tool calls.
    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, };
  • LittleSisApi static method that performs HTTP request to fetch lists for a given entity ID from the /entities/{id}/lists endpoint.
    static async getEntityLists(id: number): Promise<LittleSisApiResponse<List[]>> { return makeApiRequest<List[]>(`/entities/${id}/lists`); }

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