> ## Documentation Index
> Fetch the complete documentation index at: https://docs.etonecarg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Rankings

> Return ranking, leaderboard, or statistical-leader rows for a competition, season, or series scope.

Canonical tool name: `get_rankings`

Family: [Deep Sports Truth Tools](/sports-mcp-server/tools/deep-sports-truth-tools)

## What this tool is best at

Return the richest non-empty leaderboard rows for a competition or series scope, plus selection metadata.

## Choose this tool when

* the host needs leaderboards, driver standings, golf leaderboards, or category rankings rather than a single standings table.
* Source ownership: GSD Lookup

## Use something smaller or different when

* Do not use it to replace standings, one-event stats, or phase/session results.

## Inputs you need

### Plain-English prerequisites

* This tool does not require a prerequisite ID beyond the scoped inputs shown below.

### Required inputs in the public contract

* None.

### Optional inputs in the public contract

| Input                 | What it means                                                                                                                                          |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `classificationId`    | Provider ref for one rankings or classification view when the host already knows the exact leaderboard object it needs.                                |
| `overallId`           | Provider ref for one leaderboard or overall table view when the host already knows the exact result object it needs.                                   |
| `competitionId`       | Provider ref for one competition scope. Match the namespace to the tool family: GSD refs for sports-truth tools, On refs for watchability-first tools. |
| `competitionSeasonId` | Provider ref for one competition season. Use it when the host needs a season-specific table, ranking, structure, or roster context.                    |
| `seriesId`            | Provider ref for one cross-competition series or tour scope such as Formula 1, ATP, PGA Tour, or LPGA Tour.                                            |
| `seriesSeasonId`      | Provider ref for one series season. Use it when the host needs one tour season instead of the broader series.                                          |
| `limit`               | Maximum number of rows to return. Keep it small for low-token UX and larger only when the UI truly needs a browse list.                                |
| `language`            | Optional BCP 47 language hint such as `en-US`. Use it when the host needs translated provider output.                                                  |

## Sequencing guidance

| Needed ID or scope | Call this first                                       | Then use                                                                                                      |
| ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| scope              | [Tool Catalog](/sports-mcp-server/tools/tool-catalog) | Start from the smallest tool that can safely anchor the workflow, then deepen only if the user asks for more. |

## Response highlights

* Raw `rankings` payload from the selected scope or ranking ref.
* Normalized `rows`, `rowCount`, additive `selectedRef`, `selectedRefId`, `selectedRefType`, and `rowsSourcePath` fields.
* Deterministic selection of the richest non-empty leaderboard collection instead of trusting the first ref.

## Response shape

| Field                                                          | What it means                                                      |
| -------------------------------------------------------------- | ------------------------------------------------------------------ |
| `data.rankings`                                                | Raw ranking payload selected for the answer.                       |
| `data.rows[]`                                                  | Normalized leaderboard rows.                                       |
| `data.rowCount`                                                | Number of normalized leaderboard rows available before truncation. |
| `data.selectedRefId / data.selectedRefType / data.selectedRef` | Deterministic ranking-selection metadata for deepening and QA.     |
| `data.rowsSourcePath`                                          | Source-path hint describing where the selected rows came from.     |

## Reuse next

* Reuse provider refs returned by this tool to avoid resolving the same entity again.
* Read `meta.agentHints.recommendedNextTools` and `meta.agentHints.disambiguationOptions` as non-binding host hints.

## Example requests

<CodeGroup>
  ```json JSON-RPC theme={null}
  {
    "jsonrpc": "2.0",
    "id": "tool-call-1",
    "method": "tools/call",
    "params": {
      "name": "get_rankings",
      "arguments": {
        "competitionId": "LEAGUE_ID",
        "limit": 10
      }
    }
  }
  ```

  ```bash curl theme={null}
  curl "https://sports-mcp-server.etonecarg.com/" \
    -X POST \
    -H "Authorization: Bearer $SPORTS_MCP_API_KEY" \
    -H "Accept: application/json, text/event-stream" \
    -H "Content-Type: application/json" \
    -H "mcp-protocol-version: 2025-03-26" \
    -d '{
    "jsonrpc": "2.0",
    "id": "tool-call-1",
    "method": "tools/call",
    "params": {
      "name": "get_rankings",
      "arguments": {
        "competitionId": "LEAGUE_ID",
        "limit": 10
      }
    }
  }'
  ```

  ```ts TypeScript theme={null}
  const payload = {
      "jsonrpc": "2.0",
      "id": "tool-call-1",
      "method": "tools/call",
      "params": {
        "name": "get_rankings",
        "arguments": {
          "competitionId": "LEAGUE_ID",
          "limit": 10
        }
      }
    };

  const response = await fetch("https://sports-mcp-server.etonecarg.com/", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.SPORTS_MCP_API_KEY!}`,
      Accept: "application/json, text/event-stream",
      "Content-Type": "application/json",
      "mcp-protocol-version": "2025-03-26",
    },
    body: JSON.stringify(payload),
  });

  const data = await response.json();
  console.log(JSON.stringify(data, null, 2));
  ```

  ```python Python theme={null}
  import json
  import os

  import requests

  payload = {
    "jsonrpc": "2.0",
    "id": "tool-call-1",
    "method": "tools/call",
    "params": {
      "name": "get_rankings",
      "arguments": {
        "competitionId": "LEAGUE_ID",
        "limit": 10
      }
    }
  }

  response = requests.post(
      "https://sports-mcp-server.etonecarg.com/",
      headers={
          "Authorization": f"Bearer {os.environ['SPORTS_MCP_API_KEY']}",
          "Accept": "application/json, text/event-stream",
          "Content-Type": "application/json",
          "mcp-protocol-version": "2025-03-26",
      },
      json=payload,
      timeout=30,
  )

  response.raise_for_status()
  print(json.dumps(response.json(), indent=2))
  ```
</CodeGroup>

## Related tools

### Previous-step tools

* [`get_competition_hub`](/sports-mcp-server/tool-reference/get_competition_hub)
* [`get_series_hub`](/sports-mcp-server/tool-reference/get_series_hub)
* [`get_standings`](/sports-mcp-server/tool-reference/get_standings)

### Next-step tools

* [`get_participant_profile`](/sports-mcp-server/tool-reference/get_participant_profile)

### Alternative tools

* No common alternatives.

## Prompt patterns this tool fits

* Use `get_rankings` when the host already knows the right scope and needs this job directly.

## Common mistakes

* Calling `get_rankings` before the host has the right provider refs or bounded window.
* Using `get_rankings` when a smaller sibling tool would answer the question more directly.
