Skip to main content
Glama
phxdev1

People Data Labs MCP Server

enrich_company

Enhance company profiles by adding crucial data such as social media links, stock tickers, and website details. Input company name, website, profiles, or ticker for comprehensive enrichment.

Instructions

Enrich a company profile with additional data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName of the company
profileNoSocial media profile URLs of the company
tickerNoStock ticker symbol of the company
websiteNoWebsite of the company

Implementation Reference

  • The main execution logic for the 'enrich_company' tool: validates arguments using isValidCompanyEnrichArgs, constructs query parameters, calls the People Data Labs /company/enrich API endpoint, and returns the response as formatted JSON.
    private async handleEnrichCompany(args: any) { if (!isValidCompanyEnrichArgs(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid company enrichment parameters. Must provide at least one identifier (name, website, profile, or ticker).' ); } const params: Record<string, any> = {}; // Add parameters to the request if (args.name) params.name = args.name; if (args.website) params.website = args.website; if (args.profile) params.profile = args.profile; if (args.ticker) params.ticker = args.ticker; const response = await pdlApi.get('/company/enrich', { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
  • src/index.ts:220-253 (registration)
    Registers the 'enrich_company' tool in the MCP server's tool list, including name, description, and detailed input schema defining properties and required fields via anyOf.
    { name: 'enrich_company', description: 'Enrich a company profile with additional data', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Name of the company', }, website: { type: 'string', description: 'Website of the company', }, profile: { type: 'array', items: { type: 'string' }, description: 'Social media profile URLs of the company', }, ticker: { type: 'string', description: 'Stock ticker symbol of the company', }, }, anyOf: [ { required: ['name'] }, { required: ['website'] }, { required: ['profile'] }, { required: ['ticker'] }, ], }, },
  • Type guard function that validates company enrichment arguments, ensuring at least one identifier (name, website, profile, or ticker) is provided.
    const isValidCompanyEnrichArgs = (args: any): args is { name?: string; website?: string; profile?: string[]; ticker?: string; } => { if (typeof args !== 'object' || args === null) { return false; } // Check if at least one identifier is provided const hasIdentifier = typeof args.name === 'string' || typeof args.website === 'string' || (Array.isArray(args.profile) && args.profile.length > 0) || typeof args.ticker === 'string'; return hasIdentifier; };
  • src/index.ts:404-405 (registration)
    Routes 'enrich_company' tool calls to the handleEnrichCompany method in the CallToolRequestSchema handler.
    case 'enrich_company': return await this.handleEnrichCompany(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