player_battles

Pack: clash-royale · Endpoint: https://gateway.pipeworx.io/clash-royale/mcp

Clash Royale official API — recent battle log for a player tag: outcome, decks used, opponent, arena, and trophy change for each of the last ~25 battles.

Parameters

NameTypeRequiredDescription
tagstringyes

Example call

Arguments

{
  "tag": "#2P8888R"
}

curl

curl -X POST https://gateway.pipeworx.io/clash-royale/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"player_battles","arguments":{"tag":"#2P8888R"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('player_battles', {
  "tag": "#2P8888R"
});

Response shape

Always returns: items, count

FieldTypeDescription
itemsarray
countintegerNumber of items returned.
Full JSON Schema
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Battle type"
          },
          "battleTime": {
            "type": "string",
            "description": "Battle timestamp"
          },
          "arena": {
            "type": "object",
            "description": "Arena info"
          },
          "gameMode": {
            "type": "object",
            "description": "Game mode details"
          },
          "deck": {
            "type": "array",
            "description": "Player deck cards"
          },
          "opponent": {
            "type": "object",
            "description": "Opponent info"
          },
          "teamCrowns": {
            "type": "number",
            "description": "Team crowns earned"
          },
          "opponentCrowns": {
            "type": "number",
            "description": "Opponent crowns"
          },
          "crowns": {
            "type": "number",
            "description": "Crowns earned by player"
          },
          "elixirLeaked": {
            "type": "number",
            "description": "Elixir leaked"
          },
          "opponentElixirLeaked": {
            "type": "number",
            "description": "Opponent elixir leaked"
          }
        }
      }
    },
    "count": {
      "type": "integer",
      "description": "Number of items returned."
    }
  },
  "required": [
    "items",
    "count"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "clash-royale": {
      "url": "https://gateway.pipeworx.io/clash-royale/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026