Skip to main content
Glama

Create Automated Ad Rule

meta_create_ad_rule

Create automated rules to pause or adjust ads, ad sets, or campaigns based on performance triggers like cost per result exceeding a set value.

Instructions

Creates an automated rule for managing ads, ad sets, or campaigns.

Args:

  • ad_account_id (string): Ad account ID

  • name (string): Rule name

  • evaluation_spec (object): Conditions that trigger the rule (e.g., {"evaluation_type":"TRIGGER","trigger":{"type":"STATS_CHANGE","field":"cost_per_result","value":"5.00","operator":"GREATER_THAN"}})

  • execution_spec (object): Actions to take (e.g., {"execution_type":"PAUSE"})

  • schedule_spec (object, optional): When to evaluate (e.g., {"schedule_type":"DAILY"})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
ad_account_idYes
schedule_specNo
execution_specYes
evaluation_specYes
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
Behavior3/5

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

Annotations already establish that this is a mutating, non-idempotent, non-destructive write operation. The description adds useful context that the rule is automated and can execute actions such as PAUSE via execution_spec, but it does not disclose side effects, permissions, or lifecycle behavior beyond that.

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 a short summary followed by a tight argument list with examples. Every line earns its place, and the JSON examples are dense but necessary given the complex object parameters.

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?

Together with the schema, the description is sufficient to construct a valid create-rule request: all required parameters are named and illustrated, optionality is marked, and response_format is documented in the schema. It could be stronger by stating the return shape or default schedule behavior, but these are not blockers for correct 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 description coverage is only 17%, so the description carries nearly all parameter meaning. It explains each argument and provides concrete JSON examples for evaluation_spec, execution_spec, and schedule_spec, which is essential for correctly forming complex nested objects.

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 states a specific verb and resource: 'Creates an automated rule for managing ads, ad sets, or campaigns.' This clearly distinguishes the tool from siblings like meta_create_ad, meta_create_adset, and meta_list_ad_rules.

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

Usage Guidelines2/5

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

No explicit guidance is provided about when to use this tool versus alternatives, and no exclusions or prerequisites are mentioned. The intended use must be inferred from the verb 'Creates' and the resource name.

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/open-work-org/open-mcp-servers'

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