Skip to main content
Glama

create_trigger

Creates a condition over one or more sources that Tares evaluates continuously and, when it trips, wakes subscribed agents with the correlated timeline.

Instructions

Create a trigger: a condition Tares evaluates continuously over one or more sources; when it trips, subscribed agents are woken with the correlated timeline. sources names the sources it watches (at least one). filters [{field, op, value}] (ops: eq, neq, in (a list), contains, gt, lt, gte, lte) narrows them. key_field is the entity label (default: the primary label of the first source). condition is {aggregate: any|avg|count|max|min|sum, field: numeric label to aggregate (omit for count), predicate: e.g. '> 1.0' / '>= 5' / '== 0', window: detection window e.g. '1m'}. emit is {kind: what a firing is called e.g. error_spike, context_window: timeline the woken agent receives e.g. '15m'}. project is the project id the trigger belongs to (default: the default project); its sources join that project. description (optional) says in one plain line what wakes it, phrased to follow "When", e.g. "an alert fires in the checkout service"; the project page uses it instead of the rule's own wording (at most 160 characters, one line). catalog_describe a source to confirm its labels first. Wire agents to it with subscribe().

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>",
      "sources": "<sources>",
      "condition": "<condition>"
    },
    "name": "create_trigger"
  }
}

Input Schema

NameRequiredDescriptionDefault
emitNo
nameYes
filtersNo
projectNo
sourcesYes
cooldownNo5m
conditionYes
key_fieldNo
descriptionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.57.0

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: continuous evaluation, the wake-up side effect on subscribed agents, the emitted firing kind and context window, and defaults for key_field and project. However, `cooldown` (a parameter with a 5m default) is never explained, and there is no mention of permission requirements, trigger-count limits, or whether creation has side effects beyond project membership.

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 the concept before the parameter walkthrough, and nearly every clause carries real information. The prose is dense to the point of being a run-on paragraph, and inline examples ('> 1.0', 'an alert fires in the checkout service') add length, but they earn their place by anchoring formats.

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 9-parameter mutation tool with nested objects and zero annotation coverage, the description covers required fields, defaults, validation constraints, and the downstream workflow. An output schema exists, so return values need not be explained, and the only real omission is cooldown semantics.

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 coverage is 0% across 9 parameters, so the description must compensate entirely, and it does: it enumerates all filter operators, the aggregate/predicate/window structure of `condition`, the `emit` shape, the key_field default, the project-scoping effect on sources, and the 160-character one-line constraint on `description`. Only `cooldown` is left undefined.

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?

Opens with a specific verb+resource pair and immediately defines the domain concept: a condition evaluated continuously over sources that wakes subscribed agents with a correlated timeline. This is far more than a restatement of the name and lets an agent distinguish create_trigger from update_trigger or subscribe without opening a 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 concrete workflow guidance — 'catalog_describe a source to confirm its labels first' as a prerequisite and 'Wire agents to it with subscribe()' as the follow-up step. It does not explicitly state when to use create_trigger versus update_trigger, but the create/update split is self-evident from the verb.

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