Skip to main content
Glama

meta_ads_ad_rules_create

Create automated rules that fire notifications, pause campaigns, or adjust budgets when ad performance matches defined triggers. Handle CPA spikes or low ROAS automatically.

Instructions

Creates a new Automated Rule that Meta evaluates on the configured schedule and fires actions when the trigger matches. Returns the new rule_id. Mutating, reversible via rollback_apply (rollback disables the rule; actions the rule already took stand). Common patterns: CPA-spike alert (execution NOTIFICATION), auto-pause ads with low ROAS (execution PAUSE), scale winners (execution CHANGE_BUDGET). evaluation_spec and execution_spec are Meta's JSON schemas — see Meta Ads Automated Rules API docs for the field set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idNoMeta Ads account ID in the format 'act_XXXXXXXXXX' (e.g. 'act_1234567890'). Optional — falls back to META_ADS_ACCOUNT_ID from the configured credentials. The leading 'act_' prefix is required.
nameYesRule name shown in Ads Manager. Should name the trigger and action (e.g. 'Pause ads CPA > target × 2').
evaluation_specYesTrigger definition. Shape: {evaluation_type: SCHEDULE | TRIGGER, filters: [{field, operator, value}, ...]}. Filters combine with AND; for OR create multiple rules.
execution_specYesAction definition. Shape: {execution_type: NOTIFICATION | PAUSE_CAMPAIGNS | UNPAUSE_CAMPAIGNS | CHANGE_BUDGET | CHANGE_BID, execution_options: [...]}. Budget/bid changes use delta or absolute value per execution_options.
schedule_specNoWhen the rule runs. Shape: {schedule_type: SEMI_HOURLY | DAILY | CUSTOM, schedule: [time specs]}. Default SEMI_HOURLY evaluates every 30 minutes.
statusNoInitial status. Default ENABLED. Create with DISABLED and enable later to stage the rule without side effects.
Behavior4/5

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

Discloses mutating behavior, reversibility with caveats, and that actions already taken stand. No annotations exist, so description carries full burden; it covers key behavioral traits well.

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?

Concise two-paragraph structure with front-loaded definition. Could benefit from bullet points for patterns, but no fluff and every sentence adds value.

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?

Covers return value, common patterns, external docs reference for complex specs, and reversibility. Lacks error handling and permissions, but adequate given schema descriptions and patterns.

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?

Adds significant value beyond schema: examples for execution_spec types, default schedule, account_id fallback, and name suggestion. Schema coverage is 100% but description enriches understanding.

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 clearly states 'Creates a new Automated Rule' with specific return value 'Returns the new rule_id'. It distinguishes from siblings like update, delete, list, and get by focusing on creation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides common patterns (CPA-spike alert, auto-pause, scale winners) and mentions reversibility via rollback_apply, but lacks explicit when-not-to-use or comparison to alternative creation tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/logly/mureo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server