# Tools Overview

> The consolidated Lexsis Storefront MCP surface

Canonical URL: https://0.0.0.0:3005/tools

The Storefront MCP exposes stable domain tools. Most new capabilities are added
as actions inside these tools. Four tools remain dedicated to MCP Apps because
each panel has a distinct interaction boundary.

## Calling a tool

Every domain tool uses the same envelope:

```json
{
  "action": "get",
  "args": {
    "product_id": "gid://shopify/Product/123"
  }
}
```

If you do not know an action's exact arguments, call:

```json
{
  "name": "lexsis_discover",
  "arguments": {
    "router": "lexsis_catalog",
    "action": "get"
  }
}
```

`lexsis_discover` ranks natural-language queries such as `{"query":"publish cart"}`
and returns up to 10 matches by default. Action names and their descriptions
rank above general router text. The first 3 results include input schemas;
`include_schema:true` includes a schema for every returned result. Use `limit`
(1-100) and `offset` for paging. Responses include `total_matches`, `next_offset`
and relevance `score`. Exact router/action discovery returns that action's
schema, description, safety metadata and former operation name.

Transient service and proxy failures return `code:"UPSTREAM_UNAVAILABLE"`,
`error.code:"UPSTREAM_UNAVAILABLE"`, top-level `retryable:true` and
`retry_after_s`. Wait that long before retrying. For writes, inspect the latest
version/history first: a lost response may follow a successful write. Published
storefront pages use a recent cached render where available; otherwise they
return 503 with `Retry-After`, never an outage-driven 404.

## Public tools

Every action, with its access level and the page that documents it, is in the
[Tool Reference](/tools/reference).

| Tool | Purpose |
|------|---------|
| `lexsis_discover` | Search capabilities and get exact action schemas |
| `lexsis_workspace` | Workspaces, connected stores, credits and connection health |
| `lexsis_assets` | Image capabilities and viewing assets |
| `lexsis_asset_library` | Read-only asset library search |
| `lexsis_asset_select` | Interactive picker for existing assets |
| `lexsis_asset_import` | Import from URL, base64 image data or conversation attachments, or scan a web page and batch-import its images |
| `lexsis_asset_upload` | Interactive local file upload |
| `lexsis_campaigns` | Ad creatives, creative analysis and personas |
| `lexsis_brand` | Theme context, brand tokens, themes and navigation |
| `lexsis_catalog` | Products, collections and the merchant's real reviews |
| `lexsis_pages` | Read, inspect, compile and QA pages; resource-template routing dry runs |
| `lexsis_design` | Design guide, island catalog, island schemas and section templates |
| `lexsis_template_library` | Section templates, page kits and merchant templates |
| `lexsis_analytics` | Timeseries, page analytics, attribution and experiment results |
| `lexsis_capture` | Forms, quiz capture and section network access |
| `lexsis_cart` | Cart profiles, capabilities, promotions and previews |
| `lexsis_support` | Search this documentation and read whole pages |
| `lexsis_drafts` | Reversible writes: assets, themes, pages, templates, experiments, reviews, cart drafts, quiz policies, feedback |
| `lexsis_build` | Create and edit pages as files, sending only changed files ([Page Files](/tools/build)) |
| `lexsis_page_create` | Create a page draft with an interactive preview (fallback) |
| `lexsis_live_ops` | Publish, unpublish, delete, rollback, cart, template, experiment, quiz and routing changes that affect shoppers |

## Safety boundaries

- Read-only domain tools can run without approval.
- `lexsis_drafts` contains reversible or draft-scoped writes. Preparing a quiz
  capture policy does not activate collection.
- `lexsis_live_ops` changes live state and always requires explicit approval.

This separation lets MCP clients apply permissions at the tool level without
mixing page reads with publishing or deletion.

## Common workflows

### Create a page

1. `lexsis_brand` → `brand_kit`
2. `lexsis_catalog` → `get`
3. `lexsis_template_library` → `search_sections`
4. `lexsis_build` → `commit` with `create` (or `lexsis new` from the
   [Lexsis CLI](/tools/build#lexsis-cli)). `lexsis_pages` → `compile` then
   `lexsis_page_create` → `create` remains as a fallback.
5. Verify the returned preview with your agent's browser capability
6. After approval, `lexsis_live_ops` → `publish`

### Edit a page

1. `lexsis_pages` → `find`
2. With a shell: `lexsis_build` → `push_token`, then `lexsis pull`, edit
   files, `lexsis push` ([Lexsis CLI](/tools/build#lexsis-cli))
3. Without one: `lexsis_build` → `get`, then `commit` or `patch`
4. `lexsis_pages` → `integrity`
5. `lexsis_build` → `diff`

### Build a quiz

Use the [Quiz island](/islands/engagement/quiz) with products from the selected
store. For optional saved responses, follow the
[Quiz capture workflow](/tools/forms#quiz-capture-workflow): inspect the saved
version, prepare its policy, approve and activate it, publish the reviewed
page, then verify a consented response on the returned published URL.

## Report a problem

When you hit a defect in the MCP or platform, a rendering issue, a missing
variant or a documentation gap, report it with `lexsis_drafts` action
`send_feedback`. The Lexsis team reviews every report.

| Arg | Required | Description |
|---|---|---|
| `category` | Yes | `island-bug`, `island-variant-request`, `validator-issue`, `generation-quality`, `ux-issue`, `docs-gap`, `composition-issue`, `api-bug`, `api-gap` or `platform-bug` |
| `title` | Yes | Short summary, under 100 characters |
| `description` | Yes | What happened, what you expected, and steps to reproduce |
| `severity` | No | `low`, `medium` (default), `high` or `critical` |
| `island_name`, `page_slug`, `suggested_fix` | No | Context that helps the team reproduce and fix it |

Use `docs-gap` when better documentation would fix the problem, and `api-gap`
when no tool exists for an operation you need.

## Hard cutover

The former one-tool-per-operation MCP surface has been removed. `/mcp/legacy`
returns HTTP 410 and no local legacy flag is supported. Use
`lexsis_discover` to map a former operation name to its consolidated router,
action, and current input schema.

## Related

- [Tool Reference](/tools/reference)
- [Authentication](/getting-started/authentication)
- [Generation guide](/resources/generation-guide)
- [Page management](/tools/page-management)
- [Interactive widgets](/tools/interactive-widgets)
