All docs
Reference

SHOPLINE tools: every read and write tool the agent and MCP can call

TL;DR

20 read and 11 write tools. Read and write support for the operations listed.

Support and limitations

  • Read and write support for the operations listed.
  • Permissions: the connected login's role and the permissions it granted decide what each tool can read or change. A tool the login cannot use answers with what is missing; it never works around it.
  • Approvals: in the app, changes wait for approval unless the task runs with auto-approve. Over MCP and REST they follow the credential's setting (an API key applies ordinary changes at once unless it is set to require approval; a third-party OAuth connection waits). 4 writes are marked “Person approves”: they wait for a person on every lane — only the workspace's own OAuth app and an API key an admin set to apply changes you can't take back skip that wait. Forbidden Rules can block any of them.
  • Operations the platform's API does not offer, and operations not in the catalog, are not available through these tools.

Read tools (20)

ToolWhat it does
shopline__get_shop_infoSHOPLINE store metadata (merchants/shop.json): name, currency, timezone — cheap connection health check + report header
shopline__sales_summarySHOPLINE SALES SUMMARY: server-side exact aggregation over orders in a window (sinceDays, default 30) — revenue, netRevenue, order count, AOV, by-day…
shopline__sales_reportSHOPLINE's OWN sales report (report/query_sales.json — the engine behind the merchant's admin 销售结果报告), with the store's OWN attribution capture: group by…
shopline__graphqlGraphQL Admin READ — the objects REST cannot reach: discountNodes, collections, companies…
shopline__graphql_shopSHOPLINE store via GraphQL Admin (shop): id, name, handle, currencyCode, ianaTimezone — the zone and currency SHOPLINE's sales are read in; flags a mismatch…
shopline__graphql_productsSHOPLINE PRODUCTS via GraphQL Admin, all pages walked (truncated + reason when a cap stops it; partial + errors on field errors): id, restId, title, handle,…
shopline__graphql_customersSHOPLINE CUSTOMERS via GraphQL Admin, all pages walked: id, state, tags, orders count, amountSpent (MAJOR + currency), dates.
shopline__detect_anomaliesSHOPLINE anomaly check: judges recent daily ORDERS + REVENUE against a weekday-aware baseline (store currency; no-order days are true zeros; days and the…
shopline__get_ordersSHOPLINE ORDERS via Admin REST: totals, financial/fulfillment status, line items, store currency PLUS per-order attribution (channel / referrer /…
shopline__get_productsProducts w/ price range + inventory (limit ≤50; status active/draft/archived)
shopline__admin_getAdmin get
shopline__get_customersSHOPLINE CUSTOMERS (customers/v2/search.json — the documented path): id, orders count, total spent (MAJOR units, store currency), state, tags, created date.
shopline__list_locationsThe store's LOCATIONS (locations.json) — the location_id every inventory write needs.
shopline__get_inventory_levels"available" per location + variant_id (read_inventory); item ids are each variant's inventory_item_id
shopline__list_discount_codesDiscounts on the store (GraphQL discountNodes): code and automatic discounts with title, status, startsAt / endsAt, usageLimit, times used, the first codes…
shopline__get_landing_urlA UTM-tagged storefront URL on the store's domain (merchants/shop.json) — existing params kept…
shopline__abandoned_checkoutsSHOPLINE ABANDONED CHECKOUTS (orders/abandoned_orders.json), every page walked (≤ 2,000, truncated said), AGGREGATES only — no shopper data: count, value…
shopline__marketing_eventsThe store's MARKETING EVENTS (sales/marketing_events.json): type, channel, UTM, dates, remote id, description (untrusted) + counts by type / channel; per…
shopline__returns_summarySHOPLINE RETURNS (return.json — one order per call; no list by date): count, byStatus (OPEN / CLOSED), reason codes, returned quantity, top returned…
shopline__list_marketsThe store's MARKETS (markets.json): id, name, enabled, primary, regions (country + order currency), base / local currency settings, price adjustment,…

Write tools (11)

A write marked “Person approves” waits for a person on every lane; the others follow the approval setting of the app or the credential.

ToolApprovalWhat it does
shopline__admin_mutateApproval settingSHOPLINE Admin REST WRITE gateway (token needs matching write_* scopes): method POST/PUT/DELETE + path + payload — product/order/inventory changes……
shopline__graphql_mutateApproval settingSHOPLINE GraphQL Admin MUTATION gateway (token needs matching write_* scopes): a mutation document + variables — discounts, collections, customers,…
shopline__create_discount_codeApproval settingWrite_discounts): discountCodeBasicCreate (the same input as Shopify's), idempotent 15 min;
shopline__update_discount_codeApproval settingWrite_discounts): discountCodeBasicUpdate, read first; endsAt now / past or startsAt in the…
shopline__set_discount_code_statusPerson approvesActivate or deactivate a code discount.
shopline__delete_discount_codePerson approvesDelete a code discount and its redemption history (discountCodeDelete).
shopline__update_inventoryApproval settingWrite_inventory): SHOPLINE has no delta call — ALL pairs are READ first…
shopline__set_inventoryPerson approvesWrite_inventory), person: an absolute overwrite — every pair is read first…
shopline__update_productApproval settingEdit a product's scalar fields, read first.
shopline__update_variant_pricesPerson approvesCatalog repricing): set price and/or compareAtPrice on up to 100 variants of ONE product by id (GraphQL productVariantsBulkUpdate), MAJOR units.
shopline__create_marketing_eventApproval settingRecord an external ad campaign as a SHOPLINE MARKETING EVENT so the store's own reports can attribute orders to it.

Authorized raw requests

shopline__raw_request takes a request in SHOPLINE's own format and routes it through the family's own gateway tool, so the same account binding, approvals and refusals apply. It needs the tools:raw scope (and tools:write for a change) and is found through search_tools or the REST tool list. Reads run at once; a change follows the gateway's approval setting.

Frequently asked questions

How many SHOPLINE tools are there?
31: 20 read and 11 write, of which 4 always wait for a person. The list on this page is the complete catalog for SHOPLINE.
Can an agent call the SHOPLINE API directly?
shopline__raw_request takes a request in SHOPLINE's own format and routes it through the family's own gateway tool, so the same account binding, approvals and refusals apply. It needs the tools:raw scope (and tools:write for a change) and is found through search_tools or the REST tool list. Reads run at once; a change follows the gateway's approval setting.
Use the SHOPLINE tools

Run them through the in-app agent, or call them from Claude, ChatGPT, Codex or Cursor over the hosted MCP server.