Skip to main content
Glama
zafronix

World Cup History MCP

list_teams

Find all national teams that have competed in any FIFA World Cup, filtered by confederation. View first and last appearance year and total appearances for each team.

Instructions

List every national team that has ever played a World Cup, with confederation, first/last appearance year, and total appearances. Useful for "which African nations have made the World Cup?" or "list every CONMEBOL team". Pair with get_team for a specific country.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confederationNo

Implementation Reference

  • Handler function for the list_teams tool. Builds a /teams API path with optional confederation query param and calls the API helper.
    handler: async (args: { confederation?: string }) => {
      const params = new URLSearchParams();
      if (args.confederation) params.set('confederation', args.confederation);
      const path = `/teams${params.toString() ? `?${params.toString()}` : ''}`;
      return api(path);
    },
  • Zod schema for list_teams input validation. Accepts an optional confederation parameter restricted to the six FIFA confederation codes.
    schema: z.object({
      confederation: z.enum(['UEFA', 'CONMEBOL', 'CONCACAF', 'AFC', 'CAF', 'OFC']).optional()
        .describe('Filter by confederation (optional)'),
    }).strict(),
  • src/index.ts:181-198 (registration)
    Tool registration within the tools array, including name, description, schema, and handler for the list_teams tool.
    {
      name: 'list_teams',
      description:
        'List every national team that has ever played a World Cup, with confederation, ' +
        'first/last appearance year, and total appearances. Useful for "which African nations ' +
        'have made the World Cup?" or "list every CONMEBOL team". Pair with get_team for a ' +
        'specific country.',
      schema: z.object({
        confederation: z.enum(['UEFA', 'CONMEBOL', 'CONCACAF', 'AFC', 'CAF', 'OFC']).optional()
          .describe('Filter by confederation (optional)'),
      }).strict(),
      handler: async (args: { confederation?: string }) => {
        const params = new URLSearchParams();
        if (args.confederation) params.set('confederation', args.confederation);
        const path = `/teams${params.toString() ? `?${params.toString()}` : ''}`;
        return api(path);
      },
    },
  • The api() fetch helper called by the list_teams handler to make authenticated HTTP requests to the backend API.
    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?

No annotations are provided, so the description carries full burden. It describes that the tool lists all teams and mentions output fields, though it does not specify pagination or limits. For a simple list, this is sufficient.

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 concise sentences that are front-loaded with the main purpose. No redundant information.

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?

The tool has one optional parameter and no output schema. The description covers purpose, output fields, and usage examples. It is complete for the tool's simplicity.

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 coverage is 0%, and the description does not explicitly define the confederation parameter, but the enum values are self-explanatory and examples imply its usage. It adds marginal value beyond the schema.

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 it lists every national team that has ever played a World Cup, specifying the fields (confederation, first/last appearance year, total appearances). It distinguishes itself from sibling get_team, which is for a specific country.

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 provides concrete examples like 'which African nations have made the World Cup?' and suggests pairing with get_team. It lacks explicit when-not-to-use guidance but is clear on context.

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