Skip to main content
Glama

legal_consent_log_stats

Aggregates consent decision counts by action and banner version over a chosen day range, so you can review opt-in and opt-out trends from the consent log.

Instructions

Aggregate consent decision counts by action and banner_version over a day range [from, to) (both optional, default the last 30 days including today; at most 366 days). Returns { from, to, rows: [{ action, banner_version, count }] }. Requires manage_options. Logging itself stays off until legal_put_consent's log_enabled is set, which should only happen after the Datenschutz document has an 'einwilligungsnachweis' section describing it. Requires cvrt-legal 0.5.0+.

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": {
      "site": "<site>"
    },
    "name": "legal_consent_log_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoFirst day NOT counted (exclusive, the range is [from, to)). Defaults to tomorrow, so today is included.
fromNoFirst day counted (inclusive). Defaults to 30 days before to; must be before to.
siteYesSite id (see list_sites)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.14.0
    • changedInput schema / properties / from / description
      Previous value: -"Range start, inclusive. Defaults to 30 days before to."New value: +"First day counted (inclusive). Defaults to 30 days before to; must be before to."
    • changedInput schema / properties / to / description
      Previous value: -"Range end, inclusive. Defaults to today."New value: +"First day NOT counted (exclusive, the range is [from, to)). Defaults to tomorrow, so today is included."
  2. Addedv3.4.0

TDQS

A4.3/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 burden and does so: it discloses the permission required (manage_options), the half-open range semantics, the maximum span, the prerequisite that logging must be enabled via legal_put_consent and only after a Datenschutz section exists, and the minimum plugin version. These are exactly the operational facts an agent cannot get from structured fields.

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?

Four dense sentences, front-loaded with the aggregation and range semantics, then the return shape, then prerequisites. Every sentence carries information, though the prerequisite chain (log_enabled plus Datenschutz section plus version) is packed tightly into the tail.

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?

No output schema exists, yet the description supplies the exact response shape { from, to, rows: [...] }, so an agent knows what comes back. Combined with permissions, limits, and the enablement prerequisite, nothing material is missing for correct invocation.

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 100%, so the baseline is 3, but the description adds meaning beyond the schema by stating the effective defaults (last 30 days including today) and the 366-day hard limit that constrains the parameters together. It still doesn't explain what banner_version values look like, leaving discovery to a call.

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

Purpose4/5

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

States a specific verb and resource ('Aggregate consent decision counts') plus the exact grouping dimensions (action, banner_version) and the time window, which distinguishes it implicitly from legal_consent_log_get and legal_consent_log_export. It stops short of naming the sibling it replaces, so an agent must infer that non-aggregated reads live elsewhere.

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?

Gives concrete operating context: both date bounds optional, default is the last 30 days including today, and a hard cap of 366 days. It also warns that the underlying log is inert until legal_put_consent sets log_enabled, which effectively tells the agent when the tool will return nothing useful. No explicit 'prefer X when Y' routing statement.

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

Deploy Server

Other Tools