Skip to main content
Glama

detect_anomalies

Read-onlyIdempotent

Scan audit history for suspicious access patterns like burst reads or off-hours access. Use as triage before rotating credentials; read-only and returns findings or 'No anomalies detected'.

Instructions

[audit] Scan the audit history for suspicious access patterns — burst reads of the same key, off-hours access, and other heuristics. Use as a quick triage signal when investigating a single key or before letting an agent rotate credentials; prefer health_check for a scope-wide decay+anomaly summary, and agent_scan for multi-project JSON reports with optional auto-rotation. Read-only; never mutates secrets or the audit log. Returns one line per finding formatted [type] description, or 'No anomalies detected' when the log looks clean.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoIf provided, narrow the scan to this exact key. Omit to scan across every key in the audit log.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.7
    • changedInput schema / properties / key / description
      Previous value: -"Check anomalies for a specific key"New value: +"If provided, narrow the scan to this exact key. Omit to scan across every key in the audit log."
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint, so the safety profile is largely covered; the description still reinforces 'Read-only; never mutates secrets or the audit log' and discloses the output shape ('one line per finding formatted [type] description', or a clean-log message). It could say more about scan cost or log-window limits, but it goes well beyond the annotations.

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?

Three dense sentences with the '[audit]' tag and the core action front-loaded, followed by routing guidance and the return contract. Slightly packed but every clause earns its place; no filler.

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?

With no output schema, the description compensates by specifying the return format and the empty-case message, and it covers routing and safety. An agent has everything needed to call and interpret this tool correctly.

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% and the single 'key' parameter is fully documented in the schema (narrow-to-key vs scan-all), so the description adds no syntax or format detail beyond it. Baseline 3 is correct when the schema does the heavy lifting.

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 ('Scan the audit history') and enumerates the concrete patterns detected ('burst reads of the same key, off-hours access'). It also explicitly distinguishes itself from siblings health_check and agent_scan, so an agent can route correctly 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 Guidelines5/5

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

Gives explicit when-to-use ('quick triage signal when investigating a single key or before letting an agent rotate credentials') and names two alternatives with the conditions that select them (health_check for scope-wide decay+anomaly summary, agent_scan for multi-project JSON with auto-rotation). No inference required.

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