bulk_person_enrich
Enrich multiple person profiles simultaneously with bulk requests, streamlining data enhancement for person profiles using People Data Labs' comprehensive datasets and search capabilities.
Instructions
Enrich multiple person profiles in a single request
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requests | Yes | Array of person enrichment requests |
Implementation Reference
- src/index.ts:495-513 (handler)The main handler function for the bulk_person_enrich tool. Validates input, calls the People Data Labs bulk person enrichment API endpoint, and returns the JSON response.private async handleBulkPersonEnrich(args: any) { if (!args || !Array.isArray(args.requests) || args.requests.length === 0) { throw new McpError( ErrorCode.InvalidParams, 'Invalid bulk person enrichment parameters. Must provide an array of requests.' ); } const response = await pdlApi.post('/person/bulk', args); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/index.ts:194-217 (registration)Registers the bulk_person_enrich tool in the MCP server's tool list, including its description and input schema.{ name: 'bulk_person_enrich', description: 'Enrich multiple person profiles in a single request', inputSchema: { type: 'object', properties: { requests: { type: 'array', items: { type: 'object', properties: { params: { type: 'object', description: 'Parameters for person enrichment', }, }, required: ['params'], }, description: 'Array of person enrichment requests', }, }, required: ['requests'], }, },
- src/index.ts:197-216 (schema)Defines the input schema for the bulk_person_enrich tool, specifying an array of requests each with params.inputSchema: { type: 'object', properties: { requests: { type: 'array', items: { type: 'object', properties: { params: { type: 'object', description: 'Parameters for person enrichment', }, }, required: ['params'], }, description: 'Array of person enrichment requests', }, }, required: ['requests'], },
- src/index.ts:400-401 (handler)Dispatches calls to the bulk_person_enrich tool to the specific handler method.case 'bulk_person_enrich': return await this.handleBulkPersonEnrich(request.params.arguments);
- src/index.ts:19-26 (helper)Creates the axios instance used by the handler to make API calls to People Data Labs, including the API key from environment.const pdlApi = axios.create({ baseURL: 'https://api.peopledatalabs.com/v5', headers: { 'X-Api-Key': PDL_API_KEY, 'Content-Type': 'application/json', 'Accept': 'application/json', }, });