whoami
Confirm which Django/OAuth actor the MCP request is running as.
- Arguments
- None.
- Returns
- Actor email and authentication context.
- Side effects and notes
- None.
This MCP server is fast and powerful because it uses the GrowthPath App Server's cached Cin7 Core (Dear) data to let AI assistants search orders, products, customers and stock in ways that are not practically possible through the Dear API alone.
It provides read-only searches, selected summary reports and integration-job diagnostics. Results reflect the cached data, not necessarily the current state in Cin7 Core. A cached stock check is not a live availability guarantee. This release does not expose tools for changing Cin7 Core records. Broader historical analytics are available through GrowthPath's separate analytics reporting module.
New to MCP? Model Context Protocol (MCP) is a standard way for AI assistants to connect to business systems. An MCP server makes selected data and tools available to a connected assistant, so you can ask questions in ordinary language instead of looking up each record yourself. Read Cloudflare's introduction to MCP and MCP servers for an overview of how it works and the security considerations.
https://statusanxiety.growthpath.com.au/mcp-dearmcp_dear.readhttps://statusanxiety.growthpath.com.au/.well-known/oauth-protected-resource/mcp-dearhttps://statusanxiety.growthpath.com.aumcp group, or a superuser; staff status alone is insufficient.Configure the Cin7 Core (Dear) Operations MCP server.
Server URL: https://statusanxiety.growthpath.com.au/mcp-dear
Transport: Streamable HTTP
Preferred authentication: MCP OAuth (authorization code with PKCE S256).
Requested scope: mcp_dear.read
Protected-resource metadata URL: https://statusanxiety.growthpath.com.au/.well-known/oauth-protected-resource/mcp-dear
Authorization server: https://statusanxiety.growthpath.com.au
Sign in as an active Django user in the mcp group or a superuser.
Review the client, callback origin, resource and scope before approving access.
Manual fallback: Authorization: Token <token key> (a Django REST Framework token, not a Dear API key).
Store credentials only in the client's approved secret or credential store, never in chat, logs or source control.
This server exposes read-only cached data, not live stock guarantees or record mutations.
Use the MCP endpoint, not the documentation page. A local documentation preview does not verify a local MCP transport.
Select and copy the text manually if clipboard access is unavailable.
Prefer OAuth. For clients without OAuth, use a Django REST Framework token through an approved credential store; see Manual API Token Setup. Never paste credentials into an AI conversation.
Authorization: Token <token key>, or a bare token value for clients such as Microsoft Copilot Studio;
runtime namespace scoping;
pre-authentication throttling; per-token rate limiting; read-only cache and product-availability tools;
summarized job-log queries; and allowlisted read-only or dry-run harness execution. Only read-only and dry-run
paths are documented here.
/mcp_dear_documentation/ is this human-readable
documentation page. Do not enter the documentation URL in an MCP client. Configure MCP clients
with https://statusanxiety.growthpath.com.au/mcp-dear, which uses /mcp-dear. A 401 response from
/mcp-dear with a WWW-Authenticate
header is expected before OAuth authentication.
Desktop agents that support MCP OAuth should be configured with the MCP server URL below and allowed to complete
the browser-based OAuth login. The client should discover this server's protected-resource metadata from the
WWW-Authenticate challenge or from the well-known metadata path on the same host as the MCP endpoint.
https://statusanxiety.growthpath.com.au/mcp-dearhttps://statusanxiety.growthpath.com.au/.well-known/oauth-protected-resource/mcp-dearhttps://statusanxiety.growthpath.com.auS256 and dynamic public-client registration.mcp_dear.read
The user who signs in through OAuth must be an active Django user authorized for MCP access: either a superuser or
a member of the Django auth group named mcp. Do not paste OAuth access tokens, refresh tokens,
authorization codes, or DRF token keys into normal chat messages.
After signing in, review the client name, callback origin, requested resource and scopes, then choose Allow access or Cancel. Only approve a connection you started and recognise. Opening the authorization link alone does not grant access. Each authorization requires a new review; the review expires after 10 minutes and a newer review in the same browser replaces the previous one.
OAuth access tokens are intentionally time-limited. Clients that support OAuth refresh should keep refresh tokens only in their approved credential store, use them to get fresh access tokens, and replace the stored refresh token whenever the token endpoint returns a rotated value. If a client cannot refresh automatically, re-run the browser-based OAuth authorization flow rather than copying tokens through chat or logs.
Refresh tokens are stored server-side only as hashes. Administrators can revoke stored refresh tokens in Django admin without seeing the plaintext token value.
Use this path for MCP clients that cannot complete the OAuth flow. The preferred complete header is
Authorization: Token <token>. A bare token header,
Authorization: <token>, is also accepted for clients such as Microsoft Copilot Studio that configure
the header name and secret value separately but cannot prepend the Token scheme. The token is the key
from Django REST Framework's Token model, stored in the Django database and managed in Django admin.
It is not a Dear API key.
mcp, or by making it a superuser.
Staff status alone does not authorize MCP access.
key value is the token used by the MCP client. Modifying this table requires the
appropriate Django admin permission and is normally restricted to superusers.
Authorization: Token <token key> on every MCP request. If the
client cannot prepend an authentication scheme, configure the same header as
Authorization: <token key>.
MCP_DEAR_ALLOWED_ACTOR_EMAIL is not required for read-only MCP access. Access is based on the Django user
linked to the supplied DRF token: the user must be active and either in the mcp group or a superuser.
Authorization is also scoped by namespace and Dear instance configuration. Tools can only read the object types and run the read-only or dry-run harnesses explicitly allowed for the runtime namespace.
These object-type permissions also apply to dedicated lookups, stock availability, recent sales, transaction reads and operation planning, not just generic cache searches.
Most tools accept an optional entity argument. If this deployment exposes only one Dear instance, omit
entity and the MCP server will use that instance automatically. If multiple instances are exposed, the
server will reject ambiguous requests and list the allowed entity values. Use list_queryable_object_types
to discover the enabled cached object types and accepted filter keys before calling
search_cached_objects.
MCP client setup differs between tools such as Claude Desktop, Codex-style coding tools, and other MCP-enabled
assistants, so this page documents the stable protocol values rather than tool-specific click paths. Prefer OAuth
when the client supports it. You can give an MCP-enabled assistant this documentation URL and ask it to read the
page and configure the server, but do not paste the DRF token into an ordinary chat prompt.
If your client asks for a server name, choose a local label such as cin7-mcp; that label is not a
server-side identifier and does not prove the connection is installed. Verify the client lists the MCP server,
then complete the client's OAuth authentication flow. For Claude Desktop, a restart may be required after changing
MCP configuration. For Claude Code, see
Claude MCP Quickstart.
https://statusanxiety.growthpath.com.au/mcp-dearmcp_dear.read./mcp_oauth/status/ reports issuer, resource metadata, and token lifetimes.Authorization: Token <token key>Authorization, value <token key>.Token model in Django admin.Enter the token only through the client's approved secret, environment-variable, credential, or HTTP-header configuration mechanism. If a client cannot store the token outside normal chat history, shared configuration, logs, or source control, do not connect that client until a safer setup path is available.
In the Codex web app, create a new app using this deployment's MCP server URL,
https://statusanxiety.growthpath.com.au/mcp-dear, and OAuth.
Equipped Dear MCP or Cin7 Dear MCP.https://statusanxiety.growthpath.com.au/mcp-dear.| Namespace | Dear Instances | Read Object Types | Allowed Harnesses |
|---|---|---|---|
statusanxiety |
statusanxiety_2023 | orders, sale_credits, sale_credits_stand_alone, account_metadata, accounts, payment_terms, tax_rules, purchase_orders, products, product_families, product_movements, customers, suppliers, locations, carriers, finished_goods, disassemblies, stock_transfers, stock_adjustments | None |
dear://meta/serverdear://instance/{entity}dear://catalog/object-typesdear://catalog/object-type/{object_type}dear://catalog/jsonb-searchdear://typed-dict/{typed_dict_name}dear://typed-dict/{typed_dict_name}/json-schemadear://harness/{harness_name}dear://job-log-guideThe tools below are the callable API surface exposed by the Cin7/Dear MCP server. Use discovery tools first to resolve the namespace, entity, object type, accepted filters, and safety limits before calling data or diagnostic tools.
get_recent_sales for prompts like "most recent sales" or
"latest orders." Use get_sale_transactions only when the user asks for accounting transaction lines
from sales; it expands nested transaction JSON and is intentionally heavier.
Use get_sale_order_lines for order lines across multiple sales. Use
get_additional_attribute_sets to discover custom-field labels before selecting numbered fields.
whoamiConfirm which Django/OAuth actor the MCP request is running as.
list_dear_instancesList the Dear/Cin7 Core instances exposed to the current namespace.
describe_namespaceDescribe the runtime namespace and its configured Dear scope.
list_entitiesList Dear entity values that may be passed to scoped tools.
get_object_type_schemaFetch schema, selectable scalar fields, and search metadata for one cached object type.
list_queryable_object_typesList cached object types that can be searched in this namespace.
get_additional_attribute_setsDiscover cached additional-attribute set labels, types and numbered field paths.
describe_workflowExplain a curated Dear operational workflow.
get_cached_saleLook up one cached sale/order by order number.
get_cached_sale_collectionReturn one sale sub-collection without returning the full sale payload.
get_cached_productLook up one cached product by SKU.
get_cached_customerLook up one cached customer by name or GUID.
get_product_availabilityCheck cached product availability and stock by SKU, product, location, bin, or batch.
get_product_movementsReturn cached product movement rows for one SKU.
get_recent_salesReturn recent cached sale/order summaries newest-first by SaleOrderDate.
get_sale_order_linesRead projected cached sale order lines across sales, with optional numbered custom fields.
get_sale_invoicesRead cached invoice headers by invoice calendar date, including invoices on older orders.
get_sale_transactionsReturn flattened accounting transaction lines for cached sales in a bounded date range.
search_cached_objectsSearch allowlisted cached Dear object summaries with standard filters, bounded JSONB filters, and deterministic cursor or page-number pagination.
list_aggregate_reportsList allowlisted grouped or ranked reports.
run_aggregate_reportRun an allowlisted grouped or ranked read-only summary report.
run_aggregate_report_batchRead partial counts for a report with registered batch support, including products_by_status.
query_job_logsSearch summarized GrowthPath JobLog records for support diagnostics.
list_harnessesList diagnostic harnesses allowed for the current namespace.
get_harness_specFetch the full specification for one diagnostic harness.
run_harnessStart a controlled, allowlisted diagnostic harness run.
get_harness_run_statusCheck completion state for a previous harness run.
get_harness_run_logsFetch logs emitted by a previous harness run.
list_operationsList known operational workflows that can be inspected or planned.
describe_operationFetch the full specification for one operation.
validate_operationValidate operation arguments and entity scope before planning.
plan_operationBuild a dry-run plan for an allowlisted operation.
These examples are intended for n8n-style agents and other MCP clients that need a safe first tool choice before chaining additional steps. Treat them as guidance for read-only investigation and dry-run planning, not permission to perform arbitrary ERP mutations.
| Workflow | Best first tool | Likely follow-up | Safety class |
|---|---|---|---|
| Investigate one delayed order. | get_cached_sale |
query_job_logs for related sync or fulfilment activity. |
Read-only investigation. |
| Find stuck orders or status queues. | search_cached_objects |
get_cached_sale for one selected order. |
Read-only filtered search. |
| Check cached stock availability for a SKU. | get_product_availability |
get_cached_product for product master data. |
Read-only stock check. |
| Investigate unusual stock movements. | get_product_movements |
get_product_availability for cached stock state. |
Read-only movement review. |
| Support lookup for a customer. | get_cached_customer |
search_cached_objects for related cached orders. |
Read-only customer context. |
| Find a product or customer custom field by its business label. | get_additional_attribute_sets for products or customers. |
get_cached_product or get_cached_customer with
include_attribute_metadata=true to check the record's assigned set.
|
Read-only current cached definitions and assignments; not historical labels. |
| Read sale-order lines across a sale-date range. | get_object_type_schema for orders. |
get_sale_order_lines with approved fields; follow next_cursor
even after an empty page.
|
Read-only cached order lines; not an invoiced-revenue report. |
| Find sales or purchase orders by business date and part of a customer or supplier name. | list_queryable_object_types for accepted filters. |
search_cached_objects with date filters, customer_contains or
supplier_contains, and the matching business-date sort.
|
Read-only filtered search; not a cache-modification date search. |
| Check failed sync jobs or daily exception digests. | query_job_logs |
describe_workflow when an operator needs workflow context. |
Read-only diagnostics. |
| Prepare reconciliation evidence. | get_sale_transactions |
get_cached_sale_collection for payments or fulfilments on one sale. |
Read-only, heavier accounting query. |
| Run sales or stock summary reporting. | list_aggregate_reports |
Use the report's execution_tool: run_aggregate_report or
run_aggregate_report_batch. Follow its continuation and merge rules.
|
Read-only aggregate summary. |
| Find received quantities and dates for a purchase order. | get_object_type_schema for purchase_orders. |
search_cached_objects by order_number, requesting both
StockReceived.Lines and PutAway.Lines.
See receipt interpretation and limits.
|
Read-only receipt detail; do not count both stages as separate deliveries. |
| Read invoices or credits for a calendar month. | get_sale_invoices for invoice dates. |
search_cached_objects for both credit types with credit-date filters.
Follow all cursors. For net sales, subtract each authorised credit once.
|
Read-only document detail; do not sum different currencies. |
| Find product data cleanup candidates. | search_cached_objects |
get_cached_product for a selected SKU. |
Read-only filtered search. |
| Enumerate all matching cached object summaries. | search_cached_objects with a bounded limit. |
Repeat the same query with each returned next_cursor until has_more=false. |
Read-only paged cache search; not a stable snapshot. |
| Find purchase orders needing follow-up. | get_object_type_schema for purchase-order filter fields. |
search_cached_objects with supported filters. |
Read-only purchasing support. |
| Plan a safe operational change. | plan_operation |
validate_operation and human approval before any future execution path. |
Dry-run/planning only. |
| Support a 3PL fulfilment question for one sale. | get_cached_sale_collection |
Use collection=fulfilments, then query_job_logs if sync context is needed. |
Read-only fulfilment context. |
| Object Type | Lifecycle | Queryable By Default | Payload Type |
|---|---|---|---|
orders |
active | True | DearSale |
sale_credits |
active | True | SaleCreditNoteModelEnhanced |
sale_credits_stand_alone |
active | True | SaleCreditNoteStandAloneModel |
account_metadata |
active | True | Dear_Me |
accounts |
active | True | Account |
stock |
deprecated | False | UNSPECIFIED |
payment_terms |
active | True | PaymentTerm |
tax_rules |
active | True | TaxModel |
purchase_orders |
active | True | AdvancedPurchase |
products |
active | True | Product |
product_families |
active | True | ProductFamily |
product_availability |
deprecated | False | ProductAvailability |
hard_allocations |
deprecated | False | UNSPECIFIED |
hard_allocation_details |
deprecated | False | UNSPECIFIED |
transactions |
active | True | UNSPECIFIED_TRANSACTION_ROW |
product_movements |
active | True | Product |
customers |
active | True | DearCustomer |
suppliers |
active | True | SupplierModel |
locations |
active | True | Location |
carriers |
active | True | Carrier |
finished_goods |
active | True | FinishedGoods |
disassemblies |
active | True | Disassembly |
stock_transfers |
active | True | StockTransfer |
stock_adjustments |
active | True | StockAdjustment |
Collection tools return has_more. Tools that support page numbers accept a 1-based page.
Page-number traversal supports random access, but deep pages are less efficient and pages are not a stable
snapshot while cache refreshes run. Page-size ceilings reflect row cost: 1,000 for narrow summaries and stock
rows, 500 for sale lines and invoice headers, 250 for full harness log messages, and 100 for complete-aggregate
report rows. Nested cache collections have separate limits below. Source-batch reports consume source records,
not pages of complete aggregate results.
search_cached_objects returns at most 1,000 summary rows per call and defaults to 25. Set
sort_by to last_modified or object_uniqueID, and set
sort_direction to asc or desc. For orders, you can also sort by
sale_order_date; for purchase_orders, use order_date.
For sale_credits and sale_credits_stand_alone, use credit_note_date.
These business-date sorts use the document's calendar date, not its cache modification time. The default remains
last_modified desc; object_uniqueID is always used as the deterministic tie-breaker.
When has_more is true, call the tool again with next_cursor as the
cursor argument. Repeat the same object type, filters, entity, and any explicit sorting arguments.
Cursors are opaque, signed, and bound to that query and Dear account; clients must not inspect or modify them.
Alternatively, provide page for random access. Never provide cursor and page
together. get_product_availability supports the same two continuation modes.
get_sale_order_lines and get_additional_attribute_sets use cursors only, not page numbers.
Repeat the same query with next_cursor as cursor until has_more=false.
Sale-line reads default to 100 lines and allow at most 500 per call. Date-filtered calls examine at most 100
parent sales plus one parent-ID lookahead. Continue even when row_count=0 if a cursor is returned.
A sale with more than 500 lines continues from its original line position; duplicate SKUs remain separate lines.
Exact line counts are off by default. Attribute discovery defaults to 20 sets and allows at most 100 sets
(1,000 labels) per call. If its cached definitions change during traversal, restart discovery without a cursor.
total_count is the exact number of matching rows in the local Dear cache at the time of that call.
returned_count is the number in the current page. These counts are not live Cin7 Core totals, and pages
are not a stable snapshot while cache refreshes run. Without fields, returned rows are summaries; with
fields, they contain identity metadata plus the requested scalar values. Neither response contains a
complete cached Dear payload. Fetch dear://catalog/cached-object-search for the machine-readable contract.
For sequential traversal without an exact count, set include_total_count=false on
search_cached_objects. Counts and total pages are then null rather than estimates;
use has_more and next_cursor to continue. On get_product_availability,
set include_totals=false to omit both the matching count and stock totals.
These options avoid repeating whole-result calculations on every page. Defaults still include exact metadata.
Sale-transaction page-number traversal has a maximum row offset of 10,000. At 500 rows per page this permits
21 pages (10,500 rows); at the default 100 rows per page it permits 101 pages (10,100 rows).
Check pagination_truncated before treating a result as complete: remaining matches beyond the
accessible pages are not an empty result. Narrow the filters or use analytics reporting when this limit is reached.
Call list_aggregate_reports and use each report's execution_tool and
execution_mode. For products_by_status, the preferred tool is
run_aggregate_report_batch. Each call selects at most 501 source product records: it consumes at most
500 and uses one for lookahead. Filters apply within that source batch, so a call can scan records but return
rows=[]. Batching limits work per call; it does not guarantee that a call cannot time out.
batch_id. Count each ID once. If the current batch is retried,
replace its saved response instead of adding it again.
next_cursor as cursor while has_more=true, even if
rows is empty. An empty batch is not the end of the report.
batch_group_by and batch_sum_fields from discovery.
For products_by_status, sum product_count by status.
Sort the combined totals only after has_more=false.
Each response contains batch-local counts, not cumulative or complete totals. If traversal stops early, report partial coverage, not a complete total. Retrying an earlier batch requires discarding that batch and all later batches first. Cache changes between calls are accepted; the traversal is not a consistent snapshot.
A database statement timeout returns a structured error with error.code=query_timeout.
The failed call contributes no counts and advances no cursor. Follow only the recovery that the error advertises;
batching is registered per report, not automatically available for every slow query.
error.fallback, call its tool with its
arguments. Discard all previous complete-report pages and start the batch traversal without a
cursor. Do not combine complete-report rows with batch counts or retry the unchanged complete query.
error.retry.tool and error.retry.arguments to retry that
input cursor once. Keep earlier accepted batches. If the retry also times out, stop and seek support;
do not advance the cursor or count either failed call.
Discover purchase_orders with get_object_type_schema, then request both
StockReceived.Lines and PutAway.Lines through include_nested_collections.
Receipt representation depends on purchase type and Cin7 Core's Use put away setting.
Advanced Purchases can separate receiving from put-away. PutAway.Lines can contain receipt data
when StockReceived.Lines is empty, including for Simple Purchases. Do not infer the configuration
or absence of receipts from one empty collection, and do not add both stages as independent deliveries.
Inspect line Received, parent task Status, and PO status. A task status alone does not
prove receipt: Received=true identifies received lines, and a task can remain DRAFT
while put-away is pending. Line Date is the raw recorded receipt date, not an invoice date or proof
of when put-away was authorised. Report the source stage and missing dates. Verify the stage's meaning for the
workflow before calculating lead time. PO order_date_from/to filters select OrderDate,
not receipt dates. A partial receipt does not prove on-time-in-full delivery.
Expanded searches allow at most 25 parent documents and return at most 100 source slots per requested collection
per parent per call. Check source_state, source_complete, invalid counts and
unavailable_branch_counts; missing or invalid data is not zero. Source completeness describes
structure, not freshness or complete pagination. Before advancing the outer cursor, finish each parent's nested
pages: select that parent by object_uniqueID, request only the unfinished collection, and pass its
next_offset as nested_collection_offset. The maximum offset is 10,000; at a limit of
100, capacity is 101 pages and 10,100 source slots per parent collection. Check
pagination_truncated and matches_remain before reporting complete coverage.
The GrowthPath App Server stores cached Dear JSON documents in PostgreSQL. These tools support searching nested JSON fields without requiring the assistant to retrieve every complete document.
TypedDict resources are split into compact human-readable field lists and full JSON Schema resources. Use the
compact dear://typed-dict/{typed_dict_name} resource first, then fetch
dear://typed-dict/{typed_dict_name}/json-schema when a client needs required fields, nested object
definitions, literals, unions, array item schemas, or descriptions. TypedDict class docstrings become object
descriptions. Field descriptions are published when the annotation uses structured
Annotated string metadata; ordinary source comments are not parsed.
Before supplying fields to get_recent_sales or
search_cached_objects, call get_object_type_schema and use the exact, case-sensitive
paths from field_projection.selectable_fields. A request may select 1 to 20 scalar paths. Whole
objects, paths through arrays, and fields outside the MCP disclosure allowlist remain unavailable through field
projection; use a registered nested collection or dedicated collection tool instead.
For get_sale_order_lines, call get_object_type_schema with object_type=orders
and select from sale_order_lines.selectable_fields. Default line fields are ProductID,
SKU and Quantity. Select ProductCustomField1 through
ProductCustomField10 explicitly when needed. Their labels depend on each product's attribute set;
a slot number alone does not identify its business meaning. Use include_attribute_metadata=true
to resolve current cached product assignments. These definitions are not historical label snapshots, and
attribute metadata does not make product or customer master attributes bulk-selectable.
The search_cached_objects tool also accepts bounded PostgreSQL JSONB filters through the reserved
jsonb_filters key. Fetch dear://catalog/jsonb-search for the supported operators and examples,
then use the object-type and JSON Schema resources to choose valid nested payload paths.
A harness is a pre-approved diagnostic script exposed through the MCP server as a controlled job. Harnesses are used for narrow evidence collection workflows that are too specific for a generic read-only tool but still need guardrails, audit logs, and namespace scoping.
Only harnesses listed for the current namespace can be invoked. Each run is validated against the registry, records JobLog output, and executes on the configured target rather than giving the MCP client arbitrary shell access. Harnesses documented here should remain read-only or dry-run only.
The transaction validator accepts a month from 1 to 12, a year from 1 to 9999 (excluding December 9999), and
a sample_limit from 1 to 100. Logs retain at most 8 KiB of source bytes per line and the first
1 MiB per run; truncation markers are additional. Raw-payload differences are represented by hashes, not payload
contents. Output limits do not change the underlying comparison results.
| Harness | Safety Class | Execution Target | Description |
|---|---|---|---|
cached_transactions_validator |
read_only | local_app_process | Validate cached transactions against the live Dear transactions API for a date window. |
The User prompt column shows text a user might type into an MCP-enabled assistant. The Expected MCP server behavior column explains which MCP tool the assistant should call and the structured arguments it should send to this server.
This MCP server is designed for safe, read-only investigation of cached Cin7/Dear data. It is useful for recent sales, targeted order/product/customer lookups, stock checks, and support diagnostics.
For broad ranking questions such as "top ten selling SKUs" or "most important products by stock value", use an allowlisted aggregate report when one is available. Aggregate reports run fixed, read-only server-side queries over the configured cache scope. Complete-aggregate reports return capped result pages and cache successful results briefly. Source-batch reports return partial aggregates that clients must merge. Both use a short database statement timeout and the configured read-only cache database connection when available. Use the execution tool returned by discovery. These reports avoid fetching individual full records to answer summary questions.
Generic cache-search answers should still state their scope, for example "based on the 50 most recent cached sales" or "based on all 1,767 matching cached product summaries across 18 pages." Pagination can enumerate all matching cached summaries, but it does not provide a stable cache snapshot or complete Dear payloads. For complete reporting workflows, trend analysis, or cross-object analytics beyond the allowlisted aggregate reports, use GrowthPath's analytics reporting module, which is backed by a reporting-optimized database and supports natural-language analytics queries.
Use list_aggregate_reports to discover the enabled sale, customer, and product aggregate reports for the
current namespace. Use the returned execution_tool. For run_aggregate_report, supply a
report name, optional filters and entity, and limit from 1 to 100. For
run_aggregate_report_batch, supply the report name, optional filters and entity, then follow
next_cursor; there is no client-selected batch limit or page number. Follow the
batch merge rules and
timeout recovery instructions.
The examples below use <entity> as a placeholder. Replace it with a Dear instance/entity
configured for this deployment. If an example elsewhere uses orbitkey, treat it as the same kind
of placeholder rather than a value for every deployment.
Omit entity when only one Dear instance is exposed. Names, SKUs, labels and dates below are
examples; replace them with the requested values. Discover accepted object types and filters before searching.
Current deployment reference values:
statusanxiety; Dear instance/entity values:
statusanxiety_2023
| User prompt | Expected MCP server behavior |
|---|---|
| What Dear instances are available? |
Call list_dear_instances with no arguments.
|
| Which cached object types can I search? |
Call list_queryable_object_types with no arguments. Use the returned
standard_filter_keys and jsonb_filter_key; unsupported filter or sort keys are
rejected rather than ignored.
|
| List every cached product summary in a deterministic order. |
Call search_cached_objects with object_type=products, empty filters,
sort_by=object_uniqueID, and sort_direction=asc. Continue with each
next_cursor until has_more=false; do not combine all pages into model context
when a server-side report would answer the question.
|
| Show me the ten most recent sales. |
Call get_recent_sales with sort_by=SaleOrderDateDesc and limit=10.
Include entity=<entity> only when this deployment exposes multiple Dear instances.
Do not call get_sale_transactions unless the user specifically asks for accounting
transaction lines.
|
| Find September 2026 sales for customers whose names contain "Acme", newest first. |
Call search_cached_objects with object_type=orders,
filters={"customer_contains":"Acme","sale_order_date_from":"2026-09-01","sale_order_date_to":"2026-09-30"},
sort_by=sale_order_date, sort_direction=desc, limit=25, and
include_total_count=false. Dates are inclusive sale-calendar dates, not invoice dates.
Continue with next_cursor. Name matching is a literal, case-insensitive substring;
% and _ are not wildcards. The existing customer filter
remains an exact match.
|
| Find September 2026 purchase orders for suppliers whose names contain "Acme", oldest first. |
Call search_cached_objects with object_type=purchase_orders,
filters={"supplier_contains":"Acme","order_date_from":"2026-09-01","order_date_to":"2026-09-30"},
sort_by=order_date, sort_direction=asc, limit=25, and
include_total_count=false. These are inclusive purchase-order calendar dates.
Continue with next_cursor; supplier remains an exact-match filter.
|
| Find customers whose names contain "Acme". |
Call search_cached_objects with object_type=customers,
filters={"name_contains":"Acme"}, limit=25, and
include_total_count=false. Continue with next_cursor.
This is a literal, case-insensitive substring search; name remains an exact-match filter.
|
| Which product custom field describes "material"? |
Call get_additional_attribute_sets with object_type=products,
label_contains=material, and limit=20. Follow next_cursor
while has_more=true. Inspect cache status, freshness, and invalid or ambiguous
definition counts before claiming a label is absent. A missing cache does not prove that no sets exist.
A matching definition does not prove that a product uses that set.
If the business term or product/customer meaning is unclear, ask before selecting a field.
|
| Show the custom-field labels and values for product SKU-001 or customer Acme. |
For the product, call get_cached_product with sku=SKU-001 and
include_attribute_metadata=true. For the customer, call get_cached_customer
with customer_name_or_guid=Acme and include_attribute_metadata=true.
Use the record's resolved set definition to interpret its AdditionalAttribute1 through
AdditionalAttribute10 values. Report unresolved assignments instead of guessing labels.
Metadata uses current cached definitions, not historical labels; raw payload values stay unchanged.
|
| Show SKUs and quantities on all September 2026 sale-order lines. |
First call get_object_type_schema with object_type=orders and check
sale_order_lines.selectable_fields. Then call get_sale_order_lines with
sale_order_date_from=2026-09-01, sale_order_date_to=2026-09-30,
fields=["SKU","Quantity"], and limit=100. Repeat with each
next_cursor, even after an empty page, until has_more=false.
Preserve sale_id and line_index; repeated SKUs are separate order lines.
These are cached order lines, not accounting transactions or invoiced revenue.
|
| Include the product "material" custom field on September 2026 sale-order lines. |
Discover labels with get_additional_attribute_sets and approved line fields with
get_object_type_schema for orders. If a definition maps "material" to
ProductCustomField3, call get_sale_order_lines with
sale_order_date_from=2026-09-01, sale_order_date_to=2026-09-30,
fields=["ProductID","SKU","Quantity","ProductCustomField3"], limit=100, and
include_attribute_metadata=true. Interpret each line only with its resolved product set;
the same slot can mean something else in another set. Select other approved slots if needed.
Follow next_cursor even after an empty page. Values come from cached sale lines,
not current product master values; labels come from current cached definitions, not historical snapshots.
|
| What quantities were received for PO-001, and on which dates? |
First discover purchase_orders with get_object_type_schema. Then call
search_cached_objects with these example arguments:
Read each line's values for SKU, Quantity,
Received and Date, and its parent for task context.
Keep source positions and separate receipts for repeated SKUs. Follow outer and nested
continuation before claiming complete coverage. Apply the
receipt interpretation rules; do not add both stages together.
|
| How many products have each status? |
Call list_aggregate_reports. For products_by_status, use its declared
execution_tool=run_aggregate_report_batch. Start with
{"report_name":"products_by_status","filters":{}} and omit the cursor.
Repeat with each returned next_cursor as cursor, keeping the same
filters and entity. Save one response per batch_id and sum
product_count by status across those responses.
Continue after rows=[] while has_more=true.
Only after has_more=false are the combined counts complete for this traversal.
Cache refreshes can change records between calls; this is not a consistent snapshot.
|
| The complete products-by-status report timed out. Can you still obtain the counts? |
Inspect the structured query_timeout error. When error.fallback
advertises run_aggregate_report_batch, discard any previous complete-report pages
and call the supplied tool and arguments without a cursor. Complete and merge the batches as
above. If a batch times out, retry using error.retry once without advancing.
If that retry times out, stop and report partial coverage. Other reports may have no registered
fallback; follow the advertised recovery only.
|
| Show invoices dated October 2026, including invoices on older orders. |
Call get_sale_invoices with
{"invoice_date_from":"2026-10-01","invoice_date_to":"2026-10-31","limit":100}.
Follow next_cursor with the same arguments, even after an empty page, until
no cursor remains. These dates select InvoiceDate, not SaleOrderDate.
Default invoice statuses are AUTHORISED, PAID and
PARTIALLY PAID. Split longer periods into non-overlapping windows of at most
31 inclusive days, with no gaps. For line detail, use get_cached_sale_collection
with collection=invoice_lines and follow its pagination.
Amounts stay in document currency; header totals are not per-account revenue amounts.
|
| Show authorised credits dated October 2026 with their header amounts. |
Discover the fields and filters for sale_credits and
sale_credits_stand_alone. Call search_cached_objects for each type,
starting with these arguments for sale_credits:
Follow all cursors for both types. Use credit_header_amounts.values only when
its status=resolved, instead of adding them to raw totals. Check
unresolved_count before reporting a complete amount. Do not also count embedded
sale credits. For net sales, subtract each authorised credit once from invoices in the same
currency. Do not sum different currencies. Use Analytics for recurring revenue aggregates and
currency conversion. Date bounds are inclusive calendar dates; do not shift them between time
zones or use JSONB contains to match date prefixes.
|
| What are the ten most important active products by stock on hand value? |
Call run_aggregate_report with entity=<entity>,
report_name=top_active_products_by_stock_value, filters={}, and
limit=10.
|
| What are the top ten selling SKUs? |
Call run_aggregate_report with entity=<entity>,
report_name=top_selling_skus, filters={}, and limit=10.
This ranks quantities on cached sales-order lines, not invoiced revenue.
cache_modified_since and cache_modified_until filter cache modification
timestamps, not order or invoice dates. For sales within a particular reporting period, use
GrowthPath's analytics reporting module.
|