MMecsto developers

Docs AI & MCP Tool reference

Tool reference

All 55 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. 27 tools are available as soon as the merchant signs in. The remaining 28 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.
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.
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).
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: net revenue (+ subscription-attributed), order counts, active subscriptions, new customers, top 5 customers by revenue.
list_transactionsno gate
The money ledger: one row per capture and one per refund (negative amount), with order number and listing title. Read-only.
list_ordersno gate
Orders by view: pending (confirmation-window-aware), scheduled (confirmed, soonest first), completed, cancelled (excl. auto-released), auto_released.
get_orderno gate
One order in full: status, snapshot, customer, schedule, plus payment + refund summary.
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 balance.
list_subscriptionsno gate
Customer subscriptions (optionally by state: active, cancelled, failed, ended) with cycle counters and customer contact.

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

get_subscriptioncommerce
One subscription in full plus its last 24 billing cycles.
list_listingscommerce
The store's listings (services/products/projects), optionally by status: draft, active, inactive.
get_listingcommerce
One listing in full (pricing, media, booking/subscription config, SEO).
create_listingcommerce
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.
update_listingcommerce
Update a listing — LIVE effect (price/status changes are instantly public), so it requires MECSTO_MCP_ALLOW_COMMERCE=true. kind and is_subscription are immutable; the slug locks after first publish.
delete_listingcommerce
Soft-delete a listing — removes it from the storefront immediately and there is NO undelete. Requires MECSTO_MCP_ALLOW_COMMERCE=true.
list_commerce_itemscommerce
Store structure items. Kinds: ….
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: {name, type physical|online|phone|custom, address/city/contact fields…} · blocked_time: {type full_day|custom_time, start_date, end_date, start_time?, end_time?}.
delete_commerce_itemcommerce
Soft-delete a category, location, or blocked_time (no undelete). Requires MECSTO_MCP_ALLOW_COMMERCE=true.
list_promotionscommerce
The store's promotions (discounts, coupon codes) with status and usage counts.
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|buy_x_get_y|coupon_code), name, status (active|paused|ended), code?, discount_method (automatic|code), discount_value_type (percentage|flat), discount_value, valid_from?, valid_till?, config?.
list_merchant_notificationscommerce
The merchant's own notification feed (order events, payment events…), newest first.
get_business_configcommerce
The store's operating configuration in one read: business hours, booking window, confirmation window (read-only), locale, smart defaults, checkout settings, tax details, social accounts, contact form, profile, SEO.
update_business_configcommerce
Update ONE config section (sibling-preserving; sections: …). Live-effect (hours gate availability, tax details change displayed prices) — 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). NOTE: cancelling does NOT refund — for a paid order the money stays captured until the merchant refunds manually in the Seller App (refunds are not exposed via MCP). Requires MECSTO_MCP_ALLOW_OPERATIONS=true.
fulfill_orderoperations
Mark a confirmed order completed (terminal state). Requires MECSTO_MCP_ALLOW_OPERATIONS=true.
reschedule_orderoperations
Reschedule a confirmed booking to a new ISO timestamp; notifies the customer by default and re-syncs the calendar. 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.

discard_page_draftpublish
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_itemspublish
The store's content-library items that data-bound sections render. Kinds: ….
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, testimonial, logo_url} · announcement: {announcement, link} · 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.
preview_pagepublish
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_htmlpublish
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.
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.