Skip to main content
Glama
code-rabi

LittleSis MCP

by code-rabi

search_entities

Search for corporate and organizational entities by name to track relationships and influence. Filter results by region or tags to identify key players in corporate networks.

Instructions

Search for entities by name. Results are ranked by number of relationships.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query (entity name)
pageNoPage number for pagination (default: 1)
regionsNoFilter by region ID
tagsNoFilter by tags (e.g., "oil")

Implementation Reference

  • The main handler function for the 'search_entities' tool. It calls LittleSisApi.searchEntities with the input args, formats the result as text content, and handles errors appropriately.
    export async function handleSearchEntities(args: any) {
      try {
        const result = await LittleSisApi.searchEntities(args);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error searching entities: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
  • The Tool schema definition for 'search_entities', including inputSchema with properties q (required), page, regions, tags.
    export const searchEntitesTool: Tool = {
      name: 'search_entities',
      description: 'Search for entities by name. Results are ranked by number of relationships.',
      inputSchema: {
        type: 'object',
        properties: {
          q: {
            type: 'string',
            description: 'Search query (entity name)'
          },
          page: {
            type: 'number',
            description: 'Page number for pagination (default: 1)',
            minimum: 1
          },
          regions: {
            type: 'number',
            description: 'Filter by region ID'
          },
          tags: {
            type: 'string',
            description: 'Filter by tags (e.g., "oil")'
          }
        },
        required: ['q']
      }
    };
  • src/index.ts:72-81 (registration)
    Registration of the tool handler in the central toolHandlers mapping used by the CallToolRequestSchema handler to dispatch 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,
    };
  • The LittleSisApi helper method searchEntities that constructs the API request to LittleSis /entities/search endpoint and is called by the tool handler.
    static async searchEntities(params: EntitySearchParams): Promise<LittleSisApiResponse<Entity[]>> {
      const searchParams = new URLSearchParams();
      searchParams.append('q', params.q);
      if (params.page) searchParams.append('page', params.page.toString());
      if (params.regions) searchParams.append('regions', params.regions.toString());
      if (params.tags) searchParams.append('tags', params.tags);
      
      return makeApiRequest<Entity[]>(`/entities/search?${searchParams.toString()}`);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions result ranking by 'number of relationships' which adds some behavioral context, but doesn't address important aspects like whether this is a read-only operation, what permissions might be required, pagination behavior beyond the 'page' parameter, rate limits, or error conditions. For a search tool with 4 parameters, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just two sentences with zero wasted words. It's front-loaded with the core purpose ('Search for entities by name') and follows with important behavioral context about result ranking. Every sentence earns its place by providing distinct, valuable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a search tool with 4 parameters, no annotations, and no output schema, the description is incomplete. While concise, it doesn't explain what 'entities' are in this context, what the search returns (beyond mentioning ranking), how comprehensive the search is, or any limitations. The absence of output schema means the description should ideally provide some indication of return format, but it doesn't.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the input schema already documents all 4 parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it mentions searching 'by name' which aligns with the 'q' parameter's description, but provides no additional context about how the search works, what 'entities' encompass, or how the ranking affects results. The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search for entities by name' provides a specific verb ('search') and resource ('entities'), and 'Results are ranked by number of relationships' adds useful context about result ordering. However, it doesn't explicitly differentiate from sibling tools like 'get_entities' or 'get_entity', which might offer alternative ways to retrieve entity information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools like 'get_entities', 'get_entity', and 'get_entity_connections', there's no indication of when this search functionality is preferred over direct retrieval methods. The description lacks any context about use cases, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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