{
  "service": "Elixir MCP",
  "url": "https://elixir.poapkings.com",
  "mcp_endpoint": "https://elixir.poapkings.com/mcp",
  "generated_from": "the live MCP tool registry at build time",
  "contract_version": "3.12.0",
  "tool_count": 55,
  "oauth_scopes": [
    {
      "scope": "cr:read",
      "title": "Read recorded game data",
      "description": "Profiles, battles, clans, war, collections, and the live-fetch allowance.",
      "standard": true
    },
    {
      "scope": "recordings:write",
      "title": "Change what you track",
      "description": "Track or stop tracking players and clans on your account.",
      "standard": true
    },
    {
      "scope": "collections:write",
      "title": "Edit collections",
      "description": "Change membership in collections you own.",
      "standard": true
    },
    {
      "scope": "account:write",
      "title": "Update account preferences",
      "description": "Change private nicknames and end-user identity mappings.",
      "standard": true
    },
    {
      "scope": "feedback:write",
      "title": "Send feedback",
      "description": "File attributed feedback with the maintainer.",
      "standard": true
    },
    {
      "scope": "account:email",
      "title": "Know your email address",
      "description": "Read the email on your Elixir account, so this app can sign you in as the same person. Offered only to an app that asks for it.",
      "standard": false
    }
  ],
  "groups": [
    {
      "group": "Account",
      "slug": "account",
      "tools": [
        {
          "name": "elixir_my_players",
          "group": "Account",
          "title": "My players",
          "description": "The players you track and WHO EACH ONE IS TO YOU: relationship (primary | alt | friend | watching), your private nickname if any, notify setting, recording status and current clan. That is what resolves \"my alt\" or \"how are my friends doing\" without asking. You do NOT need this to answer questions about yourself: omit player_tag and the tools already mean your primary.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_nickname",
          "group": "Account",
          "title": "Nicknames",
          "description": "Give a player YOUR nickname, private to your account and visible only to you and your agents ('to me Raquaza is Tyler'). Nicknames ride along wherever names appear (search matches them, summaries and rosters show them). Pass nickname: null to clear.",
          "readOnly": false,
          "openWorld": false,
          "scope": "account:write",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "The tag to nickname, like #9L0V2QPC.",
              "enum": null,
              "default": null
            },
            {
              "name": "nickname",
              "type": "string | null",
              "required": true,
              "description": "Your name for them; null clears it.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_my_identities",
          "group": "Account",
          "title": "People you know",
          "description": "The humans you have learned, and which player each one is. Yours alone; one connection's mappings are invisible to every other. Useful for 'who am I to you?' and for spotting a mapping you got wrong.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_track_clan",
          "group": "Account",
          "title": "Track a clan",
          "description": "Track a clan on your account: starts recording in one act (tracked means recorded), within your tier's clan slots. scope activity records roster and war; comprehensive additionally records every member's battles and profile, following membership. action remove takes it off your account (recording stops when no account has it); notify_on / notify_off control whether it feeds your elixir_timeline.",
          "readOnly": false,
          "openWorld": false,
          "scope": "recordings:write",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": true,
              "description": "The clan tag, like #J2RGCRVG.",
              "enum": null,
              "default": null
            },
            {
              "name": "action",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "add",
                "remove",
                "notify_on",
                "notify_off"
              ],
              "default": "add"
            },
            {
              "name": "scope",
              "type": "string",
              "required": false,
              "description": "With add: activity records the clan itself; comprehensive additionally records every member. Tracking again with a different scope updates yours.",
              "enum": [
                "activity",
                "comprehensive"
              ],
              "default": "comprehensive"
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_track_player",
          "group": "Account",
          "title": "Track a player",
          "description": "Track a player on your account: claims the tag AND starts recording in one act (tracked means recorded), within your tier's player slots. Say who they are to you with relationship (primary = you, alt = also you, friend, watching); your first player becomes your primary. action remove releases the claim (recording stops if you were its only reason); notify_on / notify_off control whether the player feeds your elixir_timeline.",
          "readOnly": false,
          "openWorld": false,
          "scope": "recordings:write",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "The tag, like #20JJJ2CCRU.",
              "enum": null,
              "default": null
            },
            {
              "name": "action",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "add",
                "remove",
                "notify_on",
                "notify_off"
              ],
              "default": "add"
            },
            {
              "name": "relationship",
              "type": "string",
              "required": false,
              "description": "Who this player is TO YOU: primary is you (exactly one; setting it on another tag moves it), alt is also you, friend is someone you follow, watching is everyone else (default). All four share your tier's player slots.",
              "enum": [
                "primary",
                "alt",
                "friend",
                "watching"
              ],
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_identify",
          "group": "Account",
          "title": "Who is asking",
          "description": "Remember which player a human is, so you never have to ask twice. An agent serves many people through one connection and MCP carries no per-request identity, so YOU supply one: discord:1234, signal:..., telegram:..., whatever your surface has. Pass that same id as on_behalf_of afterwards and 'how am I doing' resolves with no lookup. The mapping is yours alone and confers nothing (recorded reads are open to every account); it only picks a default subject. Call it once, right after they tell you who they are.",
          "readOnly": false,
          "openWorld": false,
          "scope": "account:write",
          "args": [
            {
              "name": "external_id",
              "type": "string",
              "required": true,
              "description": "The id this human has on your surface; namespace it however you like, it is opaque here.",
              "enum": null,
              "default": null
            },
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "The player they say they are.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Players",
      "slug": "players",
      "tools": [
        {
          "name": "badges_holders",
          "group": "Players",
          "title": "Badge holders",
          "description": "Who holds a badge: every recorded player in scope (the corpus by default, or a segment) with the named badge, with level and progress where tiered, names not just tags, and their current clan. Names must match the API's badge identifier exactly (badges_rarity lists them); a near-miss is refused with candidates rather than guessed.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "badge",
              "type": "string",
              "required": true,
              "description": "Badge name as the API spells it, e.g. MasteryWitch, BeatingDeathBadge.",
              "enum": null,
              "default": null
            },
            {
              "name": "segment",
              "type": "object",
              "required": false,
              "description": "Scope: exactly one of player_tag, clan_tag (current members) or collection (a player collection's slug, e.g. 'pros'). OMIT the whole object for the entire recorded corpus.",
              "enum": null,
              "default": null
            },
            {
              "name": "min_level",
              "type": "integer",
              "required": false,
              "description": "Tiered badges: only holders at this level or above.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 50
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "badges_rarity",
          "group": "Players",
          "title": "Badge rarity census",
          "description": "Every badge observed across recorded profiles with its holder count, rarest first: the 'what is the rarest badge' question over the whole recorded population (default) or a segment (clan, collection, one player), with players_considered so the strength of the claim is in the payload. One-off badges are told apart from tiered ones, and tiered badges break down by level.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "segment",
              "type": "object",
              "required": false,
              "description": "Scope: exactly one of player_tag, clan_tag (current members) or collection (a player collection's slug, e.g. 'pros'). OMIT the whole object for the entire recorded corpus.",
              "enum": null,
              "default": null
            },
            {
              "name": "kind",
              "type": "string",
              "required": false,
              "description": "Only this class of badge.",
              "enum": [
                "one_off",
                "tiered"
              ],
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 200
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "players_collection",
          "group": "Players",
          "title": "Card collection",
          "description": "Full card collection as last recorded: levels (in-game 1-16 scale), counts, forms, star levels, collection level. evolutionLevel / maxEvolutionLevel are FORM bit fields (1 = Evolution, 2 = Hero, 3 = both), decoded into forms_unlocked / forms_available. verbosity compact keeps id, name, level and forms per card.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: each card as id, name, level, forms_unlocked only; support_cards likewise.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "players_search",
          "group": "Players",
          "title": "Find player by name",
          "description": "Name-to-tag resolution across the whole recorded corpus: case-insensitive substring on last-observed display names AND your private nicknames, nicknames ranked first (\"tyler\" finds the player you call Tyler). Unknown names return an honest empty list, never a guess. The inverse (tags to names, in bulk) is players_names.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "query",
              "type": "string",
              "required": true,
              "description": "Part of a name or nickname.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 5
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "players_profile",
          "group": "Players",
          "title": "Player profile",
          "description": "Latest recorded profile snapshot for a tag: trophies, Path of Legends, league stats, donations, lifetime counters, collection level, clan (with badge and the player's role), attributes (arena, best trophies, favourite card, account age) and current badge state, as of the last profile poll. live: true asks for a fresh read of ANY tag, recorded or not: served if in hand, otherwise queued while the record answers with live_status pending (live_pending if nothing is recorded yet). For tag-to-name only, players_names resolves up to 100 tags without the live lane.",
          "readOnly": true,
          "openWorld": true,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "live",
              "type": "boolean",
              "required": false,
              "description": "Ask for a read no older than a minute; works for a player nobody records. Served if in hand, otherwise queued while the record answers with live_status pending (live_pending if nothing is recorded yet).",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "player_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "applied": {
                "type": "object"
              },
              "clan": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "last_seen_in_game": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The game's own lastSeen."
              },
              "attributes": {
                "type": "object",
                "properties": {
                  "arena_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "best_trophies": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "favorite_card_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "years_played": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "account_age_days": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                }
              },
              "badges": {
                "type": "array"
              },
              "snapshot": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "trophies": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "path_of_legend": {
                    "type": "object",
                    "properties": {
                      "current": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "leagueNumber": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "trophies": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      },
                      "best": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "leagueNumber": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "trophies": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "required": [
                      "current",
                      "best"
                    ]
                  },
                  "league_statistics": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "currentSeason": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "trophies": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "bestTrophies": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      },
                      "previousSeason": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "trophies": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "bestTrophies": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      },
                      "bestSeason": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "trophies": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  },
                  "donations_this_week": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "donations_received_this_week": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "lifetime": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "battleCount": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "wins": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "losses": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "threeCrownWins": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "starPoints": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "expPoints": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "collectionLevel": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  }
                },
                "required": [
                  "date"
                ]
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "player_tag",
              "attributes",
              "snapshot",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "name",
              "type": "string | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "clan",
              "type": "object | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "last_seen_in_game",
              "type": "string | null",
              "required": false,
              "description": "The game's own lastSeen.",
              "enum": null
            },
            {
              "name": "attributes",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "badges",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "snapshot",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "players_summary",
          "group": "Players",
          "title": "Player summary",
          "description": "The headline in one call: current trophies and clan, last-30-days record and win rate, and the most-played deck with its record. Start here for “how am I doing?”; drill in with battles_performance / battles_decks.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "player_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "nickname": {
                "type": "string"
              },
              "clan": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "clan_tag": {
                    "type": "string",
                    "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "trophies": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "trophies_as_of": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "YYYY-MM-DD of the snapshot."
              },
              "applied": {
                "type": "object",
                "properties": {
                  "window": {
                    "type": "object",
                    "description": "The window that applied and where it came from.",
                    "properties": {
                      "from": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "argument",
                          "default",
                          "unbounded",
                          "fixed",
                          "season"
                        ]
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "days": {
                        "type": "integer"
                      },
                      "season": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "month": {
                            "type": "string"
                          },
                          "war": {
                            "type": "integer"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        }
                      },
                      "crosses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "season"
                              ]
                            },
                            "at": {
                              "type": "string"
                            },
                            "from_season": {
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "to_season": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "at",
                            "to_season"
                          ]
                        }
                      },
                      "season_age_days": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "source"
                    ]
                  }
                }
              },
              "last_30_days": {
                "type": "object",
                "properties": {
                  "battles": {
                    "type": "integer"
                  },
                  "wins": {
                    "type": "integer"
                  },
                  "losses": {
                    "type": "integer"
                  },
                  "draws": {
                    "type": "integer"
                  },
                  "win_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  },
                  "net_trophies": {
                    "type": "integer"
                  },
                  "first_recorded": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "battles",
                  "wins",
                  "losses",
                  "win_rate"
                ]
              },
              "top_deck": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "deck_hash": {
                    "type": "string"
                  },
                  "cards": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        },
                        "evolution": {
                          "type": "integer",
                          "description": "1 = Evolution, 2 = Hero form."
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ]
                    }
                  },
                  "battles": {
                    "type": "integer"
                  },
                  "win_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  }
                }
              },
              "best_deck": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "player_tag",
              "last_30_days",
              "top_deck",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "name",
              "type": "string | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "nickname",
              "type": "string",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "clan",
              "type": "object | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "trophies",
              "type": "integer | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "trophies_as_of",
              "type": "string | null",
              "required": false,
              "description": "YYYY-MM-DD of the snapshot.",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "last_30_days",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "top_deck",
              "type": "object | null",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "best_deck",
              "type": "object | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "players_timeline",
          "group": "Players",
          "title": "Player timeline",
          "description": "Time series from daily snapshots, one point per game day: trophies by default, or any of the day row's metrics (donations and donations_received, the weekly counters; the lifetime block: battle_count, wins, losses, three_crown_wins, star_points, collection_level, king_tower_level, total_donations, the challenge and tournament counters; the Path of Legends standing; the seasonal trophies; arena_id, clan_tag, clan_rank, game_last_seen_at from the roster). Every point carries observed_at, profile_observed_at (null on a roster-only day) and roster_observed_at. progress_key adds the side-mode progress series; kind selects the pre_reset or season_roll row. Granularity week returns the last row of each ISO week.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "metrics",
              "type": "array",
              "required": false,
              "description": "Which series to return.",
              "enum": null,
              "default": [
                "trophies"
              ]
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "YYYY-MM-DD, inclusive. Built from daily snapshots, so only whole days are meaningful; an instant is not accepted.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "YYYY-MM-DD, inclusive. Built from daily snapshots, so only whole days are meaningful; an instant is not accepted.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days of the series, today included: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks of the series, today included: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "granularity",
              "type": "string",
              "required": false,
              "description": "week returns the last row of each ISO week.",
              "enum": [
                "day",
                "week"
              ],
              "default": "day"
            },
            {
              "name": "kind",
              "type": "string",
              "required": false,
              "description": "Which row of the day: daily (the day's last observation), pre_reset (the hour before the Monday 00:10 UTC donation reset: the honest weekly donation total) or season_roll (the hour before the season rolls).",
              "enum": [
                "daily",
                "pre_reset",
                "season_roll"
              ],
              "default": "daily"
            },
            {
              "name": "progress_key",
              "type": "string",
              "required": false,
              "description": "A Player.progress key as the API spells it (2v2League_202609, seasonal-trophy-road-202609, AutoChess_2026_Season_11, or '' for the Merge Tactics pre-season arena) or 'all': adds progress[] with that bucket's trophies, best_trophies and arena_id per day. A bucket at zero writes no row.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "player_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "applied": {
                "type": "object",
                "properties": {
                  "window": {
                    "type": "object",
                    "description": "The window that applied and where it came from.",
                    "properties": {
                      "from": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "argument",
                          "default",
                          "unbounded",
                          "fixed",
                          "season"
                        ]
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "days": {
                        "type": "integer"
                      },
                      "season": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "month": {
                            "type": "string"
                          },
                          "war": {
                            "type": "integer"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        }
                      },
                      "crosses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "season"
                              ]
                            },
                            "at": {
                              "type": "string"
                            },
                            "from_season": {
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "to_season": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "at",
                            "to_season"
                          ]
                        }
                      },
                      "season_age_days": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "source"
                    ]
                  },
                  "kind": {
                    "type": "string"
                  }
                },
                "required": [
                  "window"
                ]
              },
              "snapshots_available_from": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "series": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "description": "YYYY-MM-DD."
                    },
                    "day": {
                      "type": "string",
                      "description": "YYYY-MM-DD."
                    },
                    "iso_week": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "daily",
                        "pre_reset",
                        "season_roll"
                      ]
                    },
                    "observed_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "profile_observed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The profile poll that wrote the lifetime block; null on a roster-only day."
                    },
                    "roster_observed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The roster poll that wrote the clan columns; null when the roster never touched the row."
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "api",
                        "elixir-bot"
                      ]
                    },
                    "clan_tag": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "source"
                  ]
                }
              },
              "progress": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string"
                    },
                    "season_month": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "day": {
                      "type": "string",
                      "description": "YYYY-MM-DD."
                    },
                    "observed_at": {
                      "type": "string",
                      "description": "ISO 8601 UTC instant."
                    },
                    "trophies": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "best_trophies": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "arena_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "key",
                    "day",
                    "observed_at"
                  ]
                }
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "player_tag",
              "applied",
              "snapshots_available_from",
              "series",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "snapshots_available_from",
              "type": "string | null",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "series",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "progress",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "elixir_coverage",
          "group": "Players",
          "title": "Record coverage",
          "description": "How complete the record is for a tag: recording start, last successful poll per endpoint, battles captured (including appearances recorded before the tag was tracked), capture estimates over observation intervals ending in the last seven days, and unmeasured_tail_hours since the latest profile snapshot. Use it to caveat answers honestly; missing coverage is unknown, not evidence of absence.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "player_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "polls": {
                "type": "array"
              },
              "battles": {
                "type": "object",
                "properties": {
                  "recorded_appearances": {
                    "type": "integer"
                  },
                  "first_recorded": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last_recorded": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "recorded_appearances"
                ]
              },
              "snapshots": {
                "type": "object",
                "properties": {
                  "first_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "observation_intervals": {
                "type": "array"
              },
              "completeness_last_7_days": {
                "type": "object",
                "description": "Measured intervals plus the explicit unmeasured tail after the latest profile snapshot.",
                "properties": {
                  "average_ratio": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "incomplete_days": {
                    "type": "null"
                  },
                  "incomplete_intervals": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "measured_intervals": {
                    "type": "integer"
                  },
                  "measured_span": {
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "measured_hours": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "unmeasured_tail_hours": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Hours since the latest profile snapshot; not included in average_ratio."
                  },
                  "unknown_intervals": {
                    "type": "integer"
                  }
                },
                "required": [
                  "average_ratio",
                  "incomplete_days",
                  "incomplete_intervals",
                  "measured_intervals",
                  "measured_span",
                  "measured_hours",
                  "unmeasured_tail_hours",
                  "unknown_intervals"
                ]
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "player_tag",
              "polls",
              "battles",
              "snapshots",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "polls",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "battles",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "snapshots",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "observation_intervals",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "completeness_last_7_days",
              "type": "object",
              "required": false,
              "description": "Measured intervals plus the explicit unmeasured tail after the latest profile snapshot.",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "players_names",
          "group": "Players",
          "title": "Resolve tags to names",
          "description": "Bulk tag-to-name resolution from the corpus: up to 100 tags in, for each the last-observed name and where it came from, plus an explicit unknown list. Costs nothing from the live lane; resolving a miss is then a deliberate players_profile({ live: true }) per tag. The inverse of players_search.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tags",
              "type": "array",
              "required": true,
              "description": "One to one hundred player tags.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Battles",
      "slug": "battles",
      "tools": [
        {
          "name": "battles_cards",
          "group": "Battles",
          "title": "Card performance",
          "description": "Per-card win/loss attribution over recorded battles. perspective \"mine\": which of your cards carry. perspective \"opponent\": which enemy cards beat you (the nemesis question). Duels are excluded (no single deck).",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "perspective",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "mine",
                "opponent"
              ],
              "default": "mine"
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "battles_compare",
          "group": "Battles",
          "title": "Compare players",
          "description": "Side-by-side of 2-4 recorded tags (any recorded player): latest snapshot topline plus a shared performance window.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tags",
              "type": "array",
              "required": true,
              "description": "Two to four player tags.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "battles_decks",
          "group": "Battles",
          "title": "Deck performance",
          "description": "Battles grouped by exact deck identity (deck_hash): per-deck record, first/last used, win rate, share of battles. Deck identity is the exact card set played (some event modes field more or fewer than 8). Unbounded by default and says so in applied.window; pass a deck_hash to battles_query or battles_performance to drill in.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            },
            {
              "name": "sort",
              "type": "string",
              "required": false,
              "description": "win_rate sorting respects min_battles.",
              "enum": [
                "battles",
                "wins",
                "win_rate"
              ],
              "default": "battles"
            },
            {
              "name": "min_battles",
              "type": "integer",
              "required": false,
              "description": "Drop decks with fewer battles than this.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 40
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "player_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "applied": {
                "type": "object",
                "properties": {
                  "window": {
                    "type": "object",
                    "description": "The window that applied and where it came from.",
                    "properties": {
                      "from": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "argument",
                          "default",
                          "unbounded",
                          "fixed",
                          "season"
                        ]
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "days": {
                        "type": "integer"
                      },
                      "season": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "month": {
                            "type": "string"
                          },
                          "war": {
                            "type": "integer"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        }
                      },
                      "crosses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "season"
                              ]
                            },
                            "at": {
                              "type": "string"
                            },
                            "from_season": {
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "to_season": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "at",
                            "to_season"
                          ]
                        }
                      },
                      "season_age_days": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "source"
                    ]
                  }
                },
                "required": [
                  "window"
                ]
              },
              "total_battles_in_window": {
                "type": "integer"
              },
              "decks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "deck_hash": {
                      "type": "string"
                    },
                    "cards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          },
                          "evolution": {
                            "type": "integer",
                            "description": "1 = Evolution, 2 = Hero form."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      }
                    },
                    "tower_troop": {
                      "type": "object"
                    },
                    "battles": {
                      "type": "integer"
                    },
                    "wins": {
                      "type": "integer"
                    },
                    "losses": {
                      "type": "integer"
                    },
                    "draws": {
                      "type": "integer"
                    },
                    "win_rate": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "0..1, three decimals; null when the denominator is zero."
                    },
                    "share_of_battles": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "0..1, three decimals; null when the denominator is zero."
                    },
                    "first_used": {
                      "type": "string",
                      "description": "ISO 8601 UTC instant."
                    },
                    "last_used": {
                      "type": "string",
                      "description": "ISO 8601 UTC instant."
                    }
                  },
                  "required": [
                    "deck_hash",
                    "cards",
                    "battles",
                    "win_rate"
                  ]
                }
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "player_tag",
              "applied",
              "decks",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "total_battles_in_window",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "decks",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "battles_levels",
          "group": "Battles",
          "title": "Level Curve & Pilot Score",
          "description": "The Level Curve and Pilot Score: win rate by deck-average level gap across the recorded corpus, binned where the data lives, never extrapolated. Pass player_tag (or on_behalf_of) for a Pilot Score: actual minus the level-expected win rate, with a monthly trend and an experience cohort. Descriptive, with sample sizes on every bin and score. verbosity compact omits the curve rows.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Score this player against the curve (Pilot Score + monthly trend). Omit for the curve alone.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Window for the curve and the score, ending now.",
              "enum": null,
              "default": 90
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: omits the curve rows; the score and methodology are unchanged.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            },
            {
              "name": "trophy_band",
              "type": "string",
              "required": false,
              "description": "Both participants must have starting trophies in this band; conditions the curve and the scored observations on the same population.",
              "enum": [
                "under_5000",
                "5000_8000",
                "8000_11000",
                "11000_13000",
                "13000_plus"
              ],
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "battles_meta_cards",
          "group": "Battles",
          "title": "Meta cards (observed)",
          "description": "Observed card meta for a segment: the whole corpus (default), or segment.clan_tag / segment.player_tag / segment.collection. Per card AND form (forms never merge): usage share among decided player-battle observations, distinct players, raw and shrunk win rates. Default window: the current season to date; season selects another. What the recorded data shows, with sample sizes; never a tier list.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "segment",
              "type": "object",
              "required": false,
              "description": "Scope: exactly one of player_tag, clan_tag (current members) or collection (a player collection's slug, e.g. 'pros'). OMIT the whole object for the entire recorded corpus.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "season",
              "type": "string | integer",
              "required": false,
              "description": "Bound the window to one season: 'current' (to date), 'previous', the month the API names it by (2026-08), or the river race season number (135). from/to/days/weeks given win over it.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            },
            {
              "name": "min_battles",
              "type": "integer",
              "required": false,
              "description": "Decided observations a card needs to be listed.",
              "enum": null,
              "default": 10
            },
            {
              "name": "sort",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "usage",
                "shrunk_win_rate"
              ],
              "default": "usage"
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 30
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "battles_meta_decks",
          "group": "Battles",
          "title": "Meta decks (observed)",
          "description": "Observed deck meta for a segment: the whole corpus (default), or segment.clan_tag / segment.player_tag / segment.collection. Per exact deck identity: decided player-battle observations (not unique matches), record, distinct players, usage share, raw and shrunk win rates. Default window: the current season to date; season selects another. No tier lists: what the recorded data shows, with sample sizes.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "segment",
              "type": "object",
              "required": false,
              "description": "Scope: exactly one of player_tag, clan_tag (current members) or collection (a player collection's slug, e.g. 'pros'). OMIT the whole object for the entire recorded corpus.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "season",
              "type": "string | integer",
              "required": false,
              "description": "Bound the window to one season: 'current' (to date), 'previous', the month the API names it by (2026-08), or the river race season number (135). from/to/days/weeks given win over it.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            },
            {
              "name": "min_battles",
              "type": "integer",
              "required": false,
              "description": "Decided observations a deck needs to be listed.",
              "enum": null,
              "default": 5
            },
            {
              "name": "sort",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "battles",
                "shrunk_win_rate",
                "players"
              ],
              "default": "battles"
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 20
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "battles_opponents",
          "group": "Battles",
          "title": "Opponents faced",
          "description": "A player's recorded battles grouped by OPPONENT: per opponent the record (W/L/D), first and last meeting, the modes, clan at last meeting, and the opponent's name where the service has observed one (name_known). min_battles: 2 answers \"who have I faced more than once\" in one call. Head-to-head only. The discovery half of battles_query's opponent_tag filter.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            },
            {
              "name": "min_battles",
              "type": "integer",
              "required": false,
              "description": "Only opponents met at least this many times (2 = repeats only).",
              "enum": null,
              "default": 1
            },
            {
              "name": "sort",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "battles",
                "last_seen",
                "wins"
              ],
              "default": "battles"
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 50
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "battles_performance",
          "group": "Battles",
          "title": "Performance windows",
          "description": "Computed record over a window: W/L/D, win rate, crowns for/against, net trophies, three-crown rate, streaks. compare_from/compare_to or before_after runs a second window server-side for \"since X vs before\" questions (before_after wins over compare_*); group_by week is the trend view and group_by mode the \"what have I been playing\" view.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "last_n_battles",
              "type": "integer",
              "required": false,
              "description": "Sample the most recent N battles instead of a window.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            },
            {
              "name": "deck_hash",
              "type": "string",
              "required": false,
              "description": "Only battles on this exact deck (see battles_decks).",
              "enum": null,
              "default": null
            },
            {
              "name": "compare_from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "compare_to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "group_by",
              "type": "string",
              "required": false,
              "description": "week: weekly series (ISO weeks). mode: per named game mode, event modes included. Overrides before_after and compare_*.",
              "enum": [
                "week",
                "mode"
              ],
              "default": null
            },
            {
              "name": "before_after",
              "type": "string",
              "required": false,
              "description": "Date splitting two windows: [from..date) vs [date..to], e.g. before vs after a deck change.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "player_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "applied": {
                "type": "object",
                "properties": {
                  "window": {
                    "type": "object",
                    "description": "The window that applied and where it came from.",
                    "properties": {
                      "from": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "argument",
                          "default",
                          "unbounded",
                          "fixed",
                          "season"
                        ]
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "days": {
                        "type": "integer"
                      },
                      "season": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "month": {
                            "type": "string"
                          },
                          "war": {
                            "type": "integer"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        }
                      },
                      "crosses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "season"
                              ]
                            },
                            "at": {
                              "type": "string"
                            },
                            "from_season": {
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "to_season": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "at",
                            "to_season"
                          ]
                        }
                      },
                      "season_age_days": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "source"
                    ]
                  },
                  "mode": {
                    "type": "string"
                  },
                  "group_by": {
                    "type": "string"
                  }
                },
                "required": [
                  "window"
                ]
              },
              "window": {
                "type": "object",
                "properties": {
                  "battles": {
                    "type": "integer"
                  },
                  "wins": {
                    "type": "integer"
                  },
                  "losses": {
                    "type": "integer"
                  },
                  "draws": {
                    "type": "integer"
                  },
                  "win_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  },
                  "boat_battles": {
                    "type": "integer"
                  },
                  "duel_battles": {
                    "type": "integer"
                  },
                  "crowns_for": {
                    "type": "integer"
                  },
                  "crowns_against": {
                    "type": "integer"
                  },
                  "net_trophies": {
                    "type": "integer"
                  },
                  "current_streak": {
                    "type": "integer"
                  },
                  "decided_battles": {
                    "type": "integer"
                  },
                  "decided_wins": {
                    "type": "integer"
                  },
                  "decided_losses": {
                    "type": "integer"
                  },
                  "head_to_head_battles": {
                    "type": "integer"
                  },
                  "three_crown_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  }
                },
                "required": [
                  "battles",
                  "wins",
                  "losses",
                  "decided_battles",
                  "win_rate"
                ]
              },
              "compare_window": {
                "type": "object",
                "properties": {
                  "battles": {
                    "type": "integer"
                  },
                  "wins": {
                    "type": "integer"
                  },
                  "losses": {
                    "type": "integer"
                  },
                  "draws": {
                    "type": "integer"
                  },
                  "win_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  },
                  "boat_battles": {
                    "type": "integer"
                  },
                  "duel_battles": {
                    "type": "integer"
                  },
                  "crowns_for": {
                    "type": "integer"
                  },
                  "crowns_against": {
                    "type": "integer"
                  },
                  "net_trophies": {
                    "type": "integer"
                  },
                  "current_streak": {
                    "type": "integer"
                  },
                  "decided_battles": {
                    "type": "integer"
                  },
                  "decided_wins": {
                    "type": "integer"
                  },
                  "decided_losses": {
                    "type": "integer"
                  },
                  "head_to_head_battles": {
                    "type": "integer"
                  },
                  "three_crown_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  }
                },
                "required": [
                  "battles",
                  "wins",
                  "losses",
                  "decided_battles",
                  "win_rate"
                ]
              },
              "before": {
                "type": "object",
                "properties": {
                  "battles": {
                    "type": "integer"
                  },
                  "wins": {
                    "type": "integer"
                  },
                  "losses": {
                    "type": "integer"
                  },
                  "draws": {
                    "type": "integer"
                  },
                  "win_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  },
                  "boat_battles": {
                    "type": "integer"
                  },
                  "duel_battles": {
                    "type": "integer"
                  },
                  "crowns_for": {
                    "type": "integer"
                  },
                  "crowns_against": {
                    "type": "integer"
                  },
                  "net_trophies": {
                    "type": "integer"
                  },
                  "current_streak": {
                    "type": "integer"
                  },
                  "decided_battles": {
                    "type": "integer"
                  },
                  "decided_wins": {
                    "type": "integer"
                  },
                  "decided_losses": {
                    "type": "integer"
                  },
                  "head_to_head_battles": {
                    "type": "integer"
                  },
                  "three_crown_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  }
                },
                "required": [
                  "battles",
                  "wins",
                  "losses",
                  "decided_battles",
                  "win_rate"
                ]
              },
              "after": {
                "type": "object",
                "properties": {
                  "battles": {
                    "type": "integer"
                  },
                  "wins": {
                    "type": "integer"
                  },
                  "losses": {
                    "type": "integer"
                  },
                  "draws": {
                    "type": "integer"
                  },
                  "win_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  },
                  "boat_battles": {
                    "type": "integer"
                  },
                  "duel_battles": {
                    "type": "integer"
                  },
                  "crowns_for": {
                    "type": "integer"
                  },
                  "crowns_against": {
                    "type": "integer"
                  },
                  "net_trophies": {
                    "type": "integer"
                  },
                  "current_streak": {
                    "type": "integer"
                  },
                  "decided_battles": {
                    "type": "integer"
                  },
                  "decided_wins": {
                    "type": "integer"
                  },
                  "decided_losses": {
                    "type": "integer"
                  },
                  "head_to_head_battles": {
                    "type": "integer"
                  },
                  "three_crown_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "0..1, three decimals; null when the denominator is zero."
                  }
                },
                "required": [
                  "battles",
                  "wins",
                  "losses",
                  "decided_battles",
                  "win_rate"
                ]
              },
              "split_at": {
                "type": "string",
                "description": "ISO 8601 UTC instant."
              },
              "by_mode": {
                "type": "array"
              },
              "weekly": {
                "type": "array"
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "player_tag",
              "applied",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "player_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "window",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "compare_window",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "before",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "after",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "split_at",
              "type": "string",
              "required": false,
              "description": "ISO 8601 UTC instant.",
              "enum": null
            },
            {
              "name": "by_mode",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "weekly",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "battles_query",
          "group": "Battles",
          "title": "Query battles",
          "description": "The workhorse: recorded battles with filters and cursor pagination, both perspectives of every battle. Three addressing modes: player_tag (the usual sweep, defaults to the caller); battle_id alone (ONE battle, both sides); deck_hash alone (corpus-wide battles for that exact deck with a deck_stats aggregate and deliberately no pooled win rate). live: true asks for a battle-log poll no older than a minute - the 'what did they just play' path - served if in hand, otherwise queued while the record answers with live_status pending; the recorded log is otherwise within an hour for anyone recently asked about.",
          "readOnly": true,
          "openWorld": true,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Player tag like #20JJJ2CCRU. Omit to mean the caller (your primary player, or whoever on_behalf_of maps to).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            },
            {
              "name": "game_mode_id",
              "type": "integer",
              "required": false,
              "description": "Exact game mode id from the API.",
              "enum": null,
              "default": null
            },
            {
              "name": "opponent_tag",
              "type": "string",
              "required": false,
              "description": "Only battles against this tag.",
              "enum": null,
              "default": null
            },
            {
              "name": "outcome",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "win",
                "loss",
                "draw"
              ],
              "default": null
            },
            {
              "name": "with_card",
              "type": "integer",
              "required": false,
              "description": "Card id present in YOUR deck.",
              "enum": null,
              "default": null
            },
            {
              "name": "with_cards",
              "type": "array",
              "required": false,
              "description": "Card ids ALL present in YOUR deck (any form). Combine with with_card freely; a deck is matched by its played cards, tower troop excluded.",
              "enum": null,
              "default": null
            },
            {
              "name": "against_card",
              "type": "integer",
              "required": false,
              "description": "Card id present in an OPPONENT deck.",
              "enum": null,
              "default": null
            },
            {
              "name": "deck_hash",
              "type": "string",
              "required": false,
              "description": "Exact deck identity (see battles_decks). Without player_tag: corpus-wide.",
              "enum": null,
              "default": null
            },
            {
              "name": "battle_id",
              "type": "string",
              "required": false,
              "description": "Fetch exactly this battle (both perspectives).",
              "enum": null,
              "default": null
            },
            {
              "name": "game_mode",
              "type": "string",
              "required": false,
              "description": "Case-insensitive substring of the game's mode name ('chaos', 'crazy'); discover names with battles_performance group_by: 'mode'.",
              "enum": null,
              "default": null
            },
            {
              "name": "live",
              "type": "boolean",
              "required": false,
              "description": "Ask for a battle-log poll no older than a minute: served from the record if in hand, otherwise queued while the record answers now with live_status pending and retry_after_s.",
              "enum": null,
              "default": null
            },
            {
              "name": "cursor",
              "type": "string",
              "required": false,
              "description": "Opaque token from a previous response's next_cursor.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "Battles per page; above 25 needs verbosity: 'compact'.",
              "enum": null,
              "default": 25
            },
            {
              "name": "include_total",
              "type": "boolean",
              "required": false,
              "description": "Also return total_count across ALL pages (one cheap count query).",
              "enum": null,
              "default": null
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: drops per-card decks, support cards and tower_hp (deck_hash stays); use it for wide sweeps.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "player_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "battle_id": {
                "type": "string"
              },
              "deck_hash": {
                "type": "string"
              },
              "deck_stats": {
                "type": "object"
              },
              "applied": {
                "type": "object",
                "properties": {
                  "window": {
                    "type": "object",
                    "description": "The window that applied and where it came from.",
                    "properties": {
                      "from": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "argument",
                          "default",
                          "unbounded",
                          "fixed",
                          "season"
                        ]
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "days": {
                        "type": "integer"
                      },
                      "season": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "month": {
                            "type": "string"
                          },
                          "war": {
                            "type": "integer"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        }
                      },
                      "crosses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "season"
                              ]
                            },
                            "at": {
                              "type": "string"
                            },
                            "from_season": {
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "to_season": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "at",
                            "to_season"
                          ]
                        }
                      },
                      "season_age_days": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "source"
                    ]
                  },
                  "limit": {
                    "type": "integer"
                  },
                  "verbosity": {
                    "type": "string",
                    "enum": [
                      "full",
                      "compact"
                    ]
                  }
                },
                "required": [
                  "window",
                  "limit",
                  "verbosity"
                ]
              },
              "battles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "battle_id": {
                      "type": "string"
                    },
                    "battle_time": {
                      "type": "string",
                      "description": "ISO 8601 UTC instant."
                    },
                    "battle_time_local": {
                      "type": "string",
                      "description": "ISO 8601 with offset."
                    },
                    "type": {
                      "type": "string"
                    },
                    "game_mode": {
                      "type": "object"
                    },
                    "arena": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "league_number": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "me": {
                      "type": "object"
                    },
                    "teammates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "player_tag": {
                            "type": "string",
                            "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name_known": {
                            "type": "boolean"
                          },
                          "crowns": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "deck_hash": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "clan_tag": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rounds_played": {
                            "type": "integer"
                          },
                          "deck": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "tower_hp": {
                            "type": [
                              "object",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "player_tag",
                          "name_known"
                        ]
                      }
                    },
                    "opponents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "player_tag": {
                            "type": "string",
                            "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name_known": {
                            "type": "boolean"
                          },
                          "crowns": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "deck_hash": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "clan_tag": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rounds_played": {
                            "type": "integer"
                          },
                          "deck": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "tower_hp": {
                            "type": [
                              "object",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "player_tag",
                          "name_known"
                        ]
                      }
                    }
                  },
                  "required": [
                    "battle_id",
                    "battle_time",
                    "me",
                    "opponents"
                  ]
                }
              },
              "total_count": {
                "type": "integer"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque; null = end."
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "applied",
              "battles",
              "next_cursor",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "battle_id",
              "type": "string",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "deck_hash",
              "type": "string",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "deck_stats",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "battles",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "total_count",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "next_cursor",
              "type": "string | null",
              "required": true,
              "description": "Opaque; null = end.",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "battles_trends",
          "group": "Battles",
          "title": "Segment trends",
          "description": "Weekly time series for a segment: the whole corpus (default), or segment.clan_tag / segment.player_tag / segment.collection. Per ISO week: battles, record, aggregate win rate, distinct active players, net trophies, the season the week starts in. Default 12 weeks; weeks, from/to or season set the window; applied.window.crosses marks each season roll inside it. Single-player weekly detail also lives in battles_performance group_by 'week'.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "segment",
              "type": "object",
              "required": false,
              "description": "Scope: exactly one of player_tag, clan_tag (current members) or collection (a player collection's slug, e.g. 'pros'). OMIT the whole object for the entire recorded corpus.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "How many ISO weeks back (default 12); or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "season",
              "type": "string | integer",
              "required": false,
              "description": "Bound the window to one season: 'current' (to date), 'previous', the month the API names it by (2026-08), or the river race season number (135). from/to/days/weeks given win over it.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Cards",
      "slug": "cards",
      "tools": [
        {
          "name": "cards_catalog",
          "group": "Cards",
          "title": "Card catalog",
          "description": "Current card and tower-troop catalog: ids, names, rarities, elixir cost, icons, max levels and forms. Use it to resolve card ids instead of guessing; ids or query narrow it to the cards you mean, and verbosity compact keeps id, name, rarity, cost and forms. maxLevel is the in-game 1-16 scale like every recorded-data tool; maxLevelRarityScale is the API's rarity-relative cap for anyone joining to raw live_fetch payloads.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "ids",
              "type": "array",
              "required": false,
              "description": "Only these card ids.",
              "enum": null,
              "default": null
            },
            {
              "name": "query",
              "type": "string",
              "required": false,
              "description": "Case-insensitive substring of a card name.",
              "enum": null,
              "default": null
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: id, name, rarity, elixirCost and forms_available per card; no icons, levels or counts.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "cards_synergy",
          "group": "Cards",
          "title": "Card synergy",
          "description": "What a card is played WITH, for a segment (the corpus by default) and window (default: the current season to date; season selects another): partner cards ranked by co-occurrence in decided head-to-head decks that contain the anchor, with co_occurrence_rate, distinct players per pair, the partner's baseline usage and lift = co_occurrence_rate / baseline (near 1 = rides along with everything). Anchor by card_id or exact name, never fuzzy; forms merge for the anchor by default while partners stay split by form.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "card_id",
              "type": "integer",
              "required": false,
              "description": "Anchor card id (preferred).",
              "enum": null,
              "default": null
            },
            {
              "name": "card",
              "type": "string",
              "required": false,
              "description": "Anchor card by EXACT name (case-insensitive); ambiguous names are refused with candidates.",
              "enum": null,
              "default": null
            },
            {
              "name": "segment",
              "type": "object",
              "required": false,
              "description": "Scope: exactly one of player_tag, clan_tag (current members) or collection (a player collection's slug, e.g. 'pros'). OMIT the whole object for the entire recorded corpus.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "season",
              "type": "string | integer",
              "required": false,
              "description": "Bound the window to one season: 'current' (to date), 'previous', the month the API names it by (2026-08), or the river race season number (135). from/to/days/weeks given win over it.",
              "enum": null,
              "default": null
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            },
            {
              "name": "merge_forms",
              "type": "boolean",
              "required": false,
              "description": "Treat the anchor's base, Evolution and Hero forms as one card (default); false anchors on one form, chosen with anchor_form.",
              "enum": null,
              "default": true
            },
            {
              "name": "anchor_form",
              "type": "string",
              "required": false,
              "description": "With merge_forms false: which form of the anchor.",
              "enum": [
                "base",
                "evolution",
                "hero"
              ],
              "default": null
            },
            {
              "name": "min_pair_battles",
              "type": "integer",
              "required": false,
              "description": "Decided decks a pair needs to be listed.",
              "enum": null,
              "default": 5
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 20
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Clans",
      "slug": "clans",
      "tools": [
        {
          "name": "clans_members_timeline",
          "group": "Clans",
          "title": "Clan members' timeline",
          "description": "The members' daily series for a clan, yours by default: for every player the roster placed in the clan in the window (or player_tags), one point per game day with the roster's metrics (trophies, donations, donations_received, arena_id, clan_rank, previous_clan_rank, game_last_seen_at) and, for members whose profile is recorded, any profile metric of players_timeline. Names are the current ones. kind selects the pre_reset or season_roll row; granularity week keeps each ISO week's last row. verbosity compact keeps each member's first and last point and the delta.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Clan tag like #J2RGCRVG. Omit to mean your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "player_tags",
              "type": "array",
              "required": false,
              "description": "A subset of members; omit for every player the roster placed in the clan in the window.",
              "enum": null,
              "default": null
            },
            {
              "name": "metrics",
              "type": "array",
              "required": false,
              "description": "Which series to return; default trophies and donations.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "YYYY-MM-DD, inclusive. Built from daily snapshots, so only whole days are meaningful; an instant is not accepted.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "YYYY-MM-DD, inclusive. Built from daily snapshots, so only whole days are meaningful; an instant is not accepted.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days of the series, today included: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks of the series, today included: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "granularity",
              "type": "string",
              "required": false,
              "description": "week returns the last row of each ISO week.",
              "enum": [
                "day",
                "week"
              ],
              "default": "day"
            },
            {
              "name": "kind",
              "type": "string",
              "required": false,
              "description": "Which row of the day: daily (the day's last observation), pre_reset (the hour before the Monday 00:10 UTC donation reset: the honest weekly donation total) or season_roll (the hour before the season rolls).",
              "enum": [
                "daily",
                "pre_reset",
                "season_roll"
              ],
              "default": "daily"
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "Most members to return (by tag order); pass player_tags to choose.",
              "enum": null,
              "default": 50
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: per member the first and last point and the delta of each numeric metric, no series.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "clan_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "applied": {
                "type": "object",
                "properties": {
                  "window": {
                    "type": "object",
                    "description": "The window that applied and where it came from.",
                    "properties": {
                      "from": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "argument",
                          "default",
                          "unbounded",
                          "fixed",
                          "season"
                        ]
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "days": {
                        "type": "integer"
                      },
                      "season": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "month": {
                            "type": "string"
                          },
                          "war": {
                            "type": "integer"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        }
                      },
                      "crosses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "season"
                              ]
                            },
                            "at": {
                              "type": "string"
                            },
                            "from_season": {
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "to_season": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "at",
                            "to_season"
                          ]
                        }
                      },
                      "season_age_days": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "source"
                    ]
                  },
                  "kind": {
                    "type": "string"
                  },
                  "limit": {
                    "type": "integer"
                  }
                },
                "required": [
                  "window"
                ]
              },
              "member_count": {
                "type": "integer"
              },
              "members": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "player_tag": {
                      "type": "string",
                      "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "points": {
                      "type": "integer"
                    },
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "YYYY-MM-DD."
                          },
                          "day": {
                            "type": "string",
                            "description": "YYYY-MM-DD."
                          },
                          "iso_week": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "daily",
                              "pre_reset",
                              "season_roll"
                            ]
                          },
                          "observed_at": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "profile_observed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The profile poll that wrote the lifetime block; null on a roster-only day."
                          },
                          "roster_observed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The roster poll that wrote the clan columns; null when the roster never touched the row."
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "api",
                              "elixir-bot"
                            ]
                          },
                          "clan_tag": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "source"
                        ]
                      }
                    },
                    "first": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "description": "YYYY-MM-DD."
                            },
                            "day": {
                              "type": "string",
                              "description": "YYYY-MM-DD."
                            },
                            "iso_week": {
                              "type": "string"
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "daily",
                                "pre_reset",
                                "season_roll"
                              ]
                            },
                            "observed_at": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "profile_observed_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The profile poll that wrote the lifetime block; null on a roster-only day."
                            },
                            "roster_observed_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The roster poll that wrote the clan columns; null when the roster never touched the row."
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "api",
                                "elixir-bot"
                              ]
                            },
                            "clan_tag": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "source"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "description": "YYYY-MM-DD."
                            },
                            "day": {
                              "type": "string",
                              "description": "YYYY-MM-DD."
                            },
                            "iso_week": {
                              "type": "string"
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "daily",
                                "pre_reset",
                                "season_roll"
                              ]
                            },
                            "observed_at": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "profile_observed_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The profile poll that wrote the lifetime block; null on a roster-only day."
                            },
                            "roster_observed_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The roster poll that wrote the clan columns; null when the roster never touched the row."
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "api",
                                "elixir-bot"
                              ]
                            },
                            "clan_tag": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "source"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "delta": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "player_tag",
                    "points"
                  ]
                }
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "clan_tag",
              "applied",
              "member_count",
              "members",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "member_count",
              "type": "integer",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "members",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "clans_participation",
          "group": "Clans",
          "title": "Clan participation by week",
          "description": "Every open member's participation, week by week, in ONE call: per ISO week the battles played, ranked battles and the donation counter at week end; per recorded war week the decks used and each war day's decks (null where the day was not polled); per member the observed join, whether that join predates the recording, the last recorded battle and days since it. Facts with their windows and the recording horizon, no rating or ranking: the raw material for any clan's own participation rules. weeks 1 to 8, default 5; the current week is partial and says so. verbosity compact drops the per-day war arrays and points.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Clan tag like #J2RGCRVG. Omit to mean your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "How many ISO weeks back, the current partial week included.",
              "enum": null,
              "default": 5
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: war_decks only; no per-day arrays, no war_points.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "clans_pilot_scores",
          "group": "Clans",
          "title": "Clan Pilot Scores",
          "description": "Every open member's Pilot Score in ONE call: each member with >= 30 decided leveled battles scored against the corpus Level Curve over the window (default 90 days), with tenure. Descriptive in-sample residuals, not a skill ranking or proof of improvement.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Clan tag like #J2RGCRVG. Omit to mean your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Window for the curve and the scores, ending now.",
              "enum": null,
              "default": 90
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "clans_roster",
          "group": "Clans",
          "title": "Clan roster",
          "description": "A clan's roster, yours by default: roles, latest trophies and donations per member, activity recency (last recorded battle and the game's own last-seen), the member's tenure and badge count, the lifetime block as of the latest profile poll (best trophies, battles, wins, losses, three-crown wins, collection level, king tower level, total donations; null for a member whose profile is not recorded), and recent join/leave/role events. verbosity compact answers 'how many members' and 'what is this clan called' with the name, the count and the role breakdown only. live: true asks for a fresh read of ANY clan, recorded or not: served if in hand, otherwise queued while the record answers with live_status pending.",
          "readOnly": true,
          "openWorld": true,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Clan tag like #J2RGCRVG. Omit to mean your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: name, member count and role counts only; no member list, no events.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            },
            {
              "name": "live",
              "type": "boolean",
              "required": false,
              "description": "Ask for a read of this clan no older than two minutes; works for a clan nobody records. Served if in hand, otherwise queued while the record answers with live_status pending.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "clan_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "applied": {
                "type": "object"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "member_count": {
                "type": "integer"
              },
              "role_counts": {
                "type": "object"
              },
              "members": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "player_tag": {
                      "type": "string",
                      "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "nickname": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "trophies": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "donations_this_week": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "first_observed_in_clan": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "last_recorded_battle": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "last_seen_in_game": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "years_played": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "account_age_days": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "badge_count": {
                      "type": "integer"
                    },
                    "lifetime": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "As of the latest profile poll; null for a member whose profile is not recorded.",
                      "properties": {
                        "as_of": {
                          "type": "string",
                          "description": "ISO 8601 UTC instant."
                        },
                        "best_trophies": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "battle_count": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "wins": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "losses": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "three_crown_wins": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "collection_level": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "king_tower_level": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total_donations": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "player_tag",
                    "role"
                  ]
                }
              },
              "events_recorded_since": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "recent_events": {
                "type": "array"
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "clan_tag",
              "applied",
              "name",
              "member_count",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "name",
              "type": "string | null",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "member_count",
              "type": "integer",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "role_counts",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "members",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "events_recorded_since",
              "type": "string | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "recent_events",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": false,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": false,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "clans_standings",
          "group": "Clans",
          "title": "Clan standings",
          "description": "Clan-relative performance, yours by default: every open member's recorded W/L/D, win rate, ladder trophy net and current streak in ONE call over a window (default 30 days). For a 24-hour member scan use days: 1, min_battles: 1; from/to also supports shorter windows. Ranked with the clan median; members below min_battles are listed below the floor. Per-battle detail for one member is battles_performance.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Clan tag like #J2RGCRVG. Omit to mean your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days (default 30); or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "min_battles",
              "type": "integer",
              "required": false,
              "description": "Decided battles (wins + losses) required to be ranked.",
              "enum": null,
              "default": 10
            },
            {
              "name": "mode",
              "type": "string",
              "required": false,
              "description": "Mode group: ladder (Trophy Road), ranked (Path of Legends), war, casual, challenge, tournament. Omit for every mode.",
              "enum": [
                "casual",
                "challenge",
                "ladder",
                "ranked",
                "tournament",
                "war"
              ],
              "default": null
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "clan_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "applied": {
                "type": "object",
                "properties": {
                  "window": {
                    "type": "object",
                    "description": "The window that applied and where it came from.",
                    "properties": {
                      "from": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "argument",
                          "default",
                          "unbounded",
                          "fixed",
                          "season"
                        ]
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "days": {
                        "type": "integer"
                      },
                      "season": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "month": {
                            "type": "string"
                          },
                          "war": {
                            "type": "integer"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        }
                      },
                      "crosses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "season"
                              ]
                            },
                            "at": {
                              "type": "string"
                            },
                            "from_season": {
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "to_season": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "at",
                            "to_season"
                          ]
                        }
                      },
                      "season_age_days": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "source"
                    ]
                  }
                },
                "required": [
                  "window"
                ]
              },
              "ranked_members": {
                "type": "integer"
              },
              "median_win_rate": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "0..1, three decimals; null when the denominator is zero."
              },
              "members": {
                "type": "array"
              },
              "below_floor": {
                "type": "array"
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "clan_tag",
              "applied",
              "ranked_members",
              "median_win_rate",
              "members",
              "below_floor",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "ranked_members",
              "type": "integer",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "median_win_rate",
              "type": "number | null",
              "required": true,
              "description": "0..1, three decimals; null when the denominator is zero.",
              "enum": null
            },
            {
              "name": "members",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "below_floor",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "clans_timeline",
          "group": "Clans",
          "title": "Clan timeline",
          "description": "A clan's daily series, yours by default, one point per game day from the roster: clan_score, clan_war_trophies, members, donations_per_week, required_trophies, and the aggregates over that day's member rows (total_member_trophies, avg_member_trophies, members_seen); the profile-derived aggregates (avg_member_wins, avg_member_collection_level, the 12000+/14000+/6-years+/collection-1000+ counts) are metrics to ask for. kind selects the pre_reset or season_roll row; granularity week keeps the last row of each ISO week. verbosity compact keeps day and the five clan metrics.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Clan tag like #J2RGCRVG. Omit to mean your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "metrics",
              "type": "array",
              "required": false,
              "description": "Which series to return; default the five clan metrics and the three roster aggregates.",
              "enum": null,
              "default": null
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "YYYY-MM-DD, inclusive. Built from daily snapshots, so only whole days are meaningful; an instant is not accepted.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "YYYY-MM-DD, inclusive. Built from daily snapshots, so only whole days are meaningful; an instant is not accepted.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days of the series, today included: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks of the series, today included: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "granularity",
              "type": "string",
              "required": false,
              "description": "week returns the last row of each ISO week.",
              "enum": [
                "day",
                "week"
              ],
              "default": "day"
            },
            {
              "name": "kind",
              "type": "string",
              "required": false,
              "description": "Which row of the day: daily (the day's last observation), pre_reset (the hour before the Monday 00:10 UTC donation reset: the honest weekly donation total) or season_roll (the hour before the season rolls).",
              "enum": [
                "daily",
                "pre_reset",
                "season_roll"
              ],
              "default": "daily"
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: day and the five clan metrics per point.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "clan_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "applied": {
                "type": "object",
                "properties": {
                  "window": {
                    "type": "object",
                    "description": "The window that applied and where it came from.",
                    "properties": {
                      "from": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "argument",
                          "default",
                          "unbounded",
                          "fixed",
                          "season"
                        ]
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "days": {
                        "type": "integer"
                      },
                      "season": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "month": {
                            "type": "string"
                          },
                          "war": {
                            "type": "integer"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        }
                      },
                      "crosses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "season"
                              ]
                            },
                            "at": {
                              "type": "string"
                            },
                            "from_season": {
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "to_season": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "kind",
                            "at",
                            "to_season"
                          ]
                        }
                      },
                      "season_age_days": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "source"
                    ]
                  },
                  "kind": {
                    "type": "string"
                  }
                },
                "required": [
                  "window"
                ]
              },
              "series_available_from": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "series": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "day": {
                      "type": "string",
                      "description": "YYYY-MM-DD."
                    },
                    "iso_week": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "daily",
                        "pre_reset",
                        "season_roll"
                      ]
                    },
                    "observed_at": {
                      "type": "string",
                      "description": "ISO 8601 UTC instant."
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "api",
                        "elixir-bot"
                      ]
                    }
                  },
                  "required": [
                    "day",
                    "kind",
                    "observed_at",
                    "source"
                  ]
                }
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "clan_tag",
              "applied",
              "series_available_from",
              "series",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "series_available_from",
              "type": "string | null",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "series",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        }
      ]
    },
    {
      "group": "War",
      "slug": "war",
      "tools": [
        {
          "name": "war_current",
          "group": "War",
          "title": "Current war",
          "description": "The current (latest recorded) river race for a clan, yours by default: standings across the five clans with banked fame and current-day period_points, per-member points and decks used, the war day and attendance so far. On a war day decks_today names who is untouched, partial and finished (the nudge list); off one it is null with decks_today_reason. verbosity compact keeps standings, the period, the counts and the nudge lists (name + tag) and drops the participants array. live: true asks for a read of ANY clan, recorded or not: served if in hand, otherwise queued while the record answers with live_status pending.",
          "readOnly": true,
          "openWorld": true,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Clan tag like #J2RGCRVG. Omit to mean your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: drops the participants array and attendance history; keeps standings, period, counts, members_not_in_race and the decks_today lists.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            },
            {
              "name": "live",
              "type": "boolean",
              "required": false,
              "description": "Ask for a read of this clan's race no older than two minutes; works for a clan nobody records. Served if in hand, otherwise queued while the record answers with live_status pending.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "clan_tag": {
                "type": "string",
                "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
              },
              "season_id": {
                "type": "integer"
              },
              "section_index": {
                "type": "integer"
              },
              "is_colosseum": {
                "type": "boolean"
              },
              "day_kind": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "war_day": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_war_day_opens_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "applied": {
                "type": "object"
              },
              "standings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "participant_clan_tag": {
                      "type": "string",
                      "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
                    },
                    "participant_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fame": {
                      "type": "integer"
                    },
                    "period_points": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Score in the current war day; null when only finished history was captured."
                    },
                    "rank": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "trophy_change": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "finish_time": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "participant_clan_tag",
                    "fame",
                    "period_points"
                  ]
                }
              },
              "participants": {
                "type": "array"
              },
              "participants_count": {
                "type": "integer"
              },
              "member_count": {
                "type": "integer"
              },
              "members_not_in_race": {
                "type": "array"
              },
              "period": {
                "type": "object"
              },
              "race_finished_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "decks_today": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "war_day": {
                    "type": "integer"
                  },
                  "race_finished_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "untouched": {
                    "type": "array"
                  },
                  "partial": {
                    "type": "array"
                  },
                  "finished": {
                    "type": "array"
                  },
                  "counts": {
                    "type": "object"
                  },
                  "over_cap": {
                    "type": "array"
                  }
                }
              },
              "decks_today_reason": {
                "type": "string",
                "enum": [
                  "period_unknown",
                  "war_day_over",
                  "training_day"
                ]
              },
              "attendance_by_war_day": {
                "type": "array"
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "clan_tag",
              "season_id",
              "section_index",
              "day_kind",
              "war_day",
              "standings",
              "participants_count",
              "member_count",
              "members_not_in_race",
              "decks_today",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": true,
              "description": "Clash Royale tag, e.g. #20JJJ2CCRU.",
              "enum": null
            },
            {
              "name": "season_id",
              "type": "integer",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "section_index",
              "type": "integer",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "is_colosseum",
              "type": "boolean",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "day_kind",
              "type": "string | null",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "war_day",
              "type": "integer | null",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "next_war_day_opens_at",
              "type": "string | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "applied",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "standings",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "participants",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "participants_count",
              "type": "integer",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "member_count",
              "type": "integer",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "members_not_in_race",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "period",
              "type": "object",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "race_finished_at",
              "type": "string | null",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "decks_today",
              "type": "object | null",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "decks_today_reason",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "period_unknown",
                "war_day_over",
                "training_day"
              ]
            },
            {
              "name": "attendance_by_war_day",
              "type": "array",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        },
        {
          "name": "game_clock",
          "group": "War",
          "title": "Game clock",
          "description": "What time it is in Clash Royale, for nobody in particular: current season, week within the season, whether today is a training day or war day, when this day ends, and the next boundaries of each kind (war_day_closes_at, next_war_day_opens_at, next_training_starts_at, week_ends_at, season_ends_at) so a routine can schedule itself. Needs no player and no clan. Use it to decide WHEN to look before deciding who to look at; war_current is the tool for what a specific clan is doing inside this day.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "at",
              "type": "string",
              "required": false,
              "description": "ISO 8601 instant to describe instead of now, e.g. to learn what day a recorded battle fell on.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "war_rivals",
          "group": "War",
          "title": "Scouting Report",
          "description": "The Scouting Report: observed war history for rival clans. Every recorded river race captures all five bracket clans, so rivals accumulate fingerprints across every race they shared with a recorded clan. Defaults to your clan's current bracket. Pure aggregation of stored observations: races seen, fame record, zero-fame races, seasons spanned.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Your clan (the anchor whose bracket is meant). Omit for your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "rival_tags",
              "type": "array",
              "required": false,
              "description": "Specific rival clans; omit for the current bracket.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "war_history",
          "group": "War",
          "title": "War history",
          "description": "Recorded war weeks for a clan, yours by default: final ranks and boat fame. With player_tag (or on_behalf_of), returns one member's per-week points, decks and war days battled. With season_id and section_index together, returns that exact week plus every recorded participant in member_weeks. seasons says how far back otherwise; from/to are not needed here.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "Clan tag like #J2RGCRVG. Omit to mean your recorded clan.",
              "enum": null,
              "default": null
            },
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "Focus one member's participation (member_weeks).",
              "enum": null,
              "default": null
            },
            {
              "name": "on_behalf_of",
              "type": "string",
              "required": false,
              "description": "Agent connections: the end user's id on your surface (e.g. discord:1234), mapped once with elixir_identify. Ignored on a personal connection.",
              "enum": null,
              "default": null
            },
            {
              "name": "seasons",
              "type": "integer",
              "required": false,
              "description": "How many seasons back.",
              "enum": null,
              "default": 3
            },
            {
              "name": "season_id",
              "type": "integer",
              "required": false,
              "description": "Exact season to read; supply section_index too. Returns every recorded participant for that week unless player_tag focuses one.",
              "enum": null,
              "default": null
            },
            {
              "name": "section_index",
              "type": "integer",
              "required": false,
              "description": "Exact section (week) within season_id; supply season_id too.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Rankings",
      "slug": "rankings",
      "tools": [
        {
          "name": "rankings_clan_ladder",
          "group": "Rankings",
          "title": "Clan leaderboard",
          "description": "A recorded CLAN leaderboard by location: clans (clan score) or clanwars (clan war trophies), 1,000 places each, global by default, recorded daily for global, the United States and Japan and for any location enabled since. Per clan: rank, previous rank, score, member count, badge and home location. as_of reads an earlier snapshot. This is the clan-side analogue of rankings_players; rankings_clans is a different thing - the clans most REPRESENTED on a player board.",
          "readOnly": true,
          "openWorld": true,
          "scope": "cr:read",
          "args": [
            {
              "name": "board",
              "type": "string",
              "required": false,
              "description": "clans ranks by clan score; clanwars by clan war trophies.",
              "enum": [
                "clans",
                "clanwars"
              ],
              "default": "clans"
            },
            {
              "name": "location",
              "type": "string",
              "required": false,
              "description": "global (default), a numeric CR location id (57000249), or a two-letter country code (US, JP). With board mode: its leaderboard id, or location 'list' on rankings_players to discover the recorded catalog. The service records every location the API lists.",
              "enum": null,
              "default": "global"
            },
            {
              "name": "as_of",
              "type": "string",
              "required": false,
              "description": "Read the board as it was on or before this instant: an ISO timestamp, or YYYY-MM-DD meaning the end of that day in the account's timezone (or the call's `timezone`). Omitted means the latest snapshot.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 100
            },
            {
              "name": "offset",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 0
            },
            {
              "name": "live",
              "type": "boolean",
              "required": false,
              "description": "Ask for a read of the ladder no older than a minute: served if in hand, otherwise queued while the latest snapshot answers with live_status pending. Not combinable with as_of.",
              "enum": null,
              "default": false
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "rankings_clans",
          "group": "Rankings",
          "title": "Clans on the leaderboard",
          "description": "Which clans have the most players on a recorded leaderboard - the global Path of Legends board by default: per clan the number of rated players, its best-placed player and their rank, over the WHOLE board (every player above the rating floor), not a top-100 slice, because at that depth sixty clans tie at one player and there is no ranking to find. Ties at the cutoff go to the clan whose best player is placed highest. as_of reads an earlier snapshot.",
          "readOnly": true,
          "openWorld": true,
          "scope": "cr:read",
          "args": [
            {
              "name": "board",
              "type": "string",
              "required": false,
              "description": "pol is the live Path of Legends board (players above the rating floor, recorded daily at the 10:00Z reset); pol_final is a season's FINAL Path of Legends standing at full depth (9,999 places), one per season since the ranked ladder's first (October 2022, S89 as game_clock counts) - pass `season`; mode is a game-mode leaderboard (Merge Tactics, Touchdown...) - pass its id as `location`, rankings_players with location 'list' names them; trophy is the Trophy Road board, which the API has served EMPTY for recent seasons.",
              "enum": [
                "pol",
                "trophy",
                "pol_final",
                "mode"
              ],
              "default": "pol"
            },
            {
              "name": "location",
              "type": "string",
              "required": false,
              "description": "global (default), a numeric CR location id (57000249), or a two-letter country code (US, JP). With board mode: its leaderboard id, or location 'list' on rankings_players to discover the recorded catalog. The service records every location the API lists.",
              "enum": null,
              "default": "global"
            },
            {
              "name": "season",
              "type": "integer | string",
              "required": false,
              "description": "With board pol_final: which season's final board - the season number as game_clock counts it (135 for August 2026), or the API's own name for the season, the month it started in (2026-08). Omitted means the most recent final we hold. The snapshot carries both spellings.",
              "enum": null,
              "default": null
            },
            {
              "name": "as_of",
              "type": "string",
              "required": false,
              "description": "Read the board as it was on or before this instant: an ISO timestamp, or YYYY-MM-DD meaning the end of that day in the account's timezone (or the call's `timezone`). Omitted means the latest snapshot.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 25
            },
            {
              "name": "live",
              "type": "boolean",
              "required": false,
              "description": "Ask for a read of the board no older than a minute: served if in hand, otherwise queued while the latest snapshot answers with live_status pending. Not combinable with as_of.",
              "enum": null,
              "default": false
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "rankings_timeline",
          "group": "Rankings",
          "title": "Leaderboard over time",
          "description": "How a leaderboard moved: for one player (player_tag) or one clan (clan_tag), their rank and rating at every snapshot of the global Path of Legends board across a window - one snapshot a day since 2026-09-11 (hourly before, for the global board), and only when the board moved; or, with neither, the board's own curve: the rating floor (last place), the summit (#1 and their rating) and the size of the rated field per snapshot. Windows are from/to; omitted means the current season so far. A snapshot exists only when the board changed; a flat stretch is confirmed, not repeated.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "player_tag",
              "type": "string",
              "required": false,
              "description": "A player: their rank and rating per snapshot. Omit with clan_tag for a clan, or both for the board itself.",
              "enum": null,
              "default": null
            },
            {
              "name": "clan_tag",
              "type": "string",
              "required": false,
              "description": "A clan: how many rated players it had and its best-placed player per snapshot.",
              "enum": null,
              "default": null
            },
            {
              "name": "board",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "pol",
                "mode"
              ],
              "default": "pol"
            },
            {
              "name": "location",
              "type": "string",
              "required": false,
              "description": "global (default), a numeric CR location id (57000249), or a two-letter country code (US, JP). With board mode: its leaderboard id, or location 'list' on rankings_players to discover the recorded catalog. The service records every location the API lists.",
              "enum": null,
              "default": "global"
            },
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "Most snapshots to return, newest kept; the global board is one a day since 2026-09-11, and only when it moved.",
              "enum": null,
              "default": 800
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "rankings_players",
          "group": "Rankings",
          "title": "Leaderboard players",
          "description": "A recorded leaderboard, the global Path of Legends board by default: every placed player with rank, rating, name and clan, as of the latest snapshot or any earlier instant (as_of). Every board is recorded daily at the 10:00Z reset, so this answers who was where and when - the API itself only ever shows now. Paged with limit and offset because a whole board can run to a thousand places. verbosity compact returns rank, tag and rating only. live: true asks for a fresh read: served if in hand, otherwise queued while the latest snapshot answers with live_status pending.",
          "readOnly": true,
          "openWorld": true,
          "scope": "cr:read",
          "args": [
            {
              "name": "board",
              "type": "string",
              "required": false,
              "description": "pol is the live Path of Legends board (players above the rating floor, recorded daily at the 10:00Z reset); pol_final is a season's FINAL Path of Legends standing at full depth (9,999 places), one per season since the ranked ladder's first (October 2022, S89 as game_clock counts) - pass `season`; mode is a game-mode leaderboard (Merge Tactics, Touchdown...) - pass its id as `location`, rankings_players with location 'list' names them; trophy is the Trophy Road board, which the API has served EMPTY for recent seasons.",
              "enum": [
                "pol",
                "trophy",
                "pol_final",
                "mode"
              ],
              "default": "pol"
            },
            {
              "name": "location",
              "type": "string",
              "required": false,
              "description": "global (default), a numeric CR location id (57000249), or a two-letter country code (US, JP). With board mode: its leaderboard id, or location 'list' on rankings_players to discover the recorded catalog. The service records every location the API lists.",
              "enum": null,
              "default": "global"
            },
            {
              "name": "season",
              "type": "integer | string",
              "required": false,
              "description": "With board pol_final: which season's final board - the season number as game_clock counts it (135 for August 2026), or the API's own name for the season, the month it started in (2026-08). Omitted means the most recent final we hold. The snapshot carries both spellings.",
              "enum": null,
              "default": null
            },
            {
              "name": "as_of",
              "type": "string",
              "required": false,
              "description": "Read the board as it was on or before this instant: an ISO timestamp, or YYYY-MM-DD meaning the end of that day in the account's timezone (or the call's `timezone`). Omitted means the latest snapshot.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 100
            },
            {
              "name": "offset",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 0
            },
            {
              "name": "live",
              "type": "boolean",
              "required": false,
              "description": "Ask for a read of the board no older than a minute: served if in hand, otherwise queued while the latest snapshot answers with live_status pending. Not combinable with as_of.",
              "enum": null,
              "default": false
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: rank, player_tag and rating only.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "game_events",
          "group": "Rankings",
          "title": "What was on",
          "description": "What was ON: the in-game events (modes, challenges, side modes) the API listed as running, recorded from daily sightings (sparser before 2026-09-11) with the days each was seen. The API shows only today's and gives no dates, so this is the season's calendar built from sightings - the thing that explains a spike of some mode in a battle log. Default window: the current season so far.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 50
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Collections",
      "slug": "collections",
      "tools": [
        {
          "name": "collections_browse",
          "group": "Collections",
          "title": "Browse collections",
          "description": "Curated collections of players or clans: the owner-published lists (pros, creators, clan families) plus any you own. A collection is its curator's editorial grouping, not a global fact about its members.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "collections_get",
          "group": "Collections",
          "title": "Collection members",
          "description": "One collection's members, enriched: players come with name, latest trophies, tenure and recording status; clans with name and open-member count. Fan into the player and battle tools per tag from here, or pass the collection as a segment to the meta tools.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "collection",
              "type": "string",
              "required": true,
              "description": "The collection's slug, as collections_browse lists it.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "collections_edit",
          "group": "Collections",
          "title": "Edit a collection",
          "description": "Change what is in a collection you own. action add and remove adjust membership; set replaces it with exactly the tags given (the shape an external roster sync wants). Everything in a collection is RECORDED while it stays there, so adding a tag starts collecting it and removing the last reason to keep it stops. Idempotent; up to 500 tags per call; one malformed tag refuses the whole call.",
          "readOnly": false,
          "openWorld": false,
          "scope": "collections:write",
          "args": [
            {
              "name": "collection",
              "type": "string",
              "required": true,
              "description": "The collection to change (its slug).",
              "enum": null,
              "default": null
            },
            {
              "name": "action",
              "type": "string",
              "required": false,
              "description": "add/remove adjust the current membership; set replaces it wholesale.",
              "enum": [
                "add",
                "remove",
                "set"
              ],
              "default": "add"
            },
            {
              "name": "tags",
              "type": "array",
              "required": true,
              "description": "Player or clan tags, matching the collection's kind. Folded to canonical form.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Live",
      "slug": "live",
      "tools": [
        {
          "name": "live_fetch",
          "group": "Live",
          "title": "Live CR API fetch",
          "description": "The catch-all: one allowlisted raw GET against the CR API through the live lane (per-account daily quota, spends the shared CR budget). Paths: /players/{tag}, /clans/{tag}, /clans/{tag}/currentriverrace, /clans/{tag}/riverracelog, /locations/{id}/rankings/players, /locations/{id}/pathoflegend/players. Prefer the recorded tools, all of which take live: true where a fresh read matters; /players/{tag}/battlelog is refused (a raw log exceeds the delivery cap): use battles_query({ live: true }). RAW payload: card levels are the API's rarity-relative scale.",
          "readOnly": true,
          "openWorld": true,
          "scope": "cr:read",
          "args": [
            {
              "name": "path",
              "type": "string",
              "required": true,
              "description": "e.g. /players/#20JJJ2CCRU or /clans/#J2RGCRVG/currentriverrace",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Timeline",
      "slug": "timeline",
      "tools": [
        {
          "name": "elixir_timeline",
          "group": "Timeline",
          "title": "Timeline",
          "description": "Your timeline: what happened to the players and clans you track since your read pointer, as ITEMS in order plus one summary ENTRY per subject. A person's subjects are the players they track and the clans they added; an agent's is the clan it represents, whose members appear on the clan's timeline. Items are named moments with an instant: battle sessions (a 30-minute gap breaks a session; single battles never appear), badges by name, arena and ranked moves, new bests, cards unlocked, joins, departures, role changes, the boat crossing the line, a week resolving, quiet rungs crossed, returns, and your account events. Each entry opens with a sentence a person can read, then always-present sections. Facts, never advice; nothing announces the time (game_clock does). Omit from to read from your pointer (none: last 24 hours; capped at 30 days). mark_read moves the pointer to the window end; a dry run passes false. Needs only cr:read.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "from",
              "type": "string",
              "required": false,
              "description": "Start of the window, inclusive: an ISO instant, or YYYY-MM-DD resolving to local midnight in your timezone.",
              "enum": null,
              "default": null
            },
            {
              "name": "to",
              "type": "string",
              "required": false,
              "description": "End of the window, exclusive: an ISO instant as given; YYYY-MM-DD covers that WHOLE local day. Omit for up to now.",
              "enum": null,
              "default": null
            },
            {
              "name": "days",
              "type": "integer",
              "required": false,
              "description": "Last N days, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "weeks",
              "type": "integer",
              "required": false,
              "description": "Last N weeks, ending now: sugar for from. Or use from/to.",
              "enum": null,
              "default": null
            },
            {
              "name": "timezone",
              "type": "string",
              "required": false,
              "description": "IANA zone (e.g. Europe/Paris) for this call's date-only bounds and local labels. Default: the account's timezone. Agents serving people in several zones pass the asker's.",
              "enum": null,
              "default": null
            },
            {
              "name": "mark_read",
              "type": "boolean",
              "required": false,
              "description": "Move your read pointer to this window's end. A dry run, or a second consumer on the same account, passes false and keeps its own from.",
              "enum": null,
              "default": true
            },
            {
              "name": "sections",
              "type": "array",
              "required": false,
              "description": "Keep only items and entry sections in these sections; the summary, subject, window and player notables always stay. Player sections: battles, trophies, arena, ranked, collection, badges, clan, war, presence. Clan sections: activity, roster, war, presence, standouts, donations. Plus account.",
              "enum": null,
              "default": null
            },
            {
              "name": "kinds",
              "type": "array",
              "required": false,
              "description": "Keep only timeline items of these kinds (entries are untouched): battle_session, session_standout, badge_earned, legendary_badge_earned, arena_changed, ranked_promotion, best_trophies_band, collection_level_step, career_wins_step, card_unlocked, clan_joined, clan_left, member_joined, member_left, member_role_changed, bracket_observed, race_finished, week_resolved, quiet_crossed, returned, or an account_* kind. A consumer that wakes on a few kinds reads only those.",
              "enum": null,
              "default": null
            },
            {
              "name": "verbosity",
              "type": "string",
              "required": false,
              "description": "compact: the timeline items and each entry's summary, subject, window and player notables; every entry section, including clan standouts, is dropped.",
              "enum": [
                "full",
                "compact"
              ],
              "default": "full"
            }
          ],
          "outputSchema": {
            "type": "object",
            "properties": {
              "applied": {
                "type": "object"
              },
              "window": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "to": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              },
              "read_to": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "at": {
                      "type": "string",
                      "description": "ISO 8601 UTC instant."
                    },
                    "subject_tag": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "subject_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "type": "string"
                    },
                    "section": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "facts": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "at",
                    "kind",
                    "section",
                    "text",
                    "facts"
                  ]
                }
              },
              "timeline_more": {
                "type": "integer"
              },
              "entries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "player_activity",
                        "clan_activity"
                      ]
                    },
                    "subject_tag": {
                      "type": "string",
                      "description": "Clash Royale tag, e.g. #20JJJ2CCRU."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "summary": {
                      "type": "string"
                    },
                    "window": {
                      "type": "object"
                    },
                    "notables": {
                      "type": "array"
                    }
                  },
                  "required": [
                    "kind",
                    "subject_tag",
                    "summary",
                    "window"
                  ]
                }
              },
              "quiet": {
                "type": "array"
              },
              "subjects": {
                "type": "integer"
              },
              "next_cursor": {
                "type": "string",
                "description": "ISO 8601 UTC instant."
              },
              "has_more": {
                "type": "boolean"
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One-sentence caveats to repeat when quoting the numbers."
              },
              "docs": {
                "type": "string",
                "description": "page or page#section for elixir_docs / elixir://docs."
              },
              "meta": {
                "type": "object",
                "description": "The envelope (docs: responses).",
                "properties": {
                  "as_of": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recorded_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "recording_active_since": {
                    "type": "string",
                    "description": "ISO 8601 UTC instant."
                  },
                  "freshness_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_polls": {
                    "type": "object"
                  },
                  "completeness_note": {
                    "type": "string"
                  },
                  "timezone_applied": {
                    "type": "string"
                  },
                  "feedback_responses_pending": {
                    "type": "integer"
                  },
                  "timeline_pending": {
                    "type": "integer"
                  },
                  "quota": {
                    "type": "object"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "contract_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "as_of",
                  "disclaimer",
                  "contract_version"
                ]
              }
            },
            "required": [
              "applied",
              "window",
              "read_to",
              "timeline",
              "entries",
              "quiet",
              "next_cursor",
              "has_more",
              "notes",
              "docs",
              "meta"
            ]
          },
          "returns": [
            {
              "name": "applied",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "window",
              "type": "object",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "read_to",
              "type": "string | null",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "timeline",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "timeline_more",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "entries",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "quiet",
              "type": "array",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "subjects",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null
            },
            {
              "name": "next_cursor",
              "type": "string",
              "required": true,
              "description": "ISO 8601 UTC instant.",
              "enum": null
            },
            {
              "name": "has_more",
              "type": "boolean",
              "required": true,
              "description": "",
              "enum": null
            },
            {
              "name": "notes",
              "type": "array",
              "required": true,
              "description": "One-sentence caveats to repeat when quoting the numbers.",
              "enum": null
            },
            {
              "name": "docs",
              "type": "string",
              "required": true,
              "description": "page or page#section for elixir_docs / elixir://docs.",
              "enum": null
            },
            {
              "name": "meta",
              "type": "object",
              "required": true,
              "description": "The envelope (docs: responses).",
              "enum": null
            }
          ]
        }
      ]
    },
    {
      "group": "Service",
      "slug": "service",
      "tools": [
        {
          "name": "elixir_collectors",
          "group": "Service",
          "title": "Collectors",
          "description": "The collector fleet: operator-run machines that fetch from the CR API, each named for a Clash Royale card. More collectors mean resilience, never more CR budget; what operators earn is quota (10 fetches = +1 daily tool call, capped at 4x base) and bonus recording slots.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_data_insights",
          "group": "Service",
          "title": "Data insights",
          "description": "What the service holds: players, battles and their time span, snapshots, war weeks, recorded clans and players, and API observations. The transparency view of the whole corpus, not just your slice.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [],
          "outputSchema": null,
          "returns": null
        }
      ]
    },
    {
      "group": "Help",
      "slug": "help",
      "tools": [
        {
          "name": "elixir_changelog",
          "group": "Help",
          "title": "Changelog",
          "description": "What changed in the tool CONTRACT since a version (client tool schemas cache aggressively). Entries after since, newest first, with tools_added and breaking notes; omitted since starts at the newest release. Pages default to 20 entries: pass next_offset as offset until it is null to read the complete history. elixir_updates is the product-level list written for people.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "since",
              "type": "string",
              "required": false,
              "description": "Contract version you last saw (any response's meta.contract_version). Omit to page through the full changelog.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "Release entries per page.",
              "enum": null,
              "default": 20
            },
            {
              "name": "offset",
              "type": "integer",
              "required": false,
              "description": "Pass the previous page's next_offset; keep since unchanged.",
              "enum": null,
              "default": 0
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_docs",
          "group": "Help",
          "title": "Documentation",
          "description": "Elixir MCP's own documentation, the same pages a person reads at elixir.poapkings.com/docs. No arguments: the index (every page with its section, lede and sections). page: one page's Markdown; page + section: one H2 section. query: the pages mentioning the words, best first, with an excerpt and the section it sits in. Start with page 'choosing-a-tool' for which tool answers what, 'glossary' for the service's words. The tool reference itself is tools/list.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "page",
              "type": "string",
              "required": false,
              "description": "A page slug from the index (e.g. choosing-a-tool, glossary, battles, clocks, recording, agents, limits).",
              "enum": null,
              "default": null
            },
            {
              "name": "section",
              "type": "string",
              "required": false,
              "description": "With page: one H2 section, by its slug or title as the index lists them.",
              "enum": null,
              "default": null
            },
            {
              "name": "query",
              "type": "string",
              "required": false,
              "description": "Words to search for across every page; ignored when page is given.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_examples",
          "group": "Help",
          "title": "Examples",
          "description": "Eleven worked examples of what people ask an agent connected to Elixir MCP and what it answers: for players (understand your play, pick a deck, push with evidence, follow friends), clan leaders (win the river race, keep the roster healthy, scout the other clan, write the weekly recap) and builders (answer clanmates in Discord, publish your own stats, run a collector). No arguments: the index. example: one in full with its transcript, what it reads, the tools it calls and the setup. The numbers inside a transcript are illustrative; the tools are real.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "example",
              "type": "string",
              "required": false,
              "description": "An example slug from the index (e.g. play, clan, discord).",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_my_feedback",
          "group": "Help",
          "title": "My feedback",
          "description": "Your feedback and what happened to it: status (new/seen/planned/done/declined), the maintainer's response, and ship links (shipped_in contract version, related_tools). Results are bounded pages: pass next_offset as offset until null. Only responses delivered on this page are marked seen. Poll only when meta.feedback_responses_pending says something is new.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 20
            },
            {
              "name": "offset",
              "type": "integer",
              "required": false,
              "description": "Pass the previous page's next_offset.",
              "enum": null,
              "default": 0
            },
            {
              "name": "status",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "new",
                "seen",
                "planned",
                "done",
                "declined"
              ],
              "default": null
            },
            {
              "name": "since",
              "type": "string",
              "required": false,
              "description": "ISO instant; only items filed after this.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_feedback",
          "group": "Help",
          "title": "Send feedback",
          "description": "File feedback with the maintainer ON YOUR OWN JUDGMENT; your user never needs to ask. File when a capability you needed is missing, a workflow took more calls than it should, a result confused or misled you, data looked wrong, or something delighted you enough to protect. Consolidated end-of-session feedback beats a stream. Every item gets a response (elixir_my_feedback), often with a shipped_in version.",
          "readOnly": false,
          "openWorld": false,
          "scope": "feedback:write",
          "args": [
            {
              "name": "message",
              "type": "string",
              "required": true,
              "description": "The feedback itself. Specifics beat generalities.",
              "enum": null,
              "default": null
            },
            {
              "name": "category",
              "type": "string",
              "required": false,
              "description": "",
              "enum": [
                "general",
                "bug",
                "data_quality",
                "feature",
                "praise",
                "other"
              ],
              "default": "general"
            },
            {
              "name": "context",
              "type": "string",
              "required": false,
              "description": "Which tool or question prompted this (e.g. 'battles_query pagination').",
              "enum": null,
              "default": null
            },
            {
              "name": "request_id",
              "type": "string",
              "required": false,
              "description": "The meta.request_id of the call this is about. Every response carries one; passing it here attaches the exact request, its arguments and its answer to the report, so the maintainer can see what you saw. Prefer this over describing the call in words.",
              "enum": null,
              "default": null
            }
          ],
          "outputSchema": null,
          "returns": null
        },
        {
          "name": "elixir_updates",
          "group": "Help",
          "title": "What's new",
          "description": "What's new on Elixir MCP: every user-visible change, newest first, as written for people at elixir.poapkings.com/updates. Distinct from elixir_changelog (the tool contract version by version). since: entries on or after a date; limit: how many.",
          "readOnly": true,
          "openWorld": false,
          "scope": "cr:read",
          "args": [
            {
              "name": "since",
              "type": "string",
              "required": false,
              "description": "YYYY-MM-DD; entries from that day on, newest first.",
              "enum": null,
              "default": null
            },
            {
              "name": "limit",
              "type": "integer",
              "required": false,
              "description": "",
              "enum": null,
              "default": 10
            }
          ],
          "outputSchema": null,
          "returns": null
        }
      ]
    }
  ],
  "disclaimer": "This material is unofficial and is not endorsed by Supercell. For more information see Supercell's Fan Content Policy: www.supercell.com/fan-content-policy."
}
