TanqoryDocs

Theme tools for AI assistants

The theme tools of Tanqory's MCP server, what each one does, and the scopes it needs.

Tanqory's MCP server gives an AI assistant the tools to design a store's theme and fill the store, with every change checked against the theme standard and saved as a draft first. Connect the assistant as in AI connectors; the tools it sees depend on the scopes the merchant approves.

The tools

ToolDoesNeeds
theme_guideThe guide for building a theme, for assistants that do not load skillsevery connection
theme_referenceA reference: every section and block of the base theme with its settings, the settings, the templates, the limitsevery connection
theme_initThe base theme's starter filesevery connection
theme_validateChecks files; each problem comes back with file, line, column and how to fix itevery connection
theme_scaffoldAdvanced mode: a plain starter for a completely new theme with its own layout and styles; changes nothing in the storeevery connection
theme_get, theme_filesLists the store's themes and reads a theme's filesread_themes
theme_preview_urlA private preview link of the draft that stays the same after each pushread_themes
theme_preview_screenshotDesktop and mobile images of a page of the draftread_themes
theme_upload_targetA one-hour link to upload a video or a large image yourself (PUT); changes nothing in the storewrite_themes
theme_upload_assetTurns an image or video (an https URL, a small inline file, or a file uploaded to a theme_upload_target link) into a store file and returns its https addresswrite_themes
theme_push_draftSaves files into a draft theme; never touches the live themewrite_themes
theme_publishMakes the draft livewrite_themes
theme_code_filesAdvanced mode: reads the code of one of the store's custom themes, whichever AI tool built itread_themes
theme_code_pushAdvanced mode: adds files to the staging area of a custom theme's next build, in as many calls as the theme needs; changes nothing in the storewrite_themes
theme_code_commitAdvanced mode: builds the staged theme in Tanqory's sandbox and checks it; the merchant approves each buildwrite_themes
theme_build_statusAdvanced mode: whether a custom theme build is still running, what to fix, or that it is ready to preview, and which files are staged for the next buildread_themes

Changes ask twice

theme_upload_asset, theme_push_draft, theme_publish and theme_code_commit change the store, so each takes two calls. The first answers with what will change and a confirmationToken. The assistant shows that to the merchant and, only when the merchant agrees, calls the same tool again with the token alone, { "confirmationToken": "…" }. Sending the same arguments again with the token also works; different arguments are refused. A token lasts 5 minutes and works once.

theme_code_push does not ask: it only stages files for the next build, and nothing in the store changes until the merchant approves theme_code_commit.

Build a custom theme in parts

A custom theme (Advanced mode) is often a few hundred kilobytes of code, more than an assistant should write in one tool call. It goes in parts:

  1. Stage the files. Call theme_code_push with the theme's handle and some of its files, about 32 KB of text per call, as many times as needed. Each call adds to what is already staged for that handle; a path sent again replaces its staged copy. A file left out of a call stays staged: nothing is ever deleted because a call did not include it. Each file is checked on its own as it arrives (paths, JSON syntax, imports, no network calls, no inline styles or scripts), and a call with a problem stages none of its files and answers every finding with file and line.
  2. Check what is staged. theme_build_status with the handle and no buildId lists every staged path with its size and SHA-256, so the assistant can compare it with its own copy before building.
  3. Commit. Call theme_code_commit with the handle (and a name for the Themes page). It checks the whole theme against the standard: the staged files laid over the theme's latest build, so a change needs only the files that changed. The merchant sees the card (files added, changed and removed, and the files kept from the latest build) and approves it.
  4. Approve with the token. Call theme_code_commit again with only the confirmationToken. The token is bound to the exact staged content: if a file was staged in between, the approval is refused with staged_content_changed and nothing is built, so call theme_code_commit without the token to show the merchant the new card.
  5. Follow the build. The answer is the build's state; theme_build_status with the buildId and wait: true follows it until it is ready, with the draft's themeId and a preview link, or failed, with each error at its file and line. To fix one, stage only the files you change and commit again.

Removing a file is always explicit: name it in theme_code_commit's delete list, or commit with replaceAll: true to build only the staged files as the whole theme. Staged files wait 24 hours after the last push to the handle; a store may stage up to 5 themes at once, at most 200 files and 2 MiB per theme, 256 KiB per file. A commit that starts a build empties the staging area of the files it built.

From a terminal, the tanqory-theme CLI of @tanqory/theme-mcp does the same in one command: tanqory-theme code push <folder> --handle <handle> stages the folder in parts, shows the card, approves it once and follows the build to the preview link.

What a check looks like

theme_validate on the starter files passes:

Text
Valid: 4 files meet the Tanqory theme standard (2 warnings).

A file that names a section the base theme does not have fails, and nothing is saved:

Text
Not valid: 1 error in 1 file. Fix each one at the file and line given, then validate again. Nothing was saved.
templates/index.json:1:48 error unknown_component Unknown component "no-such-section". ...

Try it

With the assistant connected and the theme scopes approved, ask for example: "Make my store's home page feel calm and minimal, with a large hero image and three featured collections. Show me the preview before you publish anything."

Partner tools

Theme partners have a second MCP server, https://mcp.tanqory.com/partners. Connect it the same way; the sign-in shows your partner organizations instead of a store, and the assistant gets what your role in each organization allows, nothing in a store you sell from.

ToolDoes
partner_organizationsYour partner organizations and what your role may do
partner_theme_list, partner_theme_versionsAn organization's themes and their versions
partner_theme_version_checksA version's 15 check lines; each failed one comes with what to fix
partner_development_storesThe development stores a version can be installed on
partner_theme_installBuilds a version in the sandbox, runs every check and installs it on a development store as a draft
partner_theme_submitSends a version whose 15 checks passed to Tanqory review
partner_theme_withdrawTakes a submission back from review

partner_theme_install, partner_theme_submit and partner_theme_withdraw ask twice, as the store tools do: the first call answers what will change and a confirmationToken. Uploading a version is not one of these tools: the source is on your machine (Upload a theme source).

Built from commit c0b3fb3fdef7 · API version 2026-10