search_skills
Search for skills using SQL-like queries to match specific criteria and retrieve targeted results, with support for specifying the number of outputs (up to 100).
Instructions
Search for skills matching specific criteria
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL-like query to search for skills | |
| size | No | Number of results to return (max 100) |
Implementation Reference
- src/index.ts:543-566 (handler)Core handler function for search_skills (and other search tools). Validates input, makes API call to People Data Labs `/skill/search` endpoint with SQL query, 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:342-361 (schema)JSON Schema definition and tool metadata for the search_skills tool, registered in the MCP tools list.
{ name: 'search_skills', description: 'Search for skills matching specific criteria', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'SQL-like query to search for skills', }, size: { type: 'number', description: 'Number of results to return (max 100)', minimum: 1, maximum: 100, }, }, required: ['query'], }, }, - src/index.ts:421-423 (registration)Switch case registration/dispatch for handling incoming calls to the search_skills tool by invoking handleSearch with dataType 'skill'.
// Skill API handlers case 'search_skills': return await this.handleSearch('skill', request.params.arguments); - src/index.ts:82-90 (schema)Runtime input validation type guard for search tool arguments, including search_skills.
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)); }; - src/index.ts:119-390 (helper)MCP server setup that registers all tools, including search_skills, via ListToolsRequestSchema handler.
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ // Person API tools { 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'] }, ], }, }, { 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'], }, }, { 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'], }, }, // Company API tools { 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'] }, ], }, }, { name: 'search_companies', description: 'Search for companies matching specific criteria', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'SQL-like query to search for companies', }, size: { type: 'number', description: 'Number of results to return (max 100)', minimum: 1, maximum: 100, }, }, required: ['query'], }, }, // School API tools { name: 'search_schools', description: 'Search for schools matching specific criteria', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'SQL-like query to search for schools', }, size: { type: 'number', description: 'Number of results to return (max 100)', minimum: 1, maximum: 100, }, }, required: ['query'], }, }, // Location API tools { name: 'search_locations', description: 'Search for locations matching specific criteria', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'SQL-like query to search for locations', }, size: { type: 'number', description: 'Number of results to return (max 100)', minimum: 1, maximum: 100, }, }, required: ['query'], }, }, // Job Title API tools { name: 'search_job_titles', description: 'Search for job titles matching specific criteria', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'SQL-like query to search for job titles', }, size: { type: 'number', description: 'Number of results to return (max 100)', minimum: 1, maximum: 100, }, }, required: ['query'], }, }, // Skill API tools { name: 'search_skills', description: 'Search for skills matching specific criteria', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'SQL-like query to search for skills', }, size: { type: 'number', description: 'Number of results to return (max 100)', minimum: 1, maximum: 100, }, }, required: ['query'], }, }, // Autocomplete API tools { name: 'autocomplete', description: 'Get autocomplete suggestions for a partial query', inputSchema: { type: 'object', properties: { field: { type: 'string', description: 'Field to autocomplete (company, school, title, skill, location)', enum: ['company', 'school', 'title', 'skill', 'location'], }, text: { type: 'string', description: 'Partial text to autocomplete', }, size: { type: 'number', description: 'Number of results to return (max 100)', minimum: 1, maximum: 100, }, }, required: ['field', 'text'], }, }, ], }));