Skip to main content
Glama
woo-mcp

woo-mcp

by dorlevy1

Get order count

get_order_count
Read-only

Count WooCommerce orders in an inclusive date range, optionally filtered by status and grouped by day, month, or year to summarize sales activity.

Instructions

Count orders created in a date range, optionally broken down by day, month or year. Both dates are optional and inclusive (store's timezone). Breakdowns include periods with 0 orders and are limited to 400 periods. To see the orders themselves, use list_orders.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_order_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoCount orders created on/before this date (YYYY-MM-DD). Default: today.
fromNoCount orders created on/after this date (YYYY-MM-DD). Default: first order.
statusNoOnly count orders with this status. Default 'any' = every status. E.g. completed, processing, on-hold, cancelled, refunded.any
group_byNoAlso return a count per day, month or year. 'none' returns just the total.none

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the read-only and open-world profile, and the description adds substantive behavior: dates are inclusive in the store's timezone, zero-order periods are included in breakdowns, and breakdowns are capped at 400 periods. Only the shape of the returned counts is left implicit (no output schema), which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences: purpose and scope first, then behavioral constraints, then the sibling alternative. No filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple aggregation tool with no output schema, the description covers defaults, inclusivity, timezone, the 400-period cap, and the alternative listing tool. A brief note on the returned count/breakdown structure would make it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all four parameters are already documented including defaults and the group_by enum. The description only reinforces inclusivity and timezone semantics, which the schema's 'on/before' and 'on/after' wording largely already conveys, so it adds little beyond the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Count orders') plus the range and optional grouping dimension, and explicitly contrasts itself with list_orders. An agent can distinguish it from the sibling listing tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent to list_orders when the actual order records are needed, and clarifies that both dates are optional so an unbounded call is valid. It does not say when to prefer other analytics siblings (e.g. top products/customers) or when a breakdown is inappropriate, so it stops short of full when/when-not coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.