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)
| Tool | What it does |
|---|---|
shopline__get_shop_info | SHOPLINE store metadata (merchants/shop.json): name, currency, timezone — cheap connection health check + report header |
shopline__sales_summary | SHOPLINE SALES SUMMARY: server-side exact aggregation over orders in a window (sinceDays, default 30) — revenue, netRevenue, order count, AOV, by-day… |
shopline__sales_report | SHOPLINE'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__graphql | GraphQL Admin READ — the objects REST cannot reach: discountNodes, collections, companies… |
shopline__graphql_shop | SHOPLINE 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_products | SHOPLINE 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_customers | SHOPLINE CUSTOMERS via GraphQL Admin, all pages walked: id, state, tags, orders count, amountSpent (MAJOR + currency), dates. |
shopline__detect_anomalies | SHOPLINE 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_orders | SHOPLINE ORDERS via Admin REST: totals, financial/fulfillment status, line items, store currency PLUS per-order attribution (channel / referrer /… |
shopline__get_products | Products w/ price range + inventory (limit ≤50; status active/draft/archived) |
shopline__admin_get | Admin get |
shopline__get_customers | SHOPLINE CUSTOMERS (customers/v2/search.json — the documented path): id, orders count, total spent (MAJOR units, store currency), state, tags, created date. |
shopline__list_locations | The 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_codes | Discounts on the store (GraphQL discountNodes): code and automatic discounts with title, status, startsAt / endsAt, usageLimit, times used, the first codes… |
shopline__get_landing_url | A UTM-tagged storefront URL on the store's domain (merchants/shop.json) — existing params kept… |
shopline__abandoned_checkouts | SHOPLINE ABANDONED CHECKOUTS (orders/abandoned_orders.json), every page walked (≤ 2,000, truncated said), AGGREGATES only — no shopper data: count, value… |
shopline__marketing_events | The store's MARKETING EVENTS (sales/marketing_events.json): type, channel, UTM, dates, remote id, description (untrusted) + counts by type / channel; per… |
shopline__returns_summary | SHOPLINE RETURNS (return.json — one order per call; no list by date): count, byStatus (OPEN / CLOSED), reason codes, returned quantity, top returned… |
shopline__list_markets | The 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.
| Tool | Approval | What it does |
|---|---|---|
shopline__admin_mutate | Approval setting | SHOPLINE Admin REST WRITE gateway (token needs matching write_* scopes): method POST/PUT/DELETE + path + payload — product/order/inventory changes…… |
shopline__graphql_mutate | Approval setting | SHOPLINE GraphQL Admin MUTATION gateway (token needs matching write_* scopes): a mutation document + variables — discounts, collections, customers,… |
shopline__create_discount_code | Approval setting | Write_discounts): discountCodeBasicCreate (the same input as Shopify's), idempotent 15 min; |
shopline__update_discount_code | Approval setting | Write_discounts): discountCodeBasicUpdate, read first; endsAt now / past or startsAt in the… |
shopline__set_discount_code_status | Person approves | Activate or deactivate a code discount. |
shopline__delete_discount_code | Person approves | Delete a code discount and its redemption history (discountCodeDelete). |
shopline__update_inventory | Approval setting | Write_inventory): SHOPLINE has no delta call — ALL pairs are READ first… |
shopline__set_inventory | Person approves | Write_inventory), person: an absolute overwrite — every pair is read first… |
shopline__update_product | Approval setting | Edit a product's scalar fields, read first. |
shopline__update_variant_prices | Person approves | Catalog repricing): set price and/or compareAtPrice on up to 100 variants of ONE product by id (GraphQL productVariantsBulkUpdate), MAJOR units. |
shopline__create_marketing_event | Approval setting | Record 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.
Related pages
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.