Skip to main content
Glama
phxdev1

People Data Labs MCP Server

enrich_person

Enhance person profiles by adding data such as contact details, social media links, job titles, and company information using People Data Labs' comprehensive dataset.

Instructions

Enrich a person profile with additional data from People Data Labs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyNoCompany name where the person works
emailNoEmail address of the person
locationNoLocation of the person (city, state, country)
min_likelihoodNoMinimum likelihood score (0-1) for the match
nameNoFull name of the person
phoneNoPhone number of the person
profileNoSocial media profile URLs of the person
titleNoJob title of the person

Implementation Reference

  • The primary handler function for the 'enrich_person' tool. Validates input using isValidPersonEnrichArgs, constructs query parameters from arguments, calls the People Data Labs API at '/person/enrich', and returns the response as formatted JSON text.
    private async handleEnrichPerson(args: any) { if (!isValidPersonEnrichArgs(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid person enrichment parameters. Must provide at least one identifier (email, phone, name, or profile).' ); } const params: Record<string, any> = {}; // Add parameters to the request if (args.email) params.email = args.email; if (args.phone) params.phone = args.phone; if (args.name) params.name = args.name; if (args.profile) params.profile = args.profile; if (args.location) params.location = args.location; if (args.company) params.company = args.company; if (args.title) params.title = args.title; if (args.min_likelihood !== undefined) params.min_likelihood = args.min_likelihood; const response = await pdlApi.get('/person/enrich', { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
  • Tool registration in ListTools response including name, description, and detailed input schema requiring at least one of email, phone, name, or profile.
    { name: 'enrich_person', description: 'Enrich a person profile with additional data from People Data Labs', inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'Email address of the person', }, phone: { type: 'string', description: 'Phone number of the person', }, name: { type: 'string', description: 'Full name of the person', }, profile: { type: 'array', items: { type: 'string' }, description: 'Social media profile URLs of the person', }, location: { type: 'string', description: 'Location of the person (city, state, country)', }, company: { type: 'string', description: 'Company name where the person works', }, title: { type: 'string', description: 'Job title of the person', }, min_likelihood: { type: 'number', description: 'Minimum likelihood score (0-1) for the match', minimum: 0, maximum: 1, }, }, anyOf: [ { required: ['email'] }, { required: ['phone'] }, { required: ['name'] }, { required: ['profile'] }, ], }, },
  • Type guard validation function ensuring arguments are a valid object with at least one person identifier (email, phone, name, or profile array) and valid min_likelihood if provided.
    const isValidPersonEnrichArgs = (args: any): args is { email?: string; phone?: string; name?: string; profile?: string[]; location?: string; company?: string; title?: string; min_likelihood?: number; } => { if (typeof args !== 'object' || args === null) { return false; } // Check if at least one identifier is provided const hasIdentifier = typeof args.email === 'string' || typeof args.phone === 'string' || typeof args.name === 'string' || (Array.isArray(args.profile) && args.profile.length > 0); if (!hasIdentifier) { return false; } // Validate optional fields if present if (args.min_likelihood !== undefined && (typeof args.min_likelihood !== 'number' || args.min_likelihood < 0 || args.min_likelihood > 1)) { return false; } return true; };
  • src/index.ts:396-397 (registration)
    Dispatch registration in the CallToolRequestSchema handler switch statement, routing calls to 'enrich_person' to the handleEnrichPerson method.
    case 'enrich_person': return await this.handleEnrichPerson(request.params.arguments);

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