Unity · Capability

Unity Economy API — Currencies

Unity Economy API — Currencies. 3 operations. Lead operation: Get Player Currency Balances. Self-contained Naftiko capability covering one Unity business surface.

Run with Naftiko UnityCurrencies

What You Can Do

GET
Getplayercurrencybalances — Get Player Currency Balances
/v1/v2/projects/{projectid}/environments/{environmentid}/players/{playerid}/currencies
POST
Decrementplayercurrencybalance — Decrement Player Currency Balance
/v1/v2/projects/{projectid}/environments/{environmentid}/players/{playerid}/currencies/{currencyid}/decrement
POST
Incrementplayercurrencybalance — Increment Player Currency Balance
/v1/v2/projects/{projectid}/environments/{environmentid}/players/{playerid}/currencies/{currencyid}/increment

MCP Tools

get-player-currency-balances

Get Player Currency Balances

read-only idempotent
decrement-player-currency-balance

Decrement Player Currency Balance

increment-player-currency-balance

Increment Player Currency Balance

Capability Spec

economy-currencies.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Unity Economy API — Currencies
  description: 'Unity Economy API — Currencies. 3 operations. Lead operation: Get Player Currency Balances. Self-contained
    Naftiko capability covering one Unity business surface.'
  tags:
  - Unity
  - Currencies
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    UNITY_API_KEY: UNITY_API_KEY
capability:
  consumes:
  - type: http
    namespace: economy-currencies
    baseUri: https://economy.services.api.unity.com
    description: Unity Economy API — Currencies business capability. Self-contained, no shared references.
    resources:
    - name: v2-projects-projectId-environments-environmentId-players-playerId-currencies
      path: /v2/projects/{projectId}/environments/{environmentId}/players/{playerId}/currencies
      operations:
      - name: getplayercurrencybalances
        method: GET
        description: Get Player Currency Balances
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: projectId
          in: path
          type: string
          required: true
        - name: environmentId
          in: path
          type: string
          required: true
        - name: playerId
          in: path
          type: string
          required: true
    - name: v2-projects-projectId-environments-environmentId-players-playerId-currencies-cur
      path: /v2/projects/{projectId}/environments/{environmentId}/players/{playerId}/currencies/{currencyId}/decrement
      operations:
      - name: decrementplayercurrencybalance
        method: POST
        description: Decrement Player Currency Balance
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: projectId
          in: path
          type: string
          required: true
        - name: environmentId
          in: path
          type: string
          required: true
        - name: playerId
          in: path
          type: string
          required: true
        - name: currencyId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v2-projects-projectId-environments-environmentId-players-playerId-currencies-cur
      path: /v2/projects/{projectId}/environments/{environmentId}/players/{playerId}/currencies/{currencyId}/increment
      operations:
      - name: incrementplayercurrencybalance
        method: POST
        description: Increment Player Currency Balance
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: projectId
          in: path
          type: string
          required: true
        - name: environmentId
          in: path
          type: string
          required: true
        - name: playerId
          in: path
          type: string
          required: true
        - name: currencyId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.UNITY_API_KEY}}'
  exposes:
  - type: rest
    namespace: economy-currencies-rest
    port: 8080
    description: REST adapter for Unity Economy API — Currencies. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v2/projects/{projectid}/environments/{environmentid}/players/{playerid}/currencies
      name: v2-projects-projectid-environments-environmentid-players-playerid-currencies
      description: REST surface for v2-projects-projectId-environments-environmentId-players-playerId-currencies.
      operations:
      - method: GET
        name: getplayercurrencybalances
        description: Get Player Currency Balances
        call: economy-currencies.getplayercurrencybalances
        with:
          projectId: rest.projectId
          environmentId: rest.environmentId
          playerId: rest.playerId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/projects/{projectid}/environments/{environmentid}/players/{playerid}/currencies/{currencyid}/decrement
      name: v2-projects-projectid-environments-environmentid-players-playerid-currencies-cur
      description: REST surface for v2-projects-projectId-environments-environmentId-players-playerId-currencies-cur.
      operations:
      - method: POST
        name: decrementplayercurrencybalance
        description: Decrement Player Currency Balance
        call: economy-currencies.decrementplayercurrencybalance
        with:
          projectId: rest.projectId
          environmentId: rest.environmentId
          playerId: rest.playerId
          currencyId: rest.currencyId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/projects/{projectid}/environments/{environmentid}/players/{playerid}/currencies/{currencyid}/increment
      name: v2-projects-projectid-environments-environmentid-players-playerid-currencies-cur
      description: REST surface for v2-projects-projectId-environments-environmentId-players-playerId-currencies-cur.
      operations:
      - method: POST
        name: incrementplayercurrencybalance
        description: Increment Player Currency Balance
        call: economy-currencies.incrementplayercurrencybalance
        with:
          projectId: rest.projectId
          environmentId: rest.environmentId
          playerId: rest.playerId
          currencyId: rest.currencyId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: economy-currencies-mcp
    port: 9090
    transport: http
    description: MCP adapter for Unity Economy API — Currencies. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-player-currency-balances
      description: Get Player Currency Balances
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: economy-currencies.getplayercurrencybalances
      with:
        projectId: tools.projectId
        environmentId: tools.environmentId
        playerId: tools.playerId
      outputParameters:
      - type: object
        mapping: $.
    - name: decrement-player-currency-balance
      description: Decrement Player Currency Balance
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: economy-currencies.decrementplayercurrencybalance
      with:
        projectId: tools.projectId
        environmentId: tools.environmentId
        playerId: tools.playerId
        currencyId: tools.currencyId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: increment-player-currency-balance
      description: Increment Player Currency Balance
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: economy-currencies.incrementplayercurrencybalance
      with:
        projectId: tools.projectId
        environmentId: tools.environmentId
        playerId: tools.playerId
        currencyId: tools.currencyId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.