Skip to main content
Glama

Create sync rule

create_sync_rule

Create a sync rule: when event_name happens and all conditions match, apply the action to the contact. Returns the rule. Errors: invalid_argument, invalid_event_name, list_not_found, field_not_found (create the contact field first), invalid_tag. Next: track_event to try it, then get_contact or list_contact_events to see the result.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "event_name": "<event_name>",
      "action": "<action>"
    },
    "name": "create_sync_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesA name for the rule, such as "Tag pro customers".
actionYesWhat to do: {"type": "add_tag", "tag": "customer"}, {"type": "remove_tag", "tag": "trial"}, {"type": "set_field", "key": "plan", "value": "pro"} or {"type": "add_to_list", "list_id": "lst_..."}.
conditionsNoAll must match: [{"path": "plan", "op": "eq", "value": "pro"}]. Ops: eq, neq, gt, gte, lt, lte, contains, exists.
event_nameYesThe event that triggers it, custom or built-in (for example "plan_upgraded" or "tag.added").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations (readOnly=false, destructive=false, idempotent=false), the description discloses the return value ("Returns the rule") and a concrete error taxonomy including invalid_argument, invalid_event_name, list_not_found, field_not_found, and invalid_tag, plus the actionable hint to create the contact field first. It does not clarify whether the rule applies retroactively to existing contacts or only to future events.

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?

Three tight sentences, front-loaded with the rule semantics, then return value, then errors, then next steps. No filler and no restatement of the title.

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?

No output schema exists, so stating that the rule is returned matters, and the error list plus follow-up tooling covers most of what an agent needs to call and verify the operation. The remaining gap is the retraction/backfill question: whether the new rule evaluates existing contacts or only future events.

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 100%, so the schema already documents each field and its JSON shapes. The description still adds compositional meaning not present per-parameter: that event_name is the trigger and that all conditions must match before the action is applied to the contact.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb+resource ("Create a sync rule") plus a compact clause explaining the rule model: trigger event, all conditions matching, and the resulting action applied to the contact. It is unambiguous against siblings like list_sync_rules or delete_sync_rule, though no sibling is named for contrast.

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

Usage Guidelines4/5

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

Explicitly routes the agent forward with "Next: track_event to try it, then get_contact or list_contact_events to see the result," which names concrete alternatives and the situation that selects them. It lacks any 'do not use when' guidance, so it falls short of a full 5.

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