Skip to main content
The Subtotal Data MCP provides three tools for exploring and querying your purchase data.

ask

Ask a natural language question about your purchase data. The server translates it into SQL and returns the results — no SQL knowledge required. Parameters: Example questions:
  • “Show me the top 5 retailers by purchase count this year”
  • “How many active connections do I have?”
  • “What are my highest-value purchases from the last 30 days?”
  • “Which brands appear most frequently in my items?”
Response format:
Constraints:
  • Questions must be plain English — embedded SQL will be rejected
  • Only SELECT queries are generated — your data is never modified
  • Results are limited to 100 rows and 5 MB
  • A 5-second execution timeout is enforced
If the question cannot be answered with the available data, or the generated query fails, the response will contain an error field:
Other possible errors include request timeouts and response size limits.
ask uses an AI model to translate your question into SQL. For best results, be specific about the data you want, time ranges, and how results should be grouped or sorted. To inspect the data model itself (entities, fields, relationships), use get_data_model instead.

get_retailers

List the retailers available to your account as structured rows. By default returns only the retailers enabled for your team (each with a Subtotal Link URL); pass include="all" to list every active retailer in the catalog, annotated with whether it’s enabled for your team. Parameters: Response format:
Fields:
This is the same retailer contract returned by the public GET /retailers API. With include="all", link_url is null for retailers not enabled for your team.

get_data_model

Returns the data model for your purchase data, including entities, fields, types, and relationships. Parameters: None Returns: A plain-text data model describing six entities: connection, purchase, item, retailer, product, and brand.
If you’re using ask, you typically don’t need to call get_data_model — the server already has the data model when answering questions.