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

# MCP tools

> The commerce MCP server's tools, what each one changes and how to handle errors.

MCP server
Seventeen tools cover one shopper's journey from discovery to purchase tracking. Every successful result contains `data` and `request_id`.

## Connection

The commerce MCP server uses Streamable HTTP. Your MCP client authenticates with OAuth against the issuer and audience agreed with Ignyt. The OAuth token proves who the client is; it is not the shopper delegation that the server uses with the Ignyt API.

Ignyt gives you the gateway URL, issuer, audience and scopes when your integration is approved. Do not use this documentation site's `/mcp` address for commerce, and do not guess a hosted commerce URL.

Tool names, input schemas, output schemas and effect hints are discoverable through MCP `tools/list`. The resource `ignite://commerce/guide` explains approval and retry rules for the model.

## Tools

| Tool | Effect | What it does |
| - | - | - |
| `get_capabilities` | Read | Scopes, environment, expiry and approval requirements for this delegation. |
| `list_merchants` | Read | Merchants the shopper may use, with enrollment and readiness. |
| `search_products` | Read | Search authorized offers by text or merchant. Follow `next_cursor`. |
| `get_product` | Read | One purchasable variant with price, currency and availability. |
| `create_cart` | Write | Create a UAE/AED cart for the signed-in shopper. |
| `get_cart` | Read | The shopper's cart and any review requirements. |
| `add_cart_item` | Write | Add a variant. Invalidates earlier quotes. |
| `set_cart_item_quantity` | Write | Change a quantity; zero removes the line. |
| `set_delivery_address` | Write | Set the shopper-authorized UAE delivery address. |
| `set_cart_coupons` | Write | Set coupon codes per store connection; the next quote validates them. |
| `create_quote` | Write | Freeze prices, delivery and fees for the shopper to approve. |
| `get_quote` | Read | A frozen quote's totals, currency, expiry and merchant groups. |
| `get_checkout_approval` | Read | The shopper's existing approval for this cart, if still valid. |
| `start_checkout` | Write | Submit checkout with the partner-recorded approval ID. Safe to retry with the same ID. |
| `get_checkout_status` | Read | Durable checkout state. Pending is not a failure. |
| `get_purchase` | Read | A purchase with merchant orders, partial outcomes and shipments. |
| `list_purchases` | Read | Only the signed-in shopper's purchases. Follow `next_cursor`. |

Cancellation, returns, refunds and partial-order decisions stay in your partner app and the Platform API. They are not agent actions in this release.

## Typical sequence

```mermaid theme={"theme":{"light":"github-light","dark":"vesper"}}
sequenceDiagram
    participant Agent
    participant MCP as Ignyt MCP
    participant App as Partner app
    Agent->>MCP: search_products, create_cart, add_cart_item
    Agent->>MCP: set_delivery_address, create_quote
    MCP-->>Agent: quote with total and currency
    Agent->>App: hand off for shopper approval
    App->>App: shopper approves exact quote
    Agent->>MCP: get_checkout_approval
    Agent->>MCP: start_checkout(cart_id, approval_id)
    Agent->>MCP: get_checkout_status, get_purchase
```

## Errors

For the seventeen tools above, errors from the Ignyt API and errors about the shopper's grant, consent or scopes come back as an MCP tool error whose text is JSON:

```json theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "code": "quote_expired",
  "request_id": "req_…",
  "outcome_unknown": false,
  "status": 409,
  "retry_after": null
}
```

`status` and `retry_after` appear when the Ignyt API answered. When `outcome_unknown` is `true`, the server could not confirm the result: read the cart or checkout status before doing anything else, and retry writes only with the original identifiers. `delegation_changed` means the shopper's grant changed during the call; start again with the current grant. `insufficient_scope` includes `required_scope`, and `shopper_consent_required` means the shopper must allow the assistant again in your app.

Some checks fail before the server calls Ignyt and return a plain-text message instead of JSON, for example a missing sign-in or more coupon codes than `set_cart_coupons` accepts (20 connections, 10 codes each, 100 characters per code). Nothing was changed, so fix the input or sign-in and call the tool again. Clients should handle tool error text that is not JSON.

The optional `open_cart_panel` tool follows different rules. In the signed-in profile, missing, expired or revoked shopper consent is the same JSON `shopper_consent_required` error as above, with `reason` set to `required`, `expired` or `revoked`. Every other panel error is plain text, including missing scopes and a shopper-service failure after the request was sent. In the [Sandbox guest](https://docs.ignyt.si/commerce-agents.md) profile, service errors are JSON (`guest_request_rejected` or `guest_upstream_unavailable`, with `outcome_unknown`), but a rejected panel session is plain text. The panel only opens a review step and never submits checkout or payment. After any panel error, read the cart with `get_cart` and the checkout with `get_checkout_status`, then open the panel again for the same cart. Opening the panel needs only `cart:write` and `checkout:write`, but `get_checkout_status` also needs `orders:read`. If the grant lacks it, the shopper must authorize `orders:read` before this recovery can finish.

## Related guides

> [card] [Agents overview](https://docs.ignyt.si/agents-overview.md)
>
> Roles, connection options and the approval flow.

> [card] [Agent checkout and MCP](https://docs.ignyt.si/commerce-agents.md)
>
> Consent, recovery and the optional Sandbox guest profile.


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