Skip to main content
Glama

rule_stats

Read-only

Retrieve per-rule hit counts and evaluations, sorted busiest first, to identify heavily used or inactive firewall rules. Set target and top N to focus the report.

Instructions

[READ] Per-rule hit counts / evaluations, busiest first (top-N).

Args: top: How many rules to return, busiest first (default 20). target: Firewall target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

B3.4/5.0
Behavior3/5

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

readOnlyHint=true already declares the safety profile, so the description doesn't need to restate read-only behavior. It adds genuine value by disclosing sort order ('busiest first') and the top-N truncation, but says nothing about pagination, rate limits, or what the counts represent.

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 one-line summary followed by a compact args block; nothing is padded. Minor redundancy in repeating 'busiest first' in both the header and the 'top' arg.

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?

For a simple 2-optional-param read-only tool with annotations covering safety and no output schema, the description covers purpose, ordering, and both parameters adequately. The remaining gap is the absence of any hint about output shape or how the counts are scoped.

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 description coverage is 0%, so the description carries the full burden and mostly delivers: 'top' is explained as a count with default 20 and sort order, and 'target' as a config firewall name with an omit-for-default rule. This meaningfully exceeds the bare type/default info in the schema, though it doesn't state valid target values.

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?

The opening line names a specific resource (per-rule hit counts / evaluations) and a distinguishing ordering trait (busiest first, top-N). An agent can tell what it returns, though the description never names a sibling such as rule_hit_and_shadow_analysis or rule_states to disambiguate which rule-stat view to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no alternatives named, despite several overlapping siblings (rule_states, rule_hit_and_shadow_analysis, list_rules). The '[READ]' tag and 'omit for the default' note only cover mechanics, not selection.

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