Skip to main content
Glama

get_inferred_rules

Read-only

Retrieve design rules inferred from codebase patterns. Filter by category to understand implicit conventions for spacing, colors, typography, and more before building.

Instructions

Get the design rules inferred from your codebase patterns. Read-only, no side effects. Returns JSON with a list of rules including category, pattern, and confidence, or an error if no rules have been generated yet. Pass category to filter: spacing, colors, typography, borderRadius, naming, components. Omit category to get all. Use this to understand implicit conventions the codebase follows. For explicit design token values, use get_token. For source conflicts, use get_conflicts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.2
    • removedInput schema / required
      Removed value: -[
      -  "category"
      -]
  2. Addedv1.8.0
  3. Removedv1.6.0
  4. First observed

TDQS

A4.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description repeats that fact. It adds useful behavioral context beyond the annotation: returns a JSON list with category/pattern/confidence, errors if no rules have been generated, and supports filtering by category.

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?

The description is dense but front-loaded, with every sentence adding value: purpose, safety, return shape, filter usage, and alternative tools. No wasted words or repetition of schema-only details.

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?

The tool is simple (one optional parameter, no output schema), and the description covers the return format, error case, filter values, and usage context. It is fully adequate for correct tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description fully compensates by enumerating exact accepted values: spacing, colors, typography, borderRadius, naming, components. It also explains that omitting the parameter returns all rules.

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?

The description uses a specific verb and resource: "Get the design rules inferred from your codebase patterns." It clearly differentiates from siblings by naming get_token and get_conflicts as alternatives for other intents.

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?

Explicitly states when to use the tool ("understand implicit conventions") and provides exclusions: "For explicit design token values, use get_token. For source conflicts, use get_conflicts." Also explains category filtering and omission behavior.

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