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);
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. It mentions 'enrich' but doesn't specify whether this is a read-only lookup or a write operation, what data sources are used, potential rate limits, or error handling. This leaves critical behavioral traits undefined for a tool with 8 parameters.

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 that directly states the tool's function without unnecessary words. It is front-loaded with the core action and resource, making it highly concise and well-structured.

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 (8 parameters, no output schema, and no annotations), the description is insufficient. It doesn't explain what 'enrich' entails, the type of data returned, or how to interpret results like 'min_likelihood'. For a data-fetching tool with multiple inputs, more context is needed to guide effective use.

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?

The input schema has 100% description coverage, so the schema already documents all 8 parameters thoroughly. The description adds no additional parameter semantics beyond implying that 'additional data' is fetched, which doesn't enhance the schema's details. This meets the baseline of 3 for high schema coverage.

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 verb ('enrich') and resource ('person profile') with the source ('People Data Labs'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'bulk_person_enrich' or 'search_people', which limits the score to 4 instead of 5.

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 like 'bulk_person_enrich' or 'search_people'. It lacks context about prerequisites, such as which parameters are required or how to choose between them, leaving the agent without usage direction.

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