Skip to main content
Glama
pretix-agent-mcp

pretix-agent-mcp

sales_summary

Compute ticket-sales totals for an event, including revenue by order state, ticket counts, and optional per-item or per-subevent breakdowns, with PII excluded.

Instructions

Ticket-sales figures for one event: revenue and counts per order state, no PII.

pretix has no aggregate-stats endpoint, so this paginates the event's orders and adds them up here. On a large event it is slow — one HTTP round trip per 100 orders — and it stops after SALES_SCAN_CAP orders (default 5000). The scan block in the result reports how many orders were read and whether the cap truncated the window; a truncated result is a partial answer, so narrow it with subevent if that happens.

tickets counts non-canceled positions of paid and pending orders. revenue is order totals grouped by state, plus a refunded bucket summed from completed refunds. Set by_item / by_subevent for per-product / per-date breakdowns (paid and pending only). Amounts are decimal strings in the event's currency.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "event": "<event>"
    },
    "name": "sales_summary"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventYes
by_itemNo
subeventNo
by_subeventNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly: it discloses the slow per-100-orders round-trip cost, the SALES_SCAN_CAP truncation at 5000 orders, how the scan block reports truncation, that tickets exclude canceled positions, that breakdowns cover only paid and pending orders, and that amounts are decimal strings in the event's currency.

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

Conciseness4/5

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

The core purpose is front-loaded in the first sentence, followed by cost/limits and then output semantics — a sensible order. It is fairly dense but nearly every sentence adds information; a few clauses, such as restating that a truncated result is partial, could be tightened.

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

Completeness5/5

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

Despite no output schema and no annotations, the description explains the result shape (scan block, revenue-by-state buckets plus refunded, tickets count) and the operational cost and limits. For a four-parameter aggregation tool, an agent has everything needed to call it and interpret truncation correctly.

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

Parameters4/5

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

Schema coverage is 0%, so the description must supply all parameter meaning. It explains by_item and by_subevent as per-product and per-date breakdowns restricted to paid/pending orders, and subevent as the narrowing filter for truncated scans. The event parameter's meaning is only implied ('for one event') and its accepted identifier format is not stated.

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?

The opening sentence names a specific verb and resource — 'Ticket-sales figures for one event' — and scopes the output ('revenue and counts per order state, no PII'). This clearly distinguishes it from sibling list/search tools such as search_orders or list_events, which return raw records rather than aggregates.

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?

It tells the agent when the result is trustworthy and what to do when it isn't: a truncated scan means a partial answer, so narrow the window with the subevent parameter. It does not explicitly contrast with a sibling tool for raw order listings, so the alternative-selection guidance is implied rather than named.

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