Skip to main content
Glama

connect_playbook_to_trigger

DestructiveIdempotent

Make a playbook use a trigger: it gets the items the trigger finds that its filter says yes to. Saves on the playbook's working copy; it only takes effect when the playbook is published, and that needs the trigger published first. rule says in plain words which items it runs for; filter is a module with export function filter(record) (it must say export, or it fails on every item). try_playbook_filter can validate the filter first. Connecting again to the same trigger replaces the filter.

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": {
      "triggerId": "<triggerId>",
      "playbookId": "<playbookId>",
      "rule": "<rule>",
      "filter": "<filter>"
    },
    "name": "connect_playbook_to_trigger"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleYesWhich items it runs for, in plain words, e.g. "Runs for urgent open tickets".
filterYesA module with `export function filter(record)` returning true or false. It must say `export`.
triggerIdYesThe trigger's id, from list_triggers or create_trigger.
playbookIdYesThe playbook to connect, from list_playbooks.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: the change is written to the playbook's working copy and only takes effect on publish, publishing requires the trigger to be published first, and reconnecting replaces the existing filter (which explains the destructiveHint=true). It also flags a concrete failure mode for the filter module missing `export`.

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 but front-loaded: the core effect comes first, then persistence/publish semantics, then parameter notes, then the sibling pointer. The first sentence is slightly convoluted ("it gets the items the trigger finds that its filter says yes to") but no sentence is filler.

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 four-parameter mutation with no output schema, the description covers persistence, publish prerequisites, repeat-call behavior, and a validation path via a sibling tool. An agent has everything needed to invoke it correctly and understand when the effect materializes.

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 baseline is 3; the description adds value by explaining the failure consequence of a filter module without `export` ("it fails on every item") and by characterizing `rule` as plain-language intent rather than code. It does not add format or syntax detail for `filter` beyond the schema, keeping it at 4.

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 ("Make a playbook use a trigger") plus the effect (the playbook receives the items the trigger's filter accepts). That is clearly distinct from disconnect_playbook_from_trigger and from try_playbook_filter, which is named as a validation step rather than the action itself.

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 real ordering guidance: the trigger must be published first, the change only takes effect when the playbook is published, and try_playbook_filter can validate the filter beforehand. Re-connecting to the same trigger is described as replacing the filter, which tells the agent what happens on repeat calls. There is no explicit "do not use this for X" exclusion, so it falls just short of a 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