Skip to content

fluent-booking/query-bookings

Aggregate bookings by one or two dimensions. Answers "how many bookings per host last month", "which event types get cancelled most", "what hours do people book". Returns totals only, never booking rows.

Ability

  • Kind: Tool
  • Toolset: core
  • Edition: Core
  • Mode: read-only
  • Permission callback: PermissionGate::readGate()
  • Handler: ReportTools::queryBookings()
  • Source: fluent-booking/app/Modules/MCP/Tools/ReportTools.php:30

Input schema

ParameterTypeRequiredDescription
group_byarray<string>NoOne or two dimensions. Omit for a single total over the whole range.
metricsarray<string>NoDefaults to count. Rates are fractions of that group's bookings, 0 to 1.
date_fieldstringNoWhich timestamp the range and the day/month/weekday/hour dimensions read. start_time is when the meeting is; created_at is when it was booked. Defaults to start_time.
fromstringNoY-m-d, inclusive. Defaults to 29 days before to.
tostringNoY-m-d, inclusive. Defaults to today. Maximum span 366 days.
timezonestringNoIANA zone the day, weekday and hour buckets are expressed in. Defaults to the site timezone.
filtersobjectNoNarrow the set before grouping. Any of: status (array), event_id, calendar_id, host_id, event_type, source.
havingobjectNoDrop small groups, e.g. {"metric":"count","op":">=","value":5}.
order_bystringNoA metric or a grouped dimension. Time series default to chronological, everything else to largest first.
orderstringNoOne of: asc, desc.
limitintegerNoGroups to return. Default 50, maximum 200.

Example call

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "fluent-booking/query-bookings",
    "arguments": {}
  }
}