Skip to main content
Glama

Automation: Rules

automation_rules
Read-only

V2 rule-based automation, READ-ONLY: action=list|get|dry_run (mutations live in stage_automation_rule). Every rule has an approval_mode: manual (queue for user approval) | workforce_review (the brand's Automation Review Analyst seat approves/rejects each queued change with a reason; ambiguous items escalate to the user) | auto (applies immediately; can only be set in the app, never from here). Legacy ai_review/ai_shadow rules read as workforce_review. list scope=mine (default) shows only the calling user's rules; scope=all_users shows every user's (rows carry owner + owned_by_you). get/dry_run take rule_id; dry_run evaluates the rule without applying anything. describe returns the valid metric/operator/action-type catalog per entity level - ALWAYS check it before building conditions (unknown metrics are rejected at stage time).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNo'mine' (default): only the calling user's own rules — the ownership boundary. 'all_users': every user's rules on this profile; rows carry owner and owned_by_you.
actionYesWhich read to run; every action is read-only and runs immediately.
paramsNoAction-specific fields (see description).
rule_idNo
profile_idNoWhich advertising profile (see account_profiles). Optional when the token has exactly one.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses approval_mode semantics (manual queues for user approval, workforce_review routes to the review analyst with escalation, 'auto... can only be set in the app, never from here'), legacy aliasing ('Legacy ai_review/ai_shadow rules read as workforce_review'), dry_run's side-effect-free evaluation, and the failure mode for unknown metrics. This is exactly the behavioral context annotations cannot carry.

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?

Dense and front-loaded: the first clause states purpose, read-only nature, action set, and sibling routing before the longest segment on approval modes. Every sentence earns its place, but minor redundancy with the schema (scope description) and the paragraph's overall density keep it just below the two-sentence ideal of the strongest definitions.

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 high-complexity tool with four actions, ownership boundaries, and no output schema, the description covers the essentials: action selection, scope semantics, dry_run side-effects, describe-as-catalog, and return hints ('rows carry owner + owned_by_you'). It falls slightly short on what get/dry_run return in detail and on pagination/limits, but these are minor for the core call decision.

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 80%, so most parameters are documented; the description adds what the schema omits — rule_id (schema gives only 'integer' with no description) is specified as the target for get/dry_run, and the params object is clarified as 'action-specific fields.' The describe-catalog guidance also gives agents a path to discover valid metric/operator/action values beyond the enum descriptions.

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+resource: 'V2 rule-based automation' with enumerated actions (list|get|dry_run|describe), and immediately disambiguates from the mutation sibling: 'mutations live in stage_automation_rule.' The read-only scope is declared up front, which separates it not only from stage_* tools but also from automation_activity/automation_scheduled_tasks by naming the precise resource (rules).

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 routes mutations to stage_automation_rule, telling the agent when NOT to use this tool. It gives per-action selection guidance (scope=mine vs all_users ownership semantics, rule_id for get/dry_run) and a hard directive: 'ALWAYS check it before building conditions (unknown metrics are rejected at stage time).' No usage decision is left to inference.

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