Skip to main content
Glama
zafronix

World Cup History MCP

get_team_roster

Get the complete squad list for any World Cup team and year, including each player's jersey number, position, date of birth, club, goals, and captain status.

Instructions

Full squad for one team in one tournament — every player with jersey, position, DOB, club, goals, captain flag. Use this for "who was on Spain's 2010 squad?" or "show me Italy's 2006 roster".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTeam name, e.g. "Brazil"
yearYesTournament year

Implementation Reference

  • The handler for get_team_roster calls the API endpoint /teams/{name}/roster?year={year} with the team name and tournament year as parameters.
    handler: async (args: { name: string; year: number }) =>
      api(`/teams/${encodeURIComponent(args.name)}/roster?year=${args.year}`),
  • The zod schema for get_team_roster defines two required parameters: name (string, min 2 chars) and year (integer, 1930-2030).
    schema: z.object({
      name: z.string().min(2).describe('Team name, e.g. "Brazil"'),
      year: z.number().int().min(1930).max(2030).describe('Tournament year'),
    }).strict(),
  • src/index.ts:212-224 (registration)
    The tool 'get_team_roster' is registered in the 'tools' array with its name, description, schema, and handler. The registration is consumed by the ListToolsRequestSchema and CallToolRequestSchema handlers in the MCP server wiring.
    {
      name: 'get_team_roster',
      description:
        'Full squad for one team in one tournament — every player with jersey, position, ' +
        'DOB, club, goals, captain flag. Use this for "who was on Spain\'s 2010 squad?" or ' +
        '"show me Italy\'s 2006 roster".',
      schema: z.object({
        name: z.string().min(2).describe('Team name, e.g. "Brazil"'),
        year: z.number().int().min(1930).max(2030).describe('Tournament year'),
      }).strict(),
      handler: async (args: { name: string; year: number }) =>
        api(`/teams/${encodeURIComponent(args.name)}/roster?year=${args.year}`),
    },
  • The 'api' helper function handles HTTP requests to the Zafronix WC API, adding auth headers and parsing JSON responses. It is used by the get_team_roster handler to make the actual API call.
    async function api<T = unknown>(path: string): Promise<T> {
      if (!API_KEY) {
        throw new Error(
          'WC_API_KEY is not set in the environment. Get a free key at ' +
          'https://api.zafronix.com/signup and add it to your MCP client ' +
          'config: { "env": { "WC_API_KEY": "zwc_pk_..." } }',
        );
      }
      const url = path.startsWith('http') ? path : `${API_BASE}${path}`;
      const res = await fetch(url, {
        headers: {
          'X-API-Key':  API_KEY,
          'Accept':     'application/json',
          'User-Agent': 'wc-mcp/0.1.2',
        },
      });
      if (!res.ok) {
        const body = await res.text().catch(() => '');
        throw new Error(`API ${res.status} ${res.statusText} on ${path}: ${body.slice(0, 240)}`);
      }
      return res.json() as Promise<T>;
    }
Behavior3/5

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

No annotations are provided, so the description fully carries the burden. It reveals the output fields and implies it is a read-only query (no mutation language). However, it does not explicitly state idempotency, auth requirements, or that it returns all players. The description adds moderate value beyond the schema.

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 extremely concise: two sentences that front-load the core purpose and data fields, followed by usage examples. Every phrase earns its place with no redundancy or filler.

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

Completeness5/5

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

Given 2 required parameters, no nested objects, and no output schema, the description fully covers the tool's functionality: inputs (team name, year), output (detailed roster), and example queries. No missing information for this simple query tool.

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?

The input schema already covers 100% of parameters with clear descriptions ('Team name' and 'Tournament year'). The description's examples ('Spain's 2010 squad') reinforce the schema but do not add new semantic meaning beyond what the schema provides, so baseline 3 is appropriate.

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 uses a specific verb ('get') and resource ('full squad for one team in one tournament'), specifies the exact data fields (jersey, position, DOB, club, goals, captain flag), and gives concrete query examples ('who was on Spain's 2010 squad?'). This clearly distinguishes it from siblings like get_team or search_players.

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

Usage Guidelines4/5

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

The description explicitly states the use case with two example queries, providing clear context for when to invoke this tool. It does not explicitly mention when not to use it or suggest alternatives, but the examples are sufficient for an AI agent to match user intent.

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