Skip to main content
Glama

list_rules

Read-onlyIdempotent

List the product rules (Attribute Rules) available to a project. Use this to find an existing rule and its ruleId. Returns {rules:[{ruleId, name, description, category, scope, usageCount}], returned, total}. usageCount is how many feed attributes currently use the rule. scope selects which library to list: 'project' (default) = the project's own rules; 'shared_template' = the reusable shared template library; 'all' = both. Optionally pass query: a case-insensitive SUBSTRING match on the rule NAME only (a coarse pre-filter — rule names are not unique, so confirm the match yourself and disambiguate when more than one matches). Use get_rule to fetch a rule's full rules[]. project_id is OPTIONAL (inferred for a single-project customer; project_id_required otherwise — then call list_projects). Returns all rules in one call (returned === total); not paginated.

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

Input Schema

NameRequiredDescriptionDefault
queryNoOptional case-insensitive SUBSTRING match on the rule NAME only (a coarse pre-filter; confirm the match yourself as names are not unique).
scopeNoWhich library to list: 'project' (default) = the project's own rules; 'shared_template' = the reusable shared template library; 'all' = both.
project_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, idempotent, not open-world), and the description still adds meaningful behavior: results are returned in a single unpaginated call (returned === total), query is only a coarse name pre-filter requiring the caller to confirm matches, and usageCount reflects how many feed attributes use the rule. The one weak spot is that "Use get_rule to fetch a rule's full rules[]" appears truncated, leaving the handoff phrasing slightly unclear.

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 purpose and the return shape before parameters, and most sentences carry unique information. It is dense and slightly run-on with inline backticked terms and a parenthetical trail, and the truncated get_rule clause costs a bit of clarity.

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?

Covers everything an agent needs for a three-parameter read tool with no output schema: it spells out the return shape ({rules:[...], returned, total}), field meanings, the no-pagination guarantee, and the project_id fallback path. Nothing material is left to inference.

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 67% and project_id has no schema description at all, so the description's explanation of the project_id inference/required behavior fills a real gap. The scope and query semantics largely restate the schema descriptions, but the added disambiguation warning (names are not unique, confirm the match yourself) gives genuine operational meaning beyond the field text.

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 ("List the product rules (Attribute Rules) available to a project") and immediately frames the purpose: "Use this to find an existing rule and its ruleId." It also distinguishes itself from the sibling get_rule, which fetches one rule's full detail, so an agent can pick correctly without opening either 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 routing rules: use this tool to locate a rule and its ruleId, then use get_rule for full detail. It also handles the project_id prerequisite case (optional when inferred for a single-project customer, required otherwise, in which case call list_projects). That is when-to-use, when-not, and the fallback path all in one place.

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.

Resources