# Get User Leaderboards (`get_user_leaderboards`)

Part of the [Outfield MCP Server](https://run.outfieldapp.com/docs/mcp) docs. All tools: [llms.txt](https://run.outfieldapp.com/docs/mcp/llms.txt). Server URL: https://run.outfieldapp.com/mcp

Ranks active teams by total performance points over a date range (default: the current week).

Rank active user teams by total performance points for a date range. Omit start_date and end_date to rank the current week; pass both dates (for example the first and last day of this month) for another inclusive range. Pass league_id from get_performance_roles_and_leaderboards to rank a single league; omit it so users default to their own league and admins default to all enterprise leagues unless they have only_my_performance_role, in which case they also default to their own league. Returns up to 25 teams per call, ordered by total points. meta.my_team always includes the requester's team id, rank, and value even when that team is not on the current page. When meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page. This tool does not support other leaderboard metrics such as check-in counts, point categories, goals, shadows, or all-time records.

- Scopes: `ai:read`
- Requires: AI, not available to Viewer users
- Example prompts: "How am I doing on the leaderboard this month?"

### Parameters

- `league_id` (integer; optional): League id from get_performance_roles_and_leaderboards. When set, only teams in that league are ranked. Omit so users default to their own league and admins default to all leagues they can access.
- `start_date` (string; optional; ISO 8601 date or datetime): Start of an inclusive points date range. Must be provided with end_date. Omit both dates to rank the current week.
- `end_date` (string; optional; ISO 8601 date or datetime): End of an inclusive points date range. Must be provided with start_date. Omit both dates to rank the current week.
- `limit` (integer; optional): Max teams returned per page. Default 25, max 25
- `cursor` (string; optional): Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page when meta.has_more is true.

### Notes

- meta.my_team always contains the requester's team id, rank and value, even when it is not on the current page.
- Supports total performance points only, not other metrics such as check-in counts, point categories, goals or all-time records.

### Example request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_user_leaderboards",
    "arguments": {
      "start_date": "2026-09-01",
      "end_date": "2026-09-30",
      "league_id": 10
    }
  }
}
```

### Example response (`structuredContent`, illustrative data)

```json
{
  "teams": [
    {
      "id": 3,
      "name": "Jordan Rivera",
      "title": "Field Representative",
      "rank": 2,
      "value": 1280.0,
      "is_my_team": true,
      "league_id": 10,
      "league_name": "Gold League",
      "users": [
        {
          "id": 7311,
          "name": "Jordan Rivera",
          "role": "user"
        }
      ]
    }
  ],
  "meta": {
    "limit": 25,
    "has_more": false,
    "next_cursor": null,
    "team_count": 1,
    "start_date": "2026-09-01",
    "end_date": "2026-09-30",
    "league_id": 10,
    "my_team": {
      "id": 3,
      "rank": 2,
      "value": 149.5
    }
  }
}
```

### Response fields

- `teams` (object[])
  - `id` (integer)
  - `name` (string | null)
  - `title` (string | null)
  - `rank` (integer)
  - `value` (number)
  - `is_my_team` (boolean)
  - `league_id` (integer)
  - `league_name` (string | null)
  - `users` (object[])
    - `id` (integer)
    - `name` (string | null)
    - `role` (string)
- `meta` (object)
  - `limit` (integer)
  - `has_more` (boolean)
  - `next_cursor` (string | null): Opaque cursor for the next page; null when has_more is false
  - `team_count` (integer)
  - `start_date` (string): ISO8601 start of filter range
  - `end_date` (string): ISO8601 end of filter range
  - `league_id` (integer | null): Selected league id; null when ranking across all allowed leagues
  - `my_team` (object | null)
    - `id` (integer)
    - `rank` (integer)
    - `value` (number)

Related tools: [get_performance_roles_and_leaderboards](https://run.outfieldapp.com/docs/mcp/tools/get_performance_roles_and_leaderboards.md), [get_user_calendar_quarter_rankings](https://run.outfieldapp.com/docs/mcp/tools/get_user_calendar_quarter_rankings.md)
