developers

Docs AI & MCP Tool reference

Tool reference

All 58 tools the Merchant MCP server registers. This page is generated from the server source at build time, so it cannot describe a tool that does not exist — or miss one that does.

Read the gate column. 40 tools are available as soon as the merchant signs in. The remaining 18 require the merchant to switch on a consent gate, because they change a live store. Nothing here can move money — see the safety model.

Available after sign-in

Reads and draft-safe writes. These need a valid merchant session and operate only on that merchant’s own store.

loginno gate
Step 1 of merchant sign-in: sends a one-time login code to the merchant's email (the same OTP flow the Mecsto apps use; existing merchant accounts only). Follow with verify_login.
verify_loginno gate
Step 2 of merchant sign-in: verifies the emailed code and stores the session (0600 file). All later tools run as this merchant under the platform's normal row-level security.
verify_two_factorno gate
Step 3 of merchant sign-in, for accounts with two-factor enabled: verifies the 6-digit authenticator code and only then stores the session. Without it the connection stays unauthenticated — the email code alone is not enough for a 2FA account.
whoamino gate
Who is logged in, which store this connection operates on, the caller's role, and whether publishing is enabled.
logoutno gate
Sign out: REVOKES the session on the server (every refresh token for this account) and deletes the local session file. Use this if the machine or session file may be compromised.
get_store_contextno gate
The store this connection edits: identity, active theme + palette, site URL, page inventory, and the authoring workflow guide. Call this first.
list_section_typesno gate
The section catalog — every section type an agent may compose, with its settings (key, type, and whether it writes authored `data` or data-bound `overrides`). This catalog is the complete vocabulary; nothing off-catalog can be inserted.
list_pagesno gate
Page inventory: composable page types, existing compositions (with draft/published state), theme-rendered pages, and custom pages.
get_pageno gate
A page's editable section composition (draft if one exists, else published, else the blueprint default) with stable section ids for edit_page_sections, plus its SEO metadata.
get_content_fieldsno gate
The active theme's per-field editable copy/images (from its manifest) merged with the store's current values — live and draft. Optionally filter by page. Use set_content_field to change one.
get_merchant_conceptsno gate
The Merchant Model concepts (brand, story, value proposition, contact, offerings…) — the store's voice. Read these before writing page copy so it sounds like the merchant.
edit_page_sectionsno gate
Edit a page's section composition with a closed set of operations applied atomically to the DRAFT: insert {op, type, settings?, at?|{before_id}|{after_id}, hidden?} · update_settings {op, section_id, set?, clear?} · move {op, section_id, to} · duplicate {op, section_id} · remove {op, section_id} · set_hidden {op, section_id, hidden}. Section ids come from get_page. Settings must match list_section_types. Nothing goes live until the page is published.
create_custom_pageno gate
Create a new slug-addressed marketing/landing page (page_type "custom") as a draft, optionally seeded with sections [{type, settings?}] and SEO {title, description}. NOTE: custom pages render only on themes that support composition custom pages — always verify with preview_page / fetch_page_html after creating. RESERVED slugs are refused: _next, about, account, addresses, admin, api, blog, cart, categories, category, checkout, contact, edit, faq, home, index, invoice, listing, listings, locations, login, logout, order, orders, preview, search, subscriptions, team. Login, the customer account pages (account, orders, order, subscriptions, addresses, invoice, logout) and checkout/cart are platform-owned — the same on every store, whoever builds the site — so a custom page can never replace or imitate them (the storefront also refuses any page under those paths); the rest are the store's built-in pages.
set_page_seono gate
Set a page's SEO metadata (title / description / og_image_url / canonical_url) on its draft. Pass null to clear a key. Applies where the storefront reads page metadata (custom pages; forward-compatible elsewhere).
set_content_fieldno gate
Set one theme content field (from get_content_fields) as a draft override — copy, image URLs, etc. To discard a draft use clear_content_field.
clear_content_fieldno gate
Discard one content field's draft override — the field falls back to its live value (or the theme default). The live site is untouched.
upload_imageno gate
Upload a local image file to the store's media storage; returns the public URL to use in hero images / content fields / blog posts.
set_navigationno gate
Replace the site's primary or footer navigation with a custom menu (a complete, ordered item list — it fully overrides the derived default). Saved as a draft content field; pass items: null to remove the custom menu and return to the automatic navigation.
set_merchant_conceptno gate
Save a draft of one Merchant Model concept (brand, story, value_proposition, contact…). Field ids are validated against the live concept catalog (see get_merchant_concepts).
discard_page_draftno gate
Delete a page's draft composition, reverting the editor view to the published version (or the blueprint default). Does not touch the live site.
list_content_itemsno gate
The store's content-library items that data-bound sections render. Kinds: ….
preview_pageno gate
Start an owner-authorized preview session and return a URL that renders the site WITH all current drafts. The URL is short-lived (~1h) and only works for this merchant's site.
fetch_page_htmlno gate
Fetch a page of THIS store's site and return its title, meta description, and readable text — the agent's eyes for verifying an edit. draft:true (default) renders current drafts via a preview session; draft:false fetches the public live page.
get_business_dashboardno gate
The store's operating snapshot: pending confirmations, upcoming bookings, 30-day net revenue vs prior 30 days, needs-attention counts (failed refunds, failing subscriptions), auto-released orders. Null values mean that read failed — never treat as zero.
get_business_analyticsno gate
Business analytics for a 7/30/90-day window vs the previous window: revenue (net = gross - refunds, plus gross_minor, refunded_minor and subscription-attributed), order counts, active subscriptions, new customers, top 5 customers by revenue net of refunds. A refund never cancels an order: orders.cancelled counts cancellations only, and orders.refunded / orders.partially_refunded count orders by payment status, whatever their order status.
list_transactionsno gate
The money ledger, most recent first: one row per capture and one per refund (negative amount, dated when it was refunded — so a refund of an older payment still shows), with order number and listing title. provider/method say how the money moved: razorpay = online (a refund went back to the customer's original payment method); manual = paid in person (a refund is money the store returned itself and recorded, returned_via cash | upi | bank_transfer | other). Read-only.
list_ordersno gate
Orders by view: pending (confirmation-window-aware), scheduled (confirmed, soonest first), completed, cancelled (excl. auto-released), auto_released. A refund never changes an order's status, so a refunded order stays in its view (scheduled, completed, …) and cancelled means cancelled, not refunded. Each order carries payment_status — paid | partially_refunded | refunded | none (nothing captured: unpaid, pay after service or free; a cancelled order with nothing captured owes nothing (label Not paid), so never tell the merchant it is payable) — with a label and captured_minor / refunded_minor, from all of its payments.
get_orderno gate
One order in full: status, snapshot, customer, schedule, plus its money (payment): payment_status — paid | partially_refunded | refunded | none, from ALL of its payments; a refund never changes the order's status — with captured / refunded / refundable totals (refundable = captured - refunded; a refund still in flight at Razorpay is not subtracted), a breakdown by method (online via Razorpay vs paid in person) and every payment with its refunds. refund_status (none | partial | full | not_applicable) is the same answer in the old vocabulary. payment is null only when the payments read failed (unknown, never unpaid). Read-only: refunds are made in the Seller App.
list_bookingsno gate
Confirmed bookings in a time range (ISO timestamps; defaults to the next 7 days) — the calendar view, soonest first, with customer and attendance.
list_customersno gate
Customers, most recently active first: contact, lifetime value, first/last order timestamps.
get_customerno gate
One customer in full: profile, addresses, 20 most recent orders, loyalty coins (available to spend now, balance, and the soonest expiry).
list_subscriptionsno gate
Customer subscriptions (optionally by state: active, cancelled, failed, ended) with cycle counters and customer contact.
get_subscriptionno gate
One subscription in full plus its last 24 billing cycles.
list_listingsno gate
The store's listings (services/products/projects), optionally by status: draft, active, inactive.
get_listingno gate
One listing in full (pricing, media, booking/subscription config, SEO).
create_listingno gate
Create a listing as a DRAFT — invisible to customers, so always allowed. kind (bookable_service | digital_product | project) is immutable after creation. Activation (status: active) goes through update_listing under the commerce gate.
list_commerce_itemsno gate
Store structure items. Kinds: ….
list_promotionsno gate
The store's promotions (discounts, coupon codes) with status and usage counts.
list_merchant_notificationsno gate
The merchant's own notification feed (order events, payment events…), newest first.
get_business_configno gate
The store's operating configuration in one read: business hours, booking window, confirmation window (read-only), locale, smart defaults, checkout settings (incl. total_rounding: off | up | down), tax details, social accounts, contact form, profile, SEO.

Refused unless the merchant sets MECSTO_MCP_ALLOW_COMMERCE=true in the server config and restarts it.

update_listingcommerce
Update a listing — LIVE effect (price/status changes are instantly public), so it requires MECSTO_MCP_ALLOW_COMMERCE=true. kind is immutable; the slug locks after first publish. A digital_product goes active (or stays active through a listing_data change) only with a working file or link attached — the MCP can't attach one; that's done in the Mecsto seller app. Subscriptions can be turned on or off on any listing except a recurring series, with subscription_mode: 'none' (one-time only), 'only' (subscription only) or 'both' (the customer picks at checkout); is_subscription follows it. Existing subscribers keep the terms frozen at signup (price, cadence, series day/time) — subscription edits apply to new subscribers only. Only the fixed pricing model (listing_data.pricing_model) can be sold as a subscription — not free, custom, advance, bundle or pay_after (a subscription is charged before each cycle, never after the service). Turning subscriptions on needs subscription_frequency, subscription_interval (Repeat every: a whole number ≥ 1) and subscription_price_minor; checkout refuses a 'custom' frequency on a subscription (recurring series aside), so use daily, weekly, monthly or yearly. A recurring series (a bookable_service whose listing_data.recurrence is set) is the exception: checkout always sells it as a subscription, billing subscription_price_minor for every session, so it must keep subscription_mode 'only', pricing_model 'fixed' and all three subscription fields — to stop selling one, set status 'inactive'. A listing_data edit that makes a listing a series (or publishing a series draft) must send subscription_mode 'only', subscription_frequency, subscription_interval 1 and subscription_price_minor in the same update. A bookable_service with active subscriptions can't become, or stop being, a recurring series; listing_data replaces the whole object, so send recurrence back with any listing_data edit to a series.
delete_listingcommerce
Soft-delete a listing — removes it from the storefront immediately and there is NO undelete. Requires MECSTO_MCP_ALLOW_COMMERCE=true.
save_commerce_itemcommerce
Create (no id) or update (with id) a category, location, or blocked_time. Live-effect on the store — requires MECSTO_MCP_ALLOW_COMMERCE=true. category: {name, description?, is_active?} · location (one of the store's physical places; the first one, and any saved with is_primary: true, is the main location = the business address the store's contact address follows): {address1, name?, address2?, city?, state?, postal_code?, country?, contact_phone?, contact_email?, hours? (null = store hours, or 7 business-hours entries), is_primary?: true, show_on_website?, position?} — owner/admin only · blocked_time: {type full_day|custom_time, start_date, end_date, start_time?, end_time?}.
set_listing_locationscommerce
Offer a bookable_service at the store's locations ("At my location" in the seller app): replaces the listing's set, in order; [] removes all. Ids come from list_commerce_items {kind: "location"}. LIVE effect (customers pick among them at checkout, and each location's own hours decide its slots), so it requires MECSTO_MCP_ALLOW_COMMERCE=true.
delete_commerce_itemcommerce
Soft-delete a category, location, or blocked_time (no undelete). Requires MECSTO_MCP_ALLOW_COMMERCE=true.
save_promotioncommerce
Create (no id) or update (with id) a promotion — LIVE the moment its status is active, so it requires MECSTO_MCP_ALLOW_COMMERCE=true. Fields: type (direct_discount|coupon_code; buy_x_get_y can't be created — checkout doesn't apply it), name, status (active|paused|ended), code? (saved in capitals; letters, numbers, - and _ only; 16 max), discount_method (automatic|code), discount_value_type (percentage|flat), discount_value (flat = rupees), valid_from?, valid_till? (not before valid_from), config? (replaces the whole config on update). config keys: discountName; limitCodeUsage (bool) + setLimit (whole number of uses); conditionType "minimum_order_amount" + conditionValue (rupees) or null for no condition — there is no cart, so no quantity condition. Collection scope (applyTo "specific-collection") and eligibilityTo are refused: checkout applies every offer to every listing and customer.
update_business_configcommerce
Update ONE config section (sibling-preserving; sections: …). Live-effect (hours gate availability, tax details change displayed prices, checkout.total_rounding "off" | "up" | "down" rounds every order total) — requires MECSTO_MCP_ALLOW_COMMERCE=true. The confirmation window and notification preferences are deliberately not writable here.

Refused unless the merchant sets MECSTO_MCP_ALLOW_OPERATIONS=true in the server config and restarts it.

confirm_orderoperations
Confirm a pending order (pending → confirmed; syncs the merchant calendar). Customer-facing — requires MECSTO_MCP_ALLOW_OPERATIONS=true. If the store has delegated confirms under a cap (stores.meco_delegated_confirm_cap_minor > 0), this runs through Meco's governed path: the kernel decides, the cap applies, and a provenance run is recorded. Otherwise it uses the merchant's own confirm. The result says which ran.
cancel_orderoperations
Cancel an order — IRREVERSIBLE (a cancelled order can never be confirmed; a booking's slot is freed). Cancelling does NOT refund, and refunding does not cancel: they are separate actions. Money the order holds stays captured until the store's owner or admin refunds it in the Seller App (refunds are not exposed via MCP). Returns the order's payment_status and refundable_minor (with a by-method breakdown) so you can tell the merchant what is left to refund. Requires MECSTO_MCP_ALLOW_OPERATIONS=true.
fulfill_orderoperations
Mark a confirmed order completed (terminal state). Requires MECSTO_MCP_ALLOW_OPERATIONS=true.
request_rescheduleoperations
Ask the customer to move a pending or confirmed booking to a new time. The booking does NOT move: the customer is emailed an Accept / Decline link and the time changes only if they accept (the seat is re-checked then). One open request per order; the proposed time must be in the future and not the current one. Give new_scheduled_at as a full ISO-8601 timestamp WITH its offset (e.g. 2026-10-20T15:00:00+05:30). Returns request_id (for withdraw_reschedule_request). Requires MECSTO_MCP_ALLOW_OPERATIONS=true.
withdraw_reschedule_requestoperations
Withdraw a reschedule request that is still waiting for the customer's answer. The booking keeps its time. Requires MECSTO_MCP_ALLOW_OPERATIONS=true.
mark_attendanceoperations
Record attendance for a bookable order (attended | no_show) — a re-markable fact, not a status change. Requires MECSTO_MCP_ALLOW_OPERATIONS=true.

Refused unless the merchant sets MECSTO_MCP_ALLOW_PUBLISH=true in the server config and restarts it.

save_content_itempublish
Create (no id) or update (with id) one content-library item. blog_post: {title, content(HTML), status draft|live, image_url?, author?, read_time?} · testimonial: {customer_name (≤60 chars), testimonial (≤300 chars), logo_url} · announcement: {announcement, link? — optional; a site path like "/services" or a web address, null for none} · faq: {question, answer, sort_order?}. CONSENT NOTE: these tables have NO draft layer — announcement/testimonial/faq writes (and any blog write except creating a status:'draft' post) change the LIVE public site immediately, so they require MECSTO_MCP_ALLOW_PUBLISH=true. Ungated, you can still draft blog posts freely.
delete_content_itempublish
Soft-delete one content-library item by id (every kind uses deleted_at, mirroring the Seller App). Removes LIVE public content immediately, so it requires MECSTO_MCP_ALLOW_PUBLISH=true.
publish_pagepublish
Publish a page's draft composition to the LIVE site (atomic draft→published swap). Requires MECSTO_MCP_ALLOW_PUBLISH=true on this server.
publish_content_fieldspublish
Publish draft content-field overrides (including navigation.*) to the LIVE site — atomic, with audit history. Store OWNER only. Requires MECSTO_MCP_ALLOW_PUBLISH=true.
publish_merchant_conceptspublish
Publish draft Merchant Model concepts to the LIVE site. Requires MECSTO_MCP_ALLOW_PUBLISH=true.