Unity · Capability

Unity Live Game Operations

Unified capability for Unity live game operations combining Economy, Cloud Save, Leaderboards, and Remote Config APIs. Enables game economy management, player progression, competitive ranking, and real-time configuration for live service games.

Run with Naftiko UnityLive OpsEconomyLeaderboardsCloud SaveRemote ConfigGame Operations

What You Can Do

GET
Get currency balances — Get All Currency Balances for a Player
/v1/players/{playerId}/currencies
POST
Add currency — Add Currency to Player Balance
/v1/players/{playerId}/currencies/{currencyId}/add
GET
Get inventory — Get Player Item Inventory
/v1/players/{playerId}/inventory
POST
Purchase item — Purchase a Virtual Item
/v1/players/{playerId}/purchases/virtual
GET
Get save data — Get Player Game Save Data
/v1/players/{playerId}/save-data
POST
Save data — Save Player Game Progress
/v1/players/{playerId}/save-data
GET
List leaderboards — List All Leaderboards
/v1/leaderboards
GET
Get top scores — Get Top Leaderboard Scores
/v1/leaderboards/{leaderboardId}/scores
POST
Submit score — Submit Player Score to Leaderboard
/v1/leaderboards/{leaderboardId}/scores/players/{playerId}
GET
Get player rank — Get Player Score and Rank
/v1/leaderboards/{leaderboardId}/scores/players/{playerId}

MCP Tools

get-player-currencies

Get all virtual currency balances for a player

read-only
add-player-currency

Add virtual currency to a player's balance

deduct-player-currency

Deduct virtual currency from a player's balance

get-player-inventory

Get all items in a player's inventory

read-only
purchase-virtual-item

Purchase an in-game item using virtual currency

get-player-progress

Retrieve a player's saved game progress and state

read-only
save-player-progress

Save player game progress and state to the cloud

idempotent
list-leaderboards

List all game leaderboards

read-only
get-top-scores

Get the top scores from a leaderboard

read-only
submit-leaderboard-score

Submit a player's score to a leaderboard

idempotent
get-player-rank

Get a player's current rank and score on a leaderboard

read-only

APIs Used

unity-economy unity-cloud-save unity-leaderboards

Capability Spec

live-game-operations.yaml Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "Unity Live Game Operations"
  description: "Unified capability for Unity live game operations combining Economy, Cloud Save, Leaderboards, and Remote Config APIs. Enables game economy management, player progression, competitive ranking, and real-time configuration for live service games."
  tags:
    - Unity
    - Live Ops
    - Economy
    - Leaderboards
    - Cloud Save
    - Remote Config
    - Game Operations
  created: "2026-05-03"
  modified: "2026-05-03"

binds:
  - namespace: env
    keys:
      UNITY_ECONOMY_TOKEN: UNITY_ECONOMY_TOKEN
      UNITY_CLOUD_SAVE_TOKEN: UNITY_CLOUD_SAVE_TOKEN
      UNITY_LEADERBOARDS_TOKEN: UNITY_LEADERBOARDS_TOKEN

capability:
  consumes:
    - import: unity-economy
      location: ./shared/economy.yaml
    - import: unity-cloud-save
      location: ./shared/cloud-save.yaml
    - import: unity-leaderboards
      location: ./shared/leaderboards.yaml

  exposes:
    - type: rest
      port: 8080
      namespace: unity-live-ops-api
      description: "Unified REST API for Unity live game operations including economy, player data, and rankings."
      resources:
        - path: /v1/players/{playerId}/currencies
          name: player-currencies
          description: "Player virtual currency balance management"
          operations:
            - method: GET
              name: get-currency-balances
              description: "Get All Currency Balances for a Player"
              call: "unity-economy.get-player-currency-balances"
              with:
                projectId: "rest.projectId"
                environmentId: "rest.environmentId"
                playerId: "rest.playerId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/players/{playerId}/currencies/{currencyId}/add
          name: add-currency
          description: "Add currency to player balance"
          operations:
            - method: POST
              name: add-currency
              description: "Add Currency to Player Balance"
              call: "unity-economy.increment-currency-balance"
              with:
                projectId: "rest.projectId"
                environmentId: "rest.environmentId"
                playerId: "rest.playerId"
                currencyId: "rest.currencyId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/players/{playerId}/inventory
          name: player-inventory
          description: "Player item inventory"
          operations:
            - method: GET
              name: get-inventory
              description: "Get Player Item Inventory"
              call: "unity-economy.get-player-inventory"
              with:
                projectId: "rest.projectId"
                environmentId: "rest.environmentId"
                playerId: "rest.playerId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/players/{playerId}/purchases/virtual
          name: virtual-purchases
          description: "Virtual item purchases"
          operations:
            - method: POST
              name: purchase-item
              description: "Purchase a Virtual Item"
              call: "unity-economy.make-virtual-purchase"
              with:
                projectId: "rest.projectId"
                environmentId: "rest.environmentId"
                playerId: "rest.playerId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/players/{playerId}/save-data
          name: player-save-data
          description: "Player game save data"
          operations:
            - method: GET
              name: get-save-data
              description: "Get Player Game Save Data"
              call: "unity-cloud-save.get-player-data"
              with:
                projectId: "rest.projectId"
                playerId: "rest.playerId"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: POST
              name: save-data
              description: "Save Player Game Progress"
              call: "unity-cloud-save.set-player-data"
              with:
                projectId: "rest.projectId"
                playerId: "rest.playerId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/leaderboards
          name: leaderboards
          description: "Game leaderboard management"
          operations:
            - method: GET
              name: list-leaderboards
              description: "List All Leaderboards"
              call: "unity-leaderboards.list-leaderboards"
              with:
                projectId: "rest.projectId"
                environmentId: "rest.environmentId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/leaderboards/{leaderboardId}/scores
          name: leaderboard-scores
          description: "Leaderboard score data"
          operations:
            - method: GET
              name: get-top-scores
              description: "Get Top Leaderboard Scores"
              call: "unity-leaderboards.get-leaderboard-scores"
              with:
                projectId: "rest.projectId"
                environmentId: "rest.environmentId"
                leaderboardId: "rest.leaderboardId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/leaderboards/{leaderboardId}/scores/players/{playerId}
          name: player-leaderboard-score
          description: "Player-specific leaderboard score"
          operations:
            - method: POST
              name: submit-score
              description: "Submit Player Score to Leaderboard"
              call: "unity-leaderboards.add-player-score"
              with:
                projectId: "rest.projectId"
                environmentId: "rest.environmentId"
                leaderboardId: "rest.leaderboardId"
                playerId: "rest.playerId"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: GET
              name: get-player-rank
              description: "Get Player Score and Rank"
              call: "unity-leaderboards.get-player-score"
              with:
                projectId: "rest.projectId"
                environmentId: "rest.environmentId"
                leaderboardId: "rest.leaderboardId"
                playerId: "rest.playerId"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9080
      namespace: unity-live-ops-mcp
      transport: http
      description: "MCP server for AI-assisted Unity live game operations management."
      tools:
        # Economy tools
        - name: get-player-currencies
          description: "Get all virtual currency balances for a player"
          hints:
            readOnly: true
            openWorld: false
          call: "unity-economy.get-player-currency-balances"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
            playerId: "tools.playerId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: add-player-currency
          description: "Add virtual currency to a player's balance"
          hints:
            readOnly: false
            idempotent: false
          call: "unity-economy.increment-currency-balance"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
            playerId: "tools.playerId"
            currencyId: "tools.currencyId"
            amount: "tools.amount"
          outputParameters:
            - type: object
              mapping: "$."
        - name: deduct-player-currency
          description: "Deduct virtual currency from a player's balance"
          hints:
            readOnly: false
            idempotent: false
          call: "unity-economy.decrement-currency-balance"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
            playerId: "tools.playerId"
            currencyId: "tools.currencyId"
            amount: "tools.amount"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-player-inventory
          description: "Get all items in a player's inventory"
          hints:
            readOnly: true
            openWorld: false
          call: "unity-economy.get-player-inventory"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
            playerId: "tools.playerId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: purchase-virtual-item
          description: "Purchase an in-game item using virtual currency"
          hints:
            readOnly: false
            idempotent: false
          call: "unity-economy.make-virtual-purchase"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
            playerId: "tools.playerId"
            purchase_id: "tools.purchase_id"
          outputParameters:
            - type: object
              mapping: "$."
        # Cloud Save tools
        - name: get-player-progress
          description: "Retrieve a player's saved game progress and state"
          hints:
            readOnly: true
            openWorld: false
          call: "unity-cloud-save.get-player-data"
          with:
            projectId: "tools.projectId"
            playerId: "tools.playerId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: save-player-progress
          description: "Save player game progress and state to the cloud"
          hints:
            readOnly: false
            idempotent: true
          call: "unity-cloud-save.set-player-data"
          with:
            projectId: "tools.projectId"
            playerId: "tools.playerId"
            data: "tools.data"
          outputParameters:
            - type: object
              mapping: "$."
        # Leaderboard tools
        - name: list-leaderboards
          description: "List all game leaderboards"
          hints:
            readOnly: true
            openWorld: true
          call: "unity-leaderboards.list-leaderboards"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-top-scores
          description: "Get the top scores from a leaderboard"
          hints:
            readOnly: true
            openWorld: true
          call: "unity-leaderboards.get-leaderboard-scores"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
            leaderboardId: "tools.leaderboardId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: submit-leaderboard-score
          description: "Submit a player's score to a leaderboard"
          hints:
            readOnly: false
            idempotent: true
          call: "unity-leaderboards.add-player-score"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
            leaderboardId: "tools.leaderboardId"
            playerId: "tools.playerId"
            score: "tools.score"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-player-rank
          description: "Get a player's current rank and score on a leaderboard"
          hints:
            readOnly: true
            openWorld: false
          call: "unity-leaderboards.get-player-score"
          with:
            projectId: "tools.projectId"
            environmentId: "tools.environmentId"
            leaderboardId: "tools.leaderboardId"
            playerId: "tools.playerId"
          outputParameters:
            - type: object
              mapping: "$."