Skip to main content
Glama

Fetch rules

fetch_rules
Read-onlyIdempotent

Fetch up to 5 full rules (JIT; at most 50 rules a day on Pro, 80 on Team, shared with search_rules): by category, or by ids, such as the rule_id of a failed check from scan_url or get_site_scan. By category, with content_type, rules are ranked by fit to it (listed, then applies_to all), then confidence, then evaluation_mode; without it they come in id order, and the response says total_in_category, returned, remaining_after_this_call and selection. Full rules include evidence (strongest sources first, at most 5 per rule unless evidence is "all"; evidence_total counts them all), confidence, causality (established only with an experimental source; not_established means present the advice as an association, whatever the wording), evaluation_mode (deterministic, agent, or hybrid), checks, and remediation. Rules with checks: [] (evaluation_mode: agent) are intentional host-agent guidance, not missing checks. Use when: A scan gave you rule ids for failed checks (pass ids), or you know the category and need current AEO/GEO rules for a research question, a page audit (even when checks pass), or when a fix hint is ambiguous. Avoid when: You only want a mechanical page grade (scan_url), or you have a keyword instead of a category or id (search_rules). exclude_ids returns a second set of a category when the first five left a question open; the daily cap still applies. Do not claim: Reading a rule does not apply it, and it is not a citation. Verify: Edit, then re-run the lint or scan that failed, and apply host-agent semantic review for agent/hybrid rules.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fetch_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNo1-5 rule ids, such as the rule_id of failed checks. Provide exactly one of category or ids.
categoryNoCategory name from list_categories. Provide exactly one of category or ids.
evidenceNostrongest (default): at most 5 sources per rule, strongest first. all: every source.
exclude_idsNoOptional, with category: rule ids already read (at most 15); they are skipped so the call returns the next rules in the same order.
content_typeNoOptional, with category. Ranks rules that list this content type first, then rules that apply to all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantial behavior: a daily quota (50 Pro / 80 Team, shared with search_rules), the 5-rule JIT cap, ranking order under content_type, the response fields returned, evidence and causality semantics, and the caveat that checks: [] is intentional rather than missing data. The 'Do not claim' and 'Verify' notes disclose interpretive limits that no annotation covers.

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 action and cap, then clearly labeled 'Use when', 'Avoid when', 'Do not claim', and 'Verify' blocks that make it scannable. The middle paragraph is a dense run-on covering ranking, response fields, evidence, causality, and evaluation_mode, and it re-specifies schema details (evidence 'all', exclude_ids max) that could be trimmed.

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?

There is no output schema, and the description compensates by naming the returned fields (total_in_category, returned, remaining_after_this_call, selection, evidence_total) and what full rules contain. For a read-only fetch with a daily quota, an agent has everything needed to call it correctly and interpret the result.

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; the description earns above that by explaining cross-parameter behavior the schema cannot: content_type changes ranking (listed first, then applies_to all) and exclude_ids returns the next rules in the same order while the cap still applies. It largely restates the evidence enum and the 15-id limit, which the schema already documents.

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 ('Fetch up to 5 full rules') plus the two selection modes (by category, by ids) and the JIT cap. It is immediately distinguishable from search_rules (keyword search) and scan_url (mechanical grade), which are named in the Avoid clause.

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?

Explicit 'Use when' and 'Avoid when' sections name the alternatives and the condition that selects them: pass rule ids from a failed check, or use a known category; avoid if you only want a page grade (scan_url) or have a keyword (search_rules). It also explains when to reach for exclude_ids to page a category.

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.