Skip to main content
Glama
phxdev1

People Data Labs MCP Server

search_people

Search for individuals using SQL-like queries to match specific criteria, enabling precise identification and retrieval of relevant profiles from People Data Labs' extensive dataset.

Instructions

Search for people matching specific criteria

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic for the 'search_people' tool. It validates input, constructs the API request to People Data Labs '/person/search' endpoint (with dataType='person'), and returns the 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), }, ], }; }
  • src/index.ts:398-399 (registration)
    Switch case that registers and routes incoming 'search_people' tool calls to the handleSearch handler with 'person' dataType.
    case 'search_people': return await this.handleSearch('person', request.params.arguments);
  • Tool registration in ListTools response, including name, description, and input schema definition for 'search_people'.
    name: 'search_people', description: 'Search for people matching specific criteria', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'SQL-like query to search for people', }, size: { type: 'number', description: 'Number of results to return (max 100)', minimum: 1, maximum: 100, }, }, required: ['query'], },
  • Type guard helper function used to validate input arguments for the search_people tool (and other search tools).
    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)); };

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