Skip to main content
Glama
zafronix

World Cup History MCP

search_players

Query player names to retrieve World Cup squad details including team, position, DOB, club, and goals per tournament.

Instructions

Search players by name. Returns every World Cup squad row matching the query, with team, position, DOB, club, and tournament-year goals. Use this when the user mentions a player by name. For a player's full multi-tournament career path use get_player_career.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesName fragment, e.g. "Maradona", "Mbappe", "Klose"
limitNo

Implementation Reference

  • Handler function for the 'search_players' tool. It takes a query string 'q' (min 2 chars) and optional 'limit' (1-50, default 20), constructs query params, and calls the API endpoint /players?q=...&limit=...
    {
      name: 'search_players',
      description:
        'Search players by name. Returns every World Cup squad row matching the query, ' +
        'with team, position, DOB, club, and tournament-year goals. Use this when the user ' +
        'mentions a player by name. For a player\'s full multi-tournament career path use ' +
        'get_player_career.',
      schema: z.object({
        q: z.string().min(2).describe('Name fragment, e.g. "Maradona", "Mbappe", "Klose"'),
        limit: z.number().int().min(1).max(50).optional()
          .describe('Max results (default 20)'),
      }).strict(),
      handler: async (args: { q: string; limit?: number }) => {
        const params = new URLSearchParams({ q: args.q });
        if (args.limit) params.set('limit', String(args.limit));
        return api(`/players?${params.toString()}`);
      },
    },
  • Zod schema for search_players input validation: requires 'q' (string, min 2 chars) and optional 'limit' (integer, 1-50)
    schema: z.object({
      q: z.string().min(2).describe('Name fragment, e.g. "Maradona", "Mbappe", "Klose"'),
      limit: z.number().int().min(1).max(50).optional()
        .describe('Max results (default 20)'),
    }).strict(),
  • src/index.ts:150-167 (registration)
    Tool registration: the tool entry is defined inline in the 'tools' array with name 'search_players', its description, schema, and handler all colocated
    {
      name: 'search_players',
      description:
        'Search players by name. Returns every World Cup squad row matching the query, ' +
        'with team, position, DOB, club, and tournament-year goals. Use this when the user ' +
        'mentions a player by name. For a player\'s full multi-tournament career path use ' +
        'get_player_career.',
      schema: z.object({
        q: z.string().min(2).describe('Name fragment, e.g. "Maradona", "Mbappe", "Klose"'),
        limit: z.number().int().min(1).max(50).optional()
          .describe('Max results (default 20)'),
      }).strict(),
      handler: async (args: { q: string; limit?: number }) => {
        const params = new URLSearchParams({ q: args.q });
        if (args.limit) params.set('limit', String(args.limit));
        return api(`/players?${params.toString()}`);
      },
    },
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns 'every World Cup squad row matching the query' with specific fields. While it does not cover edge cases like empty results or query behavior, it provides reasonable transparency for a search tool.

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?

Two sentences pack the purpose, return format, and usage guidance. No unnecessary words or redundancy. Highly efficient.

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

Completeness4/5

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

For a simple search tool with two parameters and no output schema, the description covers the core functionality and usage context. The missing explanation of the 'limit' parameter is a minor gap, but overall it provides sufficient context for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% because the 'limit' parameter has no description in schema. The tool description does not explain the 'limit' parameter or its purpose. While the 'q' parameter is already described in schema, the description adds no new parameter insights.

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

Purpose5/5

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

The description clearly states the verb 'Search' and the resource 'players', and specifies the return format including fields like team, position, DOB, club, and goals. It also distinguishes from sibling tool get_player_career by stating the scope (World Cup squad rows vs. multi-tournament career).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells when to use: 'when the user mentions a player by name.' Provides a clear alternative: 'For a player's full multi-tournament career path use get_player_career.' This helps an agent decide between tools.

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

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/zafronix/wc-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server