Skip to main content
Glama
phxdev1

People Data Labs MCP Server

search_locations

Utilize SQL-like queries to find locations based on specific criteria, returning up to 100 results for targeted searches using data models from People Data Labs.

Instructions

Search for locations matching specific criteria

Input Schema

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

Implementation Reference

  • Core handler function implementing the search_locations tool logic. Validates input arguments, constructs API parameters with SQL query, calls People Data Labs /location/search endpoint, and returns JSON response.
    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 for the search_locations tool, specifying query (required) and optional size parameters.
    {
      name: 'search_locations',
      description: 'Search for locations matching specific criteria',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'SQL-like query to search for locations',
          },
          size: {
            type: 'number',
            description: 'Number of results to return (max 100)',
            minimum: 1,
            maximum: 100,
          },
        },
        required: ['query'],
      },
    },
  • src/index.ts:414-415 (registration)
    Registration and dispatch handler for search_locations tool in the CallToolRequestSchema switch statement, invoking handleSearch with 'location' dataType.
    case 'search_locations':
      return await this.handleSearch('location', request.params.arguments);
  • Helper validation function for search tool arguments, ensuring query is string and size is valid number (1-100), used by search_locations handler.
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'search' but doesn't specify if this is read-only, has rate limits, requires authentication, or details the return format. For a search tool with zero annotation coverage, this is a significant gap in transparency.

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 appropriately sized and front-loaded, clearly stating the tool's function without unnecessary elaboration.

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 no annotations and no output schema, the description is incomplete. It doesn't explain behavioral traits, return values, or usage context, leaving the agent with insufficient information for effective tool invocation.

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%, so the schema already documents both parameters (query and size) with details like SQL-like syntax and max/min values. The description adds no additional meaning beyond what the schema provides, but the high coverage justifies a baseline score of 3.

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

Purpose3/5

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

The description states the tool searches for locations with specific criteria, which clarifies the verb (search) and resource (locations). However, it doesn't distinguish this from sibling tools like search_companies or search_people, leaving ambiguity about what makes location searches unique. The purpose is clear but lacks sibling differentiation.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, exclusions, or comparisons to sibling tools like autocomplete or other search functions. This leaves the agent without context for tool selection.

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