Skip to main content
Glama

Upsert Agent Trigger

upsertAgentTrigger
Idempotent

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

TableJSON 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.8/5.0
Behavior5/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false, but the description adds substantial behavior the annotations cannot express: the one-trigger-per-integration replacement rule, the @mention exception where filter_config is left untouched, and the specific error codes/statuses (409, 400) an agent must handle.

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 core action and prerequisites, and every sentence carries real information (error codes, exception rules). It is dense and uses long em-dash clauses with parenthetical error identifiers, which slightly taxes readability but does not waste space.

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 mutation tool with no output schema, the description covers the prerequisite (integration already connected), the pause-vs-delete semantics, the uniqueness/replacement model, and the failure modes. Nothing an agent needs in order to invoke this correctly appears to be 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 description coverage is 100%, so the baseline is 3; however the description adds cross-parameter semantics the schema states only partially, e.g. that trigger_type replacement replaces the whole trigger and that teams_mention requires filter_config.tenantId. Much of the filter_config replacement wording does overlap with the schema, keeping this at 4 rather than 5.

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 combination ('Create or update the authenticated user's trigger for an integration on an agent') and immediately scopes it with the idempotent upsert semantics. An agent can distinguish this from the sibling create/update/delete single-trigger routes because the description explains that one trigger exists per integration per user and that a different trigger_type replaces it.

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

Usage Guidelines5/5

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

Gives explicit when-to-use and when-not-to-use guidance: use `enabled: false` to pause instead of deleting, and manage @mention triggers from the agent's mention setting 'throughout' rather than here. It also names the conditions that make this route fail (409 mention_trigger_protected, 400 mention_trigger_workspace_required), effectively routing the agent to alternatives.

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