Skip to main content
Glama

create_trigger

Create webhook, schedule, or email triggers to automate agent workflows, using schema-validated configs and returned call instructions for secure execution.

Instructions

Create a webhook, schedule or email trigger. Read zihin://schemas/trigger_config and use its exact enums. The server supplies tenant and record identifiers. The returned call block contains method, URL and authentication instructions; it does not return the API key value. Read zihin://skills/triggers-e-canais.

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": {
      "agent_id": "<agent_id>",
      "name": "<name>",
      "trigger_type": "<trigger_type>"
    },
    "name": "create_trigger"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesTrigger name
agent_idYesAgent UUID
api_key_idNoAPI key UUID for authenticated execution
descriptionNoTrigger description
trigger_typeYesTrigger type
trigger_configNoTrigger configuration; read zihin://schemas/trigger_config. WEBHOOK: query_extraction uses field or full_body; response_adapter selects raw, ebarn, slack, teams or twiml. context_mapping maps request fields; session_strategy uses derive or ephemeral; sender_access uses any, members or whitelist. execution uses sync or async, with optional acknowledgement and authenticated callback. message_buffer groups rapid messages (window_ms 1000–30000, default 5000; max_messages 1–50, default 10). split_config splits long responses. TwiML defaults strip_markdown=true and max_length=4096; override through callback.response_transform. SCHEDULE: cron and query_template are required; timezone defaults to America/Sao_Paulo. Each execution opens a new session. output.channel supports silent, webhook, callback or user. User delivery requires target (user_id or consumer_key); push is optional. Scheduled results are messages, not memory configuration. EMAIL: inbound_address, allowed_senders with mode all|domain|email and the matching domains/emails list, plus optional subject_filter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.2.4
    • changedInput schema / properties / agent_id / description
      Previous value: -"UUID do agente"New value: +"Agent UUID"
    • changedInput schema / properties / api_key_id / description
      Previous value: -"UUID da API Key para execução autenticada"New value: +"API key UUID for authenticated execution"
    • changedInput schema / properties / description / description
      Previous value: -"Descrição do trigger"New value: +"Trigger description"
    • changedInput schema / properties / name / description
      Previous value: -"Nome do trigger"New value: +"Trigger name"
    • changedInput schema / properties / trigger_config / description
      Previous value: -"Configuração do trigger. Estrutura por tipo:\n\nWEBHOOK: { query_extraction: { mode: \"field\"|\"full_body\", field?: string (default: \"message\") }, response_adapter: { format: \"ebarn\"|\"slack\"|\"teams\"|\"twiml\"|\"raw\", content_type?: string, max_length?: number }, context_mapping?: { campo: \"$.path.no.body\" }, session_strategy?: { mode: \"derive\"|\"ephemeral\", fields?: string[] }, sender_access?: { mode: \"any\"|\"members\"|\"whitelist\", identity_field?: string, match_column?: string, whitelist?: string[] }, execution?: { mode: \"sync\"|\"async\", ack_response?: { body: string|object, content_type: string }, callback?: { url: string, method: \"POST\"|\"PUT\"|\"PATCH\", content_type: string, auth: { type: \"basic\"|\"bearer\"|\"api_key\"|\"none\", secret_ref: string }, headers?: object, body_template: object|string, response_transform?: { strip_markdown: boolean, max_length: number } }, message_buffer?: { enabled: boolean, window_ms?: number (100-60000, default 5000), max_messages?: number (1-100, default 10), concat_separator?: string (default \"\\n\") }, split_config?: { enabled: boolean, max_chunk_size?: number (100-50000, default 1500), max_chunks?: number (1-50, default 10), chunk_strategy?: \"paragraph\"|\"sentence\"|\"length\" (default \"paragraph\"), numbering?: boolean (default true), inter_chunk_delay_ms?: number (0-10000, default 500) } } }\n\nSCHEDULE: { cron: string (ex: \"0 9 * * *\"), timezone?: string (default: \"America/Sao_Paulo\"), query_template: string (tarefa para o agente), enabled_days?: string[] (ex: [\"monday\",\"friday\"]), session_strategy?: { mode: \"new\" } (sessão nova a cada execução; é o único modo aceito para schedule), output?: { channel: \"silent\"|\"webhook\"|\"callback\"|\"user\" (default: \"silent\"; user = SPEC D: entrega na sessão do chat nativo + push, exige target: { field: \"user_id\"|\"consumer_key\", value }), webhook_url?: string (se channel=webhook), callback?: { url, method?, content_type?, auth?: { type, secret_ref }, body_template?, response_transform?: { strip_markdown?, max_length? } } (se channel=callback) } } — memory_config é REJEITADO pelo servidor (doc loop-review/38, onda 3): o resultado do schedule é entregue como MENSAGEM, use output.channel=\"user\"|\"callback\"|\"webhook\"\n\nEMAIL: { allowed_senders: string[], subject_filter?: string }"New value: +"Trigger configuration; read zihin://schemas/trigger_config. WEBHOOK: query_extraction uses field or full_body; response_adapter selects raw, ebarn, slack, teams or twiml. context_mapping maps request fields; session_strategy uses derive or ephemeral; sender_access uses any, members or whitelist. execution uses sync or async, with optional acknowledgement and authenticated callback. message_buffer groups rapid messages (window_ms 1000–30000, default 5000; max_messages 1–50, default 10). split_config splits long responses. TwiML defaults strip_markdown=true and max_length=4096; override through callback.response_transform. SCHEDULE: cron and query_template are required; timezone defaults to America/Sao_Paulo. Each execution opens a new session. output.channel supports silent, webhook, callback or user. User delivery requires target (user_id or consumer_key); push is optional. Scheduled results are messages, not memory configuration. EMAIL: inbound_address, allowed_senders with mode all|domain|email and the matching domains/emails list, plus optional subject_filter."
    • changedInput schema / properties / trigger_type / description
      Previous value: -"Tipo de trigger"New value: +"Trigger type"
  2. Changed2 schema fields changedv2.2.2
    • changedInput schema / properties / trigger_config / description
      Previous value: -"Configuração do trigger. Estrutura por tipo:\n\nWEBHOOK: { query_extraction: { mode: \"field\"|\"full_body\", field?: string (default: \"message\") }, response_adapter: { format: \"ebarn\"|\"slack\"|\"teams\"|\"twiml\"|\"raw\", content_type?: string, max_length?: number }, context_mapping?: { campo: \"$.path.no.body\" }, session_strategy?: { mode: \"derive\"|\"ephemeral\", fields?: string[] }, sender_access?: { mode: \"any\"|\"members\"|\"whitelist\", identity_field?: string, match_column?: string, whitelist?: string[] }, execution?: { mode: \"sync\"|\"async\", ack_response?: { body: string|object, content_type: string }, callback?: { url: string, method: \"POST\"|\"PUT\"|\"PATCH\", content_type: string, auth: { type: \"basic\"|\"bearer\"|\"api_key\"|\"none\", secret_ref: string }, headers?: object, body_template: object|string, response_transform?: { strip_markdown: boolean, max_length: number } }, message_buffer?: { enabled: boolean, window_ms?: number (100-60000, default 5000), max_messages?: number (1-100, default 10), concat_separator?: string (default \"\\n\") }, split_config?: { enabled: boolean, max_chunk_size?: number (100-50000, default 1500), max_chunks?: number (1-50, default 10), chunk_strategy?: \"paragraph\"|\"sentence\"|\"length\" (default \"paragraph\"), numbering?: boolean (default true), inter_chunk_delay_ms?: number (0-10000, default 500) } } }\n\nSCHEDULE: { cron: string (ex: \"0 9 * * *\"), timezone?: string (default: \"America/Sao_Paulo\"), query_template: string (tarefa para o agente), enabled_days?: string[] (ex: [\"monday\",\"friday\"]), session_strategy?: { mode: \"new\"|\"persistent\" }, output?: { channel: \"webhook\"|\"silent\"|\"callback\" (default: \"silent\"), webhook_url?: string (se channel=webhook), callback?: { url, method?, content_type?, auth?: { type, secret_ref }, body_template?, response_transform?: { strip_markdown?, max_length? } } (se channel=callback) }, memory_config?: { enabled: boolean, user_key_field?: string (campo do body_template, ex: \"To\"), strip_prefix?: string (ex: \"whatsapp:\"), ttl_hours?: number (default: 48), user_key?: string (fixo, alternativa a user_key_field) } }\n\nDB_EVENT: { table: string, events: [\"INSERT\"|\"UPDATE\"|\"DELETE\"], conditions?: object }\n\nEMAIL: { allowed_senders: string[], subject_filter?: string }"New value: +"Configuração do trigger. Estrutura por tipo:\n\nWEBHOOK: { query_extraction: { mode: \"field\"|\"full_body\", field?: string (default: \"message\") }, response_adapter: { format: \"ebarn\"|\"slack\"|\"teams\"|\"twiml\"|\"raw\", content_type?: string, max_length?: number }, context_mapping?: { campo: \"$.path.no.body\" }, session_strategy?: { mode: \"derive\"|\"ephemeral\", fields?: string[] }, sender_access?: { mode: \"any\"|\"members\"|\"whitelist\", identity_field?: string, match_column?: string, whitelist?: string[] }, execution?: { mode: \"sync\"|\"async\", ack_response?: { body: string|object, content_type: string }, callback?: { url: string, method: \"POST\"|\"PUT\"|\"PATCH\", content_type: string, auth: { type: \"basic\"|\"bearer\"|\"api_key\"|\"none\", secret_ref: string }, headers?: object, body_template: object|string, response_transform?: { strip_markdown: boolean, max_length: number } }, message_buffer?: { enabled: boolean, window_ms?: number (100-60000, default 5000), max_messages?: number (1-100, default 10), concat_separator?: string (default \"\\n\") }, split_config?: { enabled: boolean, max_chunk_size?: number (100-50000, default 1500), max_chunks?: number (1-50, default 10), chunk_strategy?: \"paragraph\"|\"sentence\"|\"length\" (default \"paragraph\"), numbering?: boolean (default true), inter_chunk_delay_ms?: number (0-10000, default 500) } } }\n\nSCHEDULE: { cron: string (ex: \"0 9 * * *\"), timezone?: string (default: \"America/Sao_Paulo\"), query_template: string (tarefa para o agente), enabled_days?: string[] (ex: [\"monday\",\"friday\"]), session_strategy?: { mode: \"new\" } (sessão nova a cada execução; é o único modo aceito para schedule), output?: { channel: \"silent\"|\"webhook\"|\"callback\"|\"user\" (default: \"silent\"; user = SPEC D: entrega na sessão do chat nativo + push, exige target: { field: \"user_id\"|\"consumer_key\", value }), webhook_url?: string (se channel=webhook), callback?: { url, method?, content_type?, auth?: { type, secret_ref }, body_template?, response_transform?: { strip_markdown?, max_length? } } (se channel=callback) } } — memory_config é REJEITADO pelo servidor (doc loop-review/38, onda 3): o resultado do schedule é entregue como MENSAGEM, use output.channel=\"user\"|\"callback\"|\"webhook\"\n\nEMAIL: { allowed_senders: string[], subject_filter?: string }"
    • changedInput schema / properties / trigger_type / enum
      Previous value: -[
      -  "webhook",
      -  "db_event",
      -  "email",
      -  "schedule"
      -]New value: +[
      +  "webhook",
      +  "email",
      +  "schedule"
      +]
  3. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations cover the safety profile (not read-only, not destructive, not idempotent), and the description adds genuinely non-obvious behavior: the server supplies tenant and record identifiers, and the returned call block contains method, URL and authentication instructions but deliberately omits the API key value. That last point prevents a real agent error. It stops short of describing enabled/disabled state after creation or duplicate-name behavior.

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 action and the three types, then prerequisites, then return-payload caveats; no sentence simply restates schema fields. The trailing pointer to zihin://skills/triggers-e-canais is terse to the point of being cryptic, which is the only rough edge.

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 complex tool with a nested trigger_config object across three trigger types and no output schema, the description orients the agent correctly: it delegates detailed config semantics to a named schema resource and explains the shape of the return value. Missing are the post-creation state of the trigger and any auth/permission requirements.

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 schema already carries the parameter burden and the baseline would be 3. The description adds a small but material clarification beyond it — that tenant and record identifiers are server-supplied, so the agent should not try to pass them — and reinforces that trigger_config enums must come from the referenced schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb plus the three resource variants it creates (webhook, schedule, email trigger), which is enough to distinguish it from siblings like update_trigger or test_trigger. It doesn't explicitly name those siblings as alternatives, so it falls short of full differentiation.

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

Usage Guidelines3/5

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

It does give concrete prerequisites: read zihin://schemas/trigger_config and use its exact enums, and read zihin://skills/triggers-e-canais. However, there is no explicit when-to-use/when-not-to-use guidance relative to update_trigger, test_trigger, or toggle_trigger, so the agent must infer the boundary.

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