store

Buys or sells an item at the store screen that is open, or closes it. Open a store by talking to a merchant and asking to see the wares.

While a store is open, gui reports fullScreen Store, and its store lists the stock with each item’s price, your pack with what each item sellsFor, and your money, all in copper, as the store itself reckons them.

action is one of:

  • buy: buys item from the stock.
  • sell: sells item from your pack.
  • close: closes the store, as its screen’s close does. An item sold can be bought back at what was paid for it only until then.

A buy or sale goes as the screen’s own does, and one the screen or the store refuses is an error saying why: not in the stock or pack, a plot item, not enough money, a full backpack, or a store that will not buy it. The answer includes what the count cost or fetched (total), and the money before and after.

Arguments

Name Type Required What
action "buy" | "sell" | "close" yes Buy, sell, or close the store.
item string   With buy or sell: the item, by its id from the stock or pack that gui lists.
count integer (≥ 1)   How many of a stack to buy or sell, up to 999. Default 1.

Call it as store over MCP, or POST /api/tool/store with the arguments as JSON.