Skip to main content
Glama
LibreDesk MCP

LibreDesk MCP

by Passe12345

create_automation_rule

Creates an enabled automation rule that matches conversations by conditions and applies actions, such as assigning agents or adding tags. Read it back with get_automation_rule to verify.

Instructions

Create Automation Rule Creates an automation rule. Requires the automations:manage permission. The rule is ENABLED as soon as it is created (the table default) and starts applying to the next matching conversation; use toggle_automation_rule to disable it. The server does not validate the content of rules: a malformed rule is stored and then silently never matches, so read it back with get_automation_rule. Example, assign every new conversation whose subject contains a text to agent 5: type new_conversation, events [], rules [{"group_operator":"AND","groups":[{"logical_op":"AND","rules":[{"field":"subject","field_type":"conversation","operator":"contains","value":"Company switched from","case_sensitive_match":false}]}],"actions":[{"type":"assign_user","value":["5"]}]}]. POST /api/v1/automations/rules Tags: Automations

Input Schema

NameRequiredDescriptionDefault
nameYes(body)
typeYes(body) new_conversation: on every new conversation. conversation_update: on the listed events. time_trigger: periodic, on the hours_since_* conditions
rulesYes(body) A JSON array of rule blocks, not a string
eventsNo(body) Only for conversation_update; leave empty for the other types
enabledNo(body) Only read by update_automation_rule, which stores it (false when omitted). Ignored on create: a created rule is always enabled
descriptionNo(body)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the permission gate, that the rule is ENABLED immediately on creation and will fire on the next matching conversation, and — critically — that the server performs no validation of `rules`, so a malformed rule is stored and silently never matches. It stops short of describing the response payload or any rate limits, but the dangerous behaviors are surfaced.

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?

Front-loaded with purpose then escalating to permissions, side effects, and a caveat, which is the right order for an agent. The single long inline JSON example is dense but earns its space given the nesting of `rules`; the trailing 'POST /api/v1/automations/rules' and 'Tags:' lines are framing noise rather than agent-relevant content.

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?

For a six-parameter mutation tool with a deeply nested rules object, no output schema, and no annotations, the description covers the permission requirement, the default-enabled side effect, the silent-failure validation gap, a recovery path, and a concrete example. Nothing an agent needs in order to call this correctly and safely is missing.

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 already 100%, so the baseline is 3; the description exceeds it by supplying a complete worked example of the deeply nested `rules` structure (group_operator, groups, field_type, operator, actions), which is far more usable than the schema's field-level prose. It also clarifies the create-time behavior of `enabled` implicitly through the 'always enabled' statement.

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 and resource ('Creates an automation rule') in the first line, and names the sibling that handles the opposite concern ('use `toggle_automation_rule` to disable it'). An agent can distinguish this from update_automation_rule or get_automation_rule without opening any schema.

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?

Gives clear preconditions (`automations:manage` permission), says when to route elsewhere for disabling, and prescribes a follow-up read via `get_automation_rule`. It does not explicitly say when to prefer update_automation_rule over creating a new rule, which is the one obvious omission.

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

Deploy Server

Other Tools