Skip to main content
Glama

Daily anomalies (weekday-robust)

detect_anomalies
Read-onlyIdempotent

Flags days in the period whose clicks (or impressions, ctr, position) deviate from what the same weekday did in the previous baselineWeeks weeks (default 8): expected = median of those weekdays, scale = scaled MAD, zScore = (value − expected) / scale; anomaly when |z| >= threshold (sensitivity low 4, medium 3, high 2.5). Robust to outliers in the baseline and to the weekly cycle (weekends are compared with weekends). Each anomaly has direction (drop/spike; for position, drop = visibility loss), severity, deviationPct and the baseline size. Use for "did anything unusual happen", to date a drop before looking at causes (get_annotations), or to check a release day. / Dias anômalos comparados com o mesmo dia da semana nas semanas anteriores.

Input Schema

NameRequiredDescriptionDefault
daysNoWindow length in days (default 28). Ignored when startDate and endDate are both given. / Janela em dias.
siteYesProperty: displayName ("example.com"), Search Console siteUrl ("sc-domain:example.com", "https://www.example.com/") or numeric id. A unique substring among visible properties also works ("exam"). list_sites shows the options. The value "demo" selects a demonstration site with fictional data: it works without signing in and is read-only. / Propriedade por nome, siteUrl ou id; "demo" é um site de demonstração com dados fictícios, sem login e só leitura.
brandNoall (default); branded = only queries containing one of the property's branded_terms; non-branded = the rest. Needs branded terms set on the property in the Organiq panel, otherwise invalid_argument with the panel URL. / Marca × sem marca.
queryNoOnly queries containing this text, or a regex as /…/ (e.g. "/^how to/"; no flag = case-insensitive).
deviceNoDevice.
metricNoMetric (default clicks).
countryNoCountry as ISO-3166-1 alpha-3, as in Search Console: bra, usa, prt, arg.
endDateNoEnd yyyy-mm-dd. Default: last synced date of the property (Search Console lags ~3 days; never "today"). Every response states the period used. / Fim; padrão = última data sincronizada.
startDateNoStart yyyy-mm-dd. Default: endDate − (days − 1).
searchTypeNoSearch type (default web).
sensitivityNolow = only extreme, medium (default), high = more alerts.
pageContainsNoOnly pages whose URL contains this text (case-insensitive), e.g. "/blog/".
baselineWeeksNoWeeks of same-weekday history used as baseline (default 8).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / site / description
      Previous value: -"Property: displayName (\"example.com\"), Search Console siteUrl (\"sc-domain:example.com\", \"https://www.example.com/\") or numeric id. A unique substring among visible properties also works (\"exam\"). list_sites shows the options. / Propriedade por nome, siteUrl ou id."New value: +"Property: displayName (\"example.com\"), Search Console siteUrl (\"sc-domain:example.com\", \"https://www.example.com/\") or numeric id. A unique substring among visible properties also works (\"exam\"). list_sites shows the options. The value \"demo\" selects a demonstration site with fictional data: it works without signing in and is read-only. / Propriedade por nome, siteUrl ou id; \"demo\" é um site de demonstração com dados fictícios, sem login e só leitura."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare read-only/idempotent/non-destructive, so the lower bar applies; the description goes beyond them by disclosing the statistical model, the default 8-week baseline, the numeric z thresholds (4/3/2.5), robustness to outliers and the weekly cycle, and the per-anomaly output fields including 'for position, drop = visibility loss.' Minor gaps: no note on behavior when baseline history is shorter than baselineWeeks, or on cost of a 540-day/16-week scan.

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?

Front-loaded with the core behavior and the computation before the usage line; every clause carries information. It is dense – the formula chain plus threshold mapping is a long single sentence – but nothing is filler, aside from the Portuguese mirror translating what was just said.

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?

With no output schema, the description correctly takes on the return contract by naming direction, severity, deviationPct and baseline size, and it reasserts that the period used is reported. What remains unstated is the insufficient-baseline case and how it differs from detect_change_points, which matters for a 13-parameter tool with several overlapping siblings.

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 the schema already documents all 13 parameters; the baseline is 3. The description does add real meaning for two of them by tying sensitivity to concrete z thresholds and explaining how baselineWeeks shapes the expected value, which lifts it slightly, but most parameters (device, country, query, pageContains) are left entirely to the schema.

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 plus the exact comparison basis: 'Flags days in the period whose clicks (or impressions, ctr, position) deviate from what the same weekday did in the previous baselineWeeks weeks.' The method (median/scaled MAD, z-score, threshold per sensitivity) makes it unmistakable what the tool computes, and the closing 'Use for...' line situates it against get_annotations.

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 three concrete entry points: 'did anything unusual happen', dating a drop before investigating causes (with get_annotations named as the follow-up), and checking a release day. It lacks an explicit when-not or a contrast with the nearest sibling, detect_change_points, so an agent still has to infer which of the two detections to pick.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.