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'],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get' implies a read operation, it doesn't address authentication requirements, rate limits, error conditions, or what the suggestions look like (format, ranking, source). For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 states the core functionality without any fluff. It's appropriately sized for a straightforward autocomplete tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only autocomplete tool with good schema coverage but no output schema, the description provides the basic purpose but lacks important context. Without annotations or output schema, it should ideally mention what the suggestions look like, any limitations, or how results are ordered. It's minimally adequate but has clear gaps.

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?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or clarify edge cases. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Get') and resource ('autocomplete suggestions') with the scope ('for a partial query'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like search_* tools, but the focus on autocomplete rather than full search provides some implicit distinction.

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 the various search_* sibling tools. There's no mention of prerequisites, limitations, or comparative scenarios, leaving the agent to infer usage context entirely from the tool name and parameters.

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