Skip to main content

Template Variable Catalog

This page lists all recommended template variables for message_template in approval configurations. For an overview of how approval works, see Human-in-the-Loop Approval.

Tool Invocation Variables

VariableDescriptionAvailable On
{{tool_name}}Alias of the tool being invokedlocal_tools, mcp_servers allowed_tools
{{tool_args}}Full tool arguments as JSON stringlocal_tools, mcp_servers allowed_tools
{{tool_args.<key>}}Specific argument valuelocal_tools, mcp_servers allowed_tools
{{tool_args.<key>.<nested>}}Nested argument valuelocal_tools, mcp_servers allowed_tools
{{agent_alias}}Alias of the agent executing the toolAll contexts
{{agent_id}}The agent's metadata.idAll contexts
{{mcp_server_alias}}Alias of the MCP server (for MCP tools)mcp_servers allowed_tools

Remote Agent Skill Variables

VariableDescriptionAvailable On
{{skill_id}}A2A skill ID being invokedremote_agents allowed_skills
{{skill_args}}Full skill arguments as JSON stringremote_agents allowed_skills
{{skill_args.<key>}}Specific skill argument valueremote_agents allowed_skills
{{remote_agent_alias}}Alias of the remote agentremote_agents

Agent Delegation Variables

Used in message_template on local_agents[].approval and remote_agents[].approval. Since delegation approval gates whether a sub-agent is invoked (not a specific tool call), the available variables reference the parent agent's input context.

VariableDescriptionAvailable On
{{parent.input.<key>}}Field from the parent agent's inputlocal_agents, remote_agents
{{agent_alias}}Alias of the sub-agent being delegated tolocal_agents, remote_agents
{{agent_id}}The parent agent's metadata.idAll contexts

Rendering Rules

  1. Missing variables render as empty string (no error). This prevents template failures when tool arguments vary.
  2. Nested access is supported: {{tool_args.order.details.amount}}.
  3. No logic -- templates are pure interpolation, not a scripting language.
  4. Encoding -- template output is plain text. HTML/Markdown formatting is the Runtime's responsibility.
  5. Runtimes MAY support additional variables beyond this catalog.