Skip to main content
Glama
phxdev1

People Data Labs MCP Server

search_companies

Find companies by applying SQL-like queries to filter results based on specific criteria, with customizable result sizes up to 100 matches.

Instructions

Search for companies matching specific criteria

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSQL-like query to search for companies
sizeNoNumber of results to return (max 100)

Implementation Reference

  • Core handler function that implements the search_companies tool logic by calling the People Data Labs /company/search API endpoint with the provided SQL query.
    private async handleSearch(dataType: string, args: any) {
      if (!isValidSearchArgs(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          `Invalid search parameters. Must provide a query string.`
        );
      }
    
      const params: Record<string, any> = {
        sql: args.query,
        size: args.size || 10,
      };
    
      const response = await pdlApi.get(`/${dataType}/search`, { params });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Input schema definition and tool registration for search_companies in the ListTools response.
    {
      name: 'search_companies',
      description: 'Search for companies matching specific criteria',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'SQL-like query to search for companies',
          },
          size: {
            type: 'number',
            description: 'Number of results to return (max 100)',
            minimum: 1,
            maximum: 100,
          },
        },
        required: ['query'],
      },
  • src/index.ts:406-407 (registration)
    Switch case registration that routes search_companies tool calls to the handleSearch function with 'company' data type.
    case 'search_companies':
      return await this.handleSearch('company', request.params.arguments);
  • Validation helper function used by handleSearch to validate input arguments for search tools including search_companies.
    const isValidSearchArgs = (args: any): args is {
      query: string;
      size?: number;
    } => {
      return typeof args === 'object' &&
             args !== null &&
             typeof args.query === 'string' &&
             (args.size === undefined || (typeof args.size === 'number' && args.size > 0 && args.size <= 100));
    };
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 but offers minimal information. It states the tool searches based on 'specific criteria' but doesn't describe what those criteria entail, how results are returned (e.g., pagination, sorting), error conditions, or performance characteristics like rate limits. For a search tool with zero annotation coverage, this is insufficient to inform the agent adequately.

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 a single, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple search tool, avoiding unnecessary elaboration. Every word earns its place by conveying essential information without redundancy.

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 tool's complexity (a search operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the search returns (e.g., company details, IDs), how results are structured, or any limitations beyond the schema's 'size' constraint. For a tool that likely returns structured data, more context is needed to guide the agent effectively.

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?

Schema description coverage is 100%, with both parameters ('query' and 'size') well-documented in the schema. The description adds no additional meaning beyond what the schema provides—it doesn't explain the 'SQL-like query' format or provide examples, nor does it clarify the 'size' parameter's role in result management. Baseline 3 is appropriate as the schema handles 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 as 'Search for companies matching specific criteria', which includes a specific verb ('Search') and resource ('companies'). It distinguishes this tool from siblings like 'search_people' or 'search_schools' by specifying the company domain, though it doesn't explicitly differentiate from similar search tools in terms of scope or methodology.

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. It doesn't mention when to choose 'search_companies' over 'autocomplete' or 'enrich_company', nor does it specify prerequisites, exclusions, or contextual triggers for usage. This lack of comparative guidance leaves the agent to infer usage from the tool name alone.

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

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/phxdev1/peopledatalabs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server