Skip to main content
Glama
phxdev1

People Data Labs MCP Server

autocomplete

Generate instant autocomplete suggestions for partial text queries across fields like company, school, title, skill, and location to enhance search precision and efficiency.

Instructions

Get autocomplete suggestions for a partial query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYesField to autocomplete (company, school, title, skill, location)
sizeNoNumber of results to return (max 100)
textYesPartial text to autocomplete

Implementation Reference

  • The handler function for the 'autocomplete' tool. Validates required parameters (field and text), calls the People Data Labs /autocomplete API endpoint, and returns the JSON response as text content.
    private async handleAutocomplete(args: any) { if (!args || typeof args !== 'object' || !args.field || !args.text) { throw new McpError( ErrorCode.InvalidParams, 'Invalid autocomplete parameters. Must provide field and text.' ); } const params: Record<string, any> = { field: args.field, text: args.text, size: args.size || 10, }; const response = await pdlApi.get('/autocomplete', { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
  • src/index.ts:365-388 (registration)
    Registers the 'autocomplete' tool in the ListTools response, including its name, description, and input schema definition.
    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'], }, },
  • src/index.ts:426-427 (registration)
    In the CallTool request handler switch statement, routes calls to the 'autocomplete' tool to its handler method.
    case 'autocomplete': return await this.handleAutocomplete(request.params.arguments);
  • JSON schema defining the input parameters for the 'autocomplete' tool: required field (enum) and text, optional size.
    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'], },

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