Skip to main content
Glama
phxdev1

People Data Labs MCP Server

search_schools

Search for schools using SQL-like queries to match specific criteria, with options to control the number of results returned.

Instructions

Search for schools matching specific criteria

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSQL-like query to search for schools
sizeNoNumber of results to return (max 100)

Implementation Reference

  • Generic search handler that executes the search_schools tool logic by calling the People Data Labs API endpoint /school/search with the SQL query.
    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),
          },
        ],
      };
    }
  • Tool schema definition including name, description, and input schema for search_schools.
    {
      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'],
      },
    },
  • src/index.ts:410-411 (registration)
    Switch case that registers and routes calls to the search_schools tool handler.
    case 'search_schools':
      return await this.handleSearch('school', request.params.arguments);
  • Helper function to validate input arguments for search tools including search_schools.
    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));
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'search' but doesn't disclose behavioral traits such as read-only vs. mutative nature, authentication needs, rate limits, or result format. The description is too minimal to compensate for the lack of annotations.

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 with zero waste. It's appropriately sized and front-loaded, stating the core action without unnecessary elaboration, making it easy to parse quickly.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what the search returns, how results are structured, or behavioral aspects like pagination. For a search tool with two parameters, this leaves significant gaps in understanding the tool's operation.

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 fully documents the two parameters ('query' and 'size'). The description adds no meaning beyond the schema, as 'matching specific criteria' is vague and doesn't clarify parameter usage or syntax. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose ('Search for schools') with the resource ('schools') and verb ('search'), but it's vague about what 'matching specific criteria' entails. It doesn't differentiate from sibling tools like 'search_companies' or 'search_people' beyond the resource type, lacking specificity in scope or method.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context for 'specific criteria', or compare to siblings like 'autocomplete' or other search tools, 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