Skip to main content
Glama

ai_guard_rules

Read-only

List AI guard rules and preset severities, then fetch enabled rule IDs or selected rules with descriptions, remediation guidance, and documentation links.

Instructions

List rules and preset severities. With preset, also return its enabled rule IDs. With rules (e.g. a ruleId from a finding), return only those rules with description, remediation and docs link.

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": "ai_guard_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
rulesNo
presetNo

Output Schema

NameRequiredDescriptionDefault
rulesYes
presetNo
presetsYes
successYes
totalRulesYes
presetRulesNo
unknownRulesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond them by specifying what each mode returns and that targeted lookups include description, remediation, and a docs link. It omits pagination or the 25-item cap on the rules array, which is a modest gap for a bulk lookup.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the base behavior and then one sentence per parameter mode. Every clause conveys a distinct fact about scope or return content with no filler.

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 two-parameter read tool with an output schema (so return shape needn't be re-explained) and read-only annotations, the description covers purpose, both modes, and return content adequately. The remaining minor gap is the undocumented preset enum meanings and the item cap, neither of which blocks correct invocation.

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 description coverage is 0%, so the description carries the burden: it explains that 'preset' scopes the response to enabled rule IDs and that 'rules' takes rule IDs and returns full detail, plus a useful hint that a ruleId can come from a finding. It does not explain the four preset enum values or the min/max bounds on the rules array, leaving half the parameter semantics to the raw schema.

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 description opens with a specific verb and resource ('List rules and preset severities') and then enumerates two distinct parameter-driven modes, so an agent knows exactly what the tool returns. It is clearly a lookup tool in contrast to the scan/check/fix siblings, though it never names or contrasts those siblings explicitly.

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?

It gives explicit conditional guidance tied to each parameter: bare call lists rules plus preset severities, 'with preset' returns that preset's enabled rule IDs, and 'with rules' narrows to specific rule IDs. What it lacks is guidance on when to prefer this over discovery via ai_guard_check_package or ai_guard_scan_project, so it stops short of a full when/when-not map.

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