Tools
Every tool the server exposes and the scope each one needs.
Each tool calls one Store API endpoint with the same inputs, so the endpoint pages double as tool documentation. Tools whose scope the key lacks are not listed to the assistant at all.
Store #
| Tool | Scope | What it does |
|---|---|---|
get_store | store:read | Returns the store the key belongs to, its storefront URL and currency, and the scopes on the key. |
Products #
| Tool | Scope | What it does |
|---|---|---|
list_products | products:read | Lists products, newest first. |
get_product | products:read | Retrieves one product. |
create_product | products:write | Creates a product in the key’s store. |
update_product | products:write | Updates the fields you send and leaves the rest alone. |
delete_product | products:write | Permanently deletes a product. |
list_categories | products:read | Lists product categories in display order. |
Orders #
| Tool | Scope | What it does |
|---|---|---|
list_orders | orders:read | Lists orders, newest first, each with its line items. |
get_order | orders:read | Retrieves one order with its line items and the keys that were delivered. |
Customers #
| Tool | Scope | What it does |
|---|---|---|
list_customers | customers:read | Lists customers with their balance, lifetime spend and order count. |
get_customer | customers:read | Retrieves one customer. |
Coupons #
| Tool | Scope | What it does |
|---|---|---|
list_coupons | coupons:read | Lists coupons, newest first. |
get_coupon | coupons:read | Retrieves one coupon, including how often it has been used. |
create_coupon | coupons:write | Creates a coupon. |
update_coupon | coupons:write | Updates the fields you send. |
delete_coupon | coupons:write | Permanently deletes a coupon. |
Theme #
| Tool | Scope | What it does |
|---|---|---|
list_theme_files | themes:read | Returns every file in the theme’s draft project. |
get_theme_file | themes:read | Reads one draft file. |
write_theme_files | themes:write | Creates or replaces draft files and deletes others in one request. |
preview_theme | themes:write | Returns a link that renders the current drafts with your store’s data and reloads itself when the drafts change. |
publish_theme | themes:write | Builds the drafts on the server and makes them the live storefront. |
list_theme_versions | themes:read | Lists published versions, newest first, and which one is live. |
Errors #
A failed tool call returns a normal result with isError: true and text such as permission_denied: API key does not have products:write permission, so the assistant can
explain the problem or try something else.
Paysum