Skip to main content
Glama

Upsert Agent Trigger

upsertAgentTrigger
DestructiveIdempotent

Create or update the authenticated user's trigger for an integration on an agent. The integration must already be connected to the agent (its OAuth connection set up in the Duvo dashboard). Set enabled: false to pause a trigger without deleting it. An agent holds one trigger per integration for a user, so a save with a different trigger_type replaces the existing one — except when that trigger is an @mention trigger, which is managed from the agent's mention setting and answers 409 (mention_trigger_protected) here. @mention triggers are best managed from that setting throughout: this route leaves an existing one's filter_config untouched, and refuses to create a teams_mention trigger without a filter_config.tenantId (400, mention_trigger_workspace_required) — a Slack mention trigger has no equivalent field to supply.

Input Schema

NameRequiredDescriptionDefault
agentIdYesThe agent's unique identifier
enabledNoWhether the trigger is active. Defaults to true.
trigger_typeYesTrigger type within the integration (e.g. `email_received`). Discover valid values via the trigger types endpoint. Integrations that enumerate their trigger types (Microsoft Teams, Google Drive, Google Sheets) reject anything else with 400 (`trigger_type_unsupported`), except a save that pauses a trigger already carrying that type.
filter_configNoIntegration-specific filter config (e.g. sender/subject filters). Shape comes from the integration's filter schema. Replaces the trigger's current config, so send the whole object — except on an @mention trigger, whose config is managed from the agent's mention setting and is left as it is.
integration_slugYesIntegration slug the trigger fires for (e.g. `gmail`, `outlook`, `linear-native`, `google-drive`).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / trigger_type / description
      Previous value: -"Trigger type within the integration (e.g. `email_received`). Discover valid values via the trigger types endpoint."New value: +"Trigger type within the integration (e.g. `email_received`). Discover valid values via the trigger types endpoint. Integrations that enumerate their trigger types (Microsoft Teams, Google Drive, Google Sheets) reject anything else with 400 (`trigger_type_unsupported`), except a save that pauses a trigger already carrying that type."
  2. Changed1 schema field changed
    • changedInput schema / properties / filter_config / description
      Previous value: -"Integration-specific filter config (e.g. sender/subject filters). Shape comes from the integration's filter schema."New value: +"Integration-specific filter config (e.g. sender/subject filters). Shape comes from the integration's filter schema. Replaces the trigger's current config, so send the whole object — except on an @mention trigger, whose config is managed from the agent's mention setting and is left as it is."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare the safety profile (destructive, idempotent, non-read-only). The description adds substantial behavior the annotations cannot: replacement semantics when trigger_type changes, 409 mention_trigger_protected, 400 mention_trigger_workspace_required, 400 trigger_type_unsupported, and the fact that an existing @mention trigger's filter_config is left untouched rather than overwritten.

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?

Purpose is front-loaded in the first sentence, and the dense error-code/edge-case detail that follows is information-dense rather than filler. It is long, but every clause carries a distinct operative rule, so only mild trimming is possible.

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?

For a 5-parameter upsert with nested objects, no output schema and annotation-covered safety, the description covers prerequisites, replacement semantics, protected-resource behavior and three distinct error codes. It never says what the response contains (the resulting trigger object), which is the one remaining gap for an agent verifying success.

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?

With 100% schema coverage the baseline is 3, and the description earns an extra point: it explains that enabled:false pauses without deleting, that filter_config is replaced wholesale, and that teams_mention requires a filter_config.tenantId while Slack has no equivalent field. Some of this (whole-object replacement) is also in the schema, so it is not entirely additive.

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 first sentence gives a precise verb pair (create or update) and resource (the authenticated user's trigger for an integration on an agent), and the upsert scope is immediately evident. An agent can tell this apart from the specialized createAgentSlackTrigger/createAgentCaseTrigger variants and from deleteAgentTrigger 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?

It states a real prerequisite (the integration must already be connected via OAuth in the dashboard) and a routing recommendation (@mention triggers should be managed from the agent's mention setting throughout). It stops short of naming the alternative tools (e.g. listAgentTriggerTypes to discover valid values) explicitly, so the agent must infer the siblings.

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