> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summerengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Operations: economy

> A game's items: propose or sync the item plan for the owner's approval. For each operation: what it does, whether it asks you first, its inputs and an example call.

A game's items: propose or sync the item plan for the owner's approval. 2 operations. How to call them, and what the answers mean: [Operations reference](https://docs.summerengine.com/mcp/operations.md).

> [!NOTE]
>
> Generated from the `summer-engine` npm package `4.8.0`: its public operation catalog (`registry/operations/public-catalog.json`) and its engine and local operations. If something here is wrong, the operation's definition is wrong.

| Operation | What it does | Asks you first |
| - | - | - |
| [`economy.propose_items`](#propose_items) | Send a game's item plan (items by item key) to its owner. | Always |
| [`economy.sync_items`](#sync_items) | Sync summer.items.json to the store game by item slug - a plan, then the owner's approval in Studio. | Always |

***

### propose\_items

`economy.propose_items`: **Propose item changes to the owner**

> [!NOTE]
>
> Preview: search finds it and `summer_call` runs it. It may still change.

Send a game's item plan (items by item key) to its owner. Answers needs\_approval with a link; on Approve, Studio creates or revises each item, sets its price and submits it for Summer's review. Never publishes. At most 50 items.

| | |
| - | - |
| **MCP** | `summer_call` with `"op": "economy.propose_items"` |
| **CLI** | `summer economy propose-items` |
| **Runs** | On Summer's servers: the hosted MCP, or the npm MCP after `summer login`. Needs your Summer sign-in. |
| **Effect** | Changes your own drafts, files or settings. Nobody else sees it yet. |
| **Asks you first** | Always. You approve it in Studio; an agent can never skip this. |
| **Retry key** | Required: send a new `idempotencyKey` for each new request, the same one only to retry it. |

**Inputs:**

| Input | Type | Required | Description |
| - | - | - | - |
| `gameId` | string | Yes | From games.list. |
| `items` | object\[] | Yes | Items 1 to 50. |
| `items[].slug` | string | Yes | Length 1 to 64. |
| `items[].action` | "create" \| "update" | Yes | |
| `items[].definitionId` | string | No | |
| `items[].basedOnRevisionId` | string | No | |
| `items[].item` | object | Yes | |
| `items[].item.slug` | string | Yes | Length 1 to 64. |
| `items[].item.name` | string | Yes | Length 1 to …. |
| `items[].item.description` | string | Yes | Length 1 to …. |
| `items[].item.class` | "STANDARD" \| "COSMETIC" | Yes | |
| `items[].item.cosmetic` | object | No | |
| `items[].item.tags` | string\[] | Yes | Items 0 to 20. |
| `items[].item.ownershipMode` | "INSTANCE" \| "QUANTITY" | Yes | |
| `items[].item.maxOwned` | integer | No | Range 1 to 9007199254740991. |
| `items[].item.ownership` | "SOULBOUND" \| "OWNED" \| "MARKETABLE" | Yes | |
| `items[].item.consumable` | boolean | Yes | |
| `items[].item.supply` | integer | No | Range 1 to 9007199254740991. |
| `items[].item.priceSparks` | integer | No | Range 1 to 9007199254740991. |
| `items[].item.backgroundColor` | string | No | |
| `items[].item.mediaAssetIds` | string\[] | Yes | Items 0 to 20. |
| `dryRun` | boolean | No | Check and describe the call without doing it: nothing changes, nothing is spent. |
| `idempotencyKey` | string | Yes | Retry key, required: a new one for each new request; reuse it only to retry the identical request. Length 1 to 128. |

> **Input JSON schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "gameId": {
>       "description": "From games.list.",
>       "type": "string",
>       "pattern": "^[A-Za-z0-9_-]{1,128}$"
>     },
>     "items": {
>       "minItems": 1,
>       "maxItems": 50,
>       "type": "array",
>       "items": {
>         "type": "object",
>         "properties": {
>           "slug": {
>             "type": "string",
>             "minLength": 1,
>             "maxLength": 64,
>             "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"
>           },
>           "action": {
>             "type": "string",
>             "enum": [
>               "create",
>               "update"
>             ]
>           },
>           "definitionId": {
>             "type": "string",
>             "pattern": "^item_[A-Za-z0-9_-]{1,251}$"
>           },
>           "basedOnRevisionId": {
>             "type": "string",
>             "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,255}$"
>           },
>           "item": {
>             "type": "object",
>             "properties": {
>               "slug": {
>                 "type": "string",
>                 "minLength": 1,
>                 "maxLength": 64,
>                 "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"
>               },
>               "name": {
>                 "type": "string",
>                 "minLength": 1
>               },
>               "description": {
>                 "type": "string",
>                 "minLength": 1
>               },
>               "class": {
>                 "type": "string",
>                 "enum": [
>                   "STANDARD",
>                   "COSMETIC"
>                 ]
>               },
>               "cosmetic": {
>                 "type": "object",
>                 "properties": {
>                   "familyId": {
>                     "type": "string",
>                     "maxLength": 128,
>                     "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"
>                   },
>                   "variantKey": {
>                     "type": "string",
>                     "maxLength": 128,
>                     "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"
>                   }
>                 },
>                 "required": [
>                   "familyId",
>                   "variantKey"
>                 ],
>                 "additionalProperties": false
>               },
>               "tags": {
>                 "maxItems": 20,
>                 "type": "array",
>                 "items": {
>                   "type": "string",
>                   "pattern": "^[a-z0-9][a-z0-9._-]{0,47}$"
>                 }
>               },
>               "ownershipMode": {
>                 "type": "string",
>                 "enum": [
>                   "INSTANCE",
>                   "QUANTITY"
>                 ]
>               },
>               "maxOwned": {
>                 "type": "integer",
>                 "minimum": 1,
>                 "maximum": 9007199254740991
>               },
>               "ownership": {
>                 "type": "string",
>                 "enum": [
>                   "SOULBOUND",
>                   "OWNED",
>                   "MARKETABLE"
>                 ]
>               },
>               "consumable": {
>                 "type": "boolean"
>               },
>               "supply": {
>                 "type": "integer",
>                 "minimum": 1,
>                 "maximum": 9007199254740991
>               },
>               "priceSparks": {
>                 "type": "integer",
>                 "minimum": 1,
>                 "maximum": 9007199254740991
>               },
>               "backgroundColor": {
>                 "type": "string",
>                 "pattern": "^#[0-9A-Fa-f]{6}$"
>               },
>               "mediaAssetIds": {
>                 "maxItems": 20,
>                 "type": "array",
>                 "items": {
>                   "type": "string",
>                   "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,255}$"
>                 }
>               }
>             },
>             "required": [
>               "slug",
>               "name",
>               "description",
>               "class",
>               "tags",
>               "ownershipMode",
>               "ownership",
>               "consumable",
>               "mediaAssetIds"
>             ],
>             "additionalProperties": false
>           }
>         },
>         "required": [
>           "slug",
>           "action",
>           "item"
>         ],
>         "additionalProperties": false
>       }
>     },
>     "dryRun": {
>       "description": "Check and describe the call without doing it: nothing changes, nothing is spent.",
>       "type": "boolean"
>     },
>     "idempotencyKey": {
>       "description": "Retry key, required: a new one for each new request; reuse it only to retry the identical request.",
>       "type": "string",
>       "minLength": 1,
>       "maxLength": 128
>     }
>   },
>   "required": [
>     "gameId",
>     "items",
>     "idempotencyKey"
>   ]
> }
> ```

> **Result JSON schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "gameId": {
>       "type": "string"
>     },
>     "items": {
>       "type": "array",
>       "items": {
>         "type": "object",
>         "properties": {
>           "slug": {
>             "type": "string"
>           },
>           "action": {
>             "type": "string",
>             "enum": [
>               "create",
>               "update"
>             ]
>           },
>           "outcome": {
>             "type": "string",
>             "enum": [
>               "submitted",
>               "unchanged",
>               "refused",
>               "retry"
>             ]
>           },
>           "definitionId": {
>             "type": "string"
>           },
>           "revisionId": {
>             "type": "string"
>           },
>           "message": {
>             "type": "string"
>           }
>         },
>         "required": [
>           "slug",
>           "action",
>           "outcome",
>           "message"
>         ],
>         "additionalProperties": false
>       }
>     },
>     "note": {
>       "type": "string"
>     }
>   },
>   "required": [
>     "gameId",
>     "items",
>     "note"
>   ],
>   "additionalProperties": false
> }
> ```

**Example:** Ask the owner to add a new emote for 150 Sparks.

```json MCP theme={null}
{
  "name": "summer_call",
  "arguments": {
    "op": "economy.propose_items",
    "input": {
      "gameId": "g_123",
      "items": [
        {
          "slug": "emote_ponder",
          "action": "create",
          "item": {
            "slug": "emote_ponder",
            "name": "Ponder",
            "description": "Strike a thoughtful pose.",
            "class": "COSMETIC",
            "cosmetic": {
              "familyId": "emote",
              "variantKey": "ponder"
            },
            "tags": [
              "emote"
            ],
            "ownershipMode": "INSTANCE",
            "ownership": "OWNED",
            "consumable": false,
            "priceSparks": 150,
            "mediaAssetIds": [
              "asset_01"
            ]
          }
        }
      ],
      "idempotencyKey": "a-new-key-each-time"
    }
  }
}
```

```bash CLI theme={null}
summer economy propose-items --game-id g_123 --idempotency-key a-new-key-each-time --input '{"items":[{"slug":"emote_ponder","action":"create","item":{"slug":"emote_ponder","name":"Ponder","description":"Strike a thoughtful pose.","class":"COSMETIC","cosmetic":{"familyId":"emote","variantKey":"ponder"},"tags":["emote"],"ownershipMode":"INSTANCE","ownership":"OWNED","consumable":false,"priceSparks":150,"mediaAssetIds":["asset_01"]}}]}'
```

***

### sync\_items

`economy.sync_items`: **Sync items**

> [!NOTE]
>
> Preview: search finds it and `summer_call` runs it. It may still change.

Sync summer.items.json to the store game by item slug - a plan, then the owner's approval in Studio. Needs the store sign-in (summer login --store).

| | |
| - | - |
| **MCP** | `summer_sync_items` in the npm MCP |
| **CLI** | `summer economy sync-items` |
| **Runs** | On your computer, in the `summer-engine` npm package. |
| **Effect** | Publishes: makes something public or live. |
| **Asks you first** | Yes, every time: it first answers with what it will do, and runs only with `confirm: true` after you say yes. |
| **3.x names** | `summer_sync_items` |

**Inputs:**

| Input | Type | Required | Description |
| - | - | - | - |
| `gameId` | string | No | The store game id on this gateway (from games.list). Staging and production games have different ids. Without it the call fails with game\_required and lists your store games. Switching between staging and production takes SUMMER\_GATEWAY\_URL and SUMMER\_MCP\_RESOURCE\_URL, then "summer login --store --force" (one store sign-in per machine). |
| `project` | string | No | Project folder with project.godot and summer.items.json. Defaults to the MCP's bound project, then the working directory. |
| `file` | string | No | The items file, relative to the project. Default summer.items.json. |
| `slugs` | string\[] | No | Only these items (their slugs); the rest of the file is left out of the plan. Confirm a plan of more than 50 changed items one batch (from batches) at a time. |
| `confirm` | boolean | No | Set true only after the user approves the plan. Default `false`. |

> **Input JSON schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "gameId": {
>       "type": "string",
>       "description": "The store game id on this gateway (from games.list). Staging and production games have different ids. Without it the call fails with game_required and lists your store games. Switching between staging and production takes SUMMER_GATEWAY_URL and SUMMER_MCP_RESOURCE_URL, then \"summer login --store --force\" (one store sign-in per machine)."
>     },
>     "project": {
>       "type": "string",
>       "description": "Project folder with project.godot and summer.items.json. Defaults to the MCP's bound project, then the working directory."
>     },
>     "file": {
>       "type": "string",
>       "description": "The items file, relative to the project. Default summer.items.json."
>     },
>     "slugs": {
>       "type": "array",
>       "items": {
>         "type": "string"
>       },
>       "description": "Only these items (their slugs); the rest of the file is left out of the plan. Confirm a plan of more than 50 changed items one batch (from batches) at a time."
>     },
>     "confirm": {
>       "type": "boolean",
>       "default": false,
>       "description": "Set true only after the user approves the plan."
>     }
>   },
>   "additionalProperties": false
> }
> ```

**Example:** Sync items

```json MCP theme={null}
{
  "name": "summer_sync_items",
  "arguments": {}
}
```

```bash CLI theme={null}
summer economy sync-items
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.