Skip to main content
Glama
zafronix

World Cup History MCP

get_team

Retrieve a national team's complete World Cup history, including tournament appearances, final positions, total titles, and knockout records for cross-tournament analysis.

Instructions

Cross-tournament summary for a national team: every appearance, final position by year, total titles, knockout records. Use this for "Brazil's World Cup history" or "how many times has Argentina reached the final?". For a specific year's squad use get_team_roster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCountry name, e.g. "Brazil", "West Germany", "England"

Implementation Reference

  • The handler for get_team — calls the API endpoint /teams/{name} with the country name URL-encoded.
      handler: async (args: { name: string }) =>
        api(`/teams/${encodeURIComponent(args.name)}`),
    },
  • Zod schema for get_team — requires a 'name' string (min 2 chars) with no extra properties.
    schema: z.object({
      name: z.string().min(2).describe('Country name, e.g. "Brazil", "West Germany", "England"'),
    }).strict(),
  • src/index.ts:199-211 (registration)
    The 'get_team' tool is registered as part of the 'tools' array (line 113) with name, description, schema, and handler.
    {
      name: 'get_team',
      description:
        'Cross-tournament summary for a national team: every appearance, final position by ' +
        'year, total titles, knockout records. Use this for "Brazil\'s World Cup history" ' +
        'or "how many times has Argentina reached the final?". For a specific year\'s squad ' +
        'use get_team_roster.',
      schema: z.object({
        name: z.string().min(2).describe('Country name, e.g. "Brazil", "West Germany", "England"'),
      }).strict(),
      handler: async (args: { name: string }) =>
        api(`/teams/${encodeURIComponent(args.name)}`),
    },
  • The 'api' helper function that the get_team handler calls — sends an authenticated fetch to the Zafronix WC API and returns the JSON response.
    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>;
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden. It transparently explains the tool's behavior as generating a summary across tournaments. While it doesn't mention read-only nature or potential rate limits, the simple query nature makes this acceptable. Slightly more detail on the output could improve score.

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 state the purpose and usage guidance without any filler. Every sentence adds value, and the most critical information is front-loaded.

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?

Given the tool's simplicity (single parameter, no output schema, clear sibling), the description is complete enough for an agent. It covers what the tool does, provides examples, and notes an alternative. It might be slightly ambiguous whether it covers all tournaments or just World Cup, but the phrase 'cross-tournament' clarifies it.

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

Parameters4/5

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

The input schema covers the parameter 'name' with 100% description coverage, providing examples like 'Brazil'. The description adds semantic value by providing concrete query examples (e.g., 'Brazil's World Cup history'), which helps an agent understand how to construct input.

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 tool provides a cross-tournament summary for a national team, listing appearances, final positions, titles, and knockout records. It distinguishes itself from the sibling tool get_team_roster by noting that for a specific year's squad, that sibling should be used instead.

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?

The description explicitly provides usage examples like 'Brazil's World Cup history' and 'how many times has Argentina reached the final?', and directs users to use get_team_roster for a specific year's squad, offering clear when-to-use and when-not-to-use guidance.

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