Contents

Tool Input

tool_input · Nodes · Input Output · Trigger

Input node to invoke this workflow as a tool. Declares the description and schema visible to calling agents

Tool Input#

The start node of a workflow that is called as a tool. It declares the tool's description and the arguments it accepts, and splits one invocation into the model's arguments and the caller's context.

A workflow without a Tool Input node cannot be called as a tool: pickers do not offer it, and a caller pointed at any other start node fails.

When to Use#

  • Workflow-as-a-tool — the entry point for a workflow invoked by Subworkflow Tool, a workflow_tools selection (which an agent asks for with tool_attach_workflow), or an agent session
  • Tool contract — declare the description and argument JSON Schema once, on the workflow that consumes the arguments, rather than on every caller
  • Separating data from arguments — keep caller-supplied ids, tenants, and secrets out of what the model sees and supplies

Use a plain Input node for a workflow parameterized by a subworkflow call rather than by a tool call.

How It Works#

  1. A caller invokes the tool and delivers exactly {"args": ..., "context": ...} to this node
  2. args is validated against args_schema; a non-conforming call fails the run on this node
  3. args and context leave on their own output sockets

description and args_schema are what every caller publishes as the tool's description and parameter schema, so the model is told the same contract this node enforces. Callers carry only the tool's name.

Configuration#

  • args_schema — JSON Schema the calling agent's arguments must satisfy
    • Must be an object schema with properties
    • Omit it for a tool that takes no arguments; anything the caller sends then passes through unchecked
  • description — the tool description the model sees
    • Every caller shows it as the tool's description: a Subworkflow Tool node, a workflow_tools selection, and an agent session
    • Say what the tool does, when to call it, and what it returns; do not describe the workflow's inner workings
    • Left empty, callers fall back to a generic "Execute the '' workflow" description

Inputs#

None. The invocation payload is delivered by the caller, not by an edge.

Outputs#

  • args — the validated arguments the model supplied
  • context — the caller's context, {} when nothing was supplied

Wiring Pattern#

[Tool Input] → (args)    → [Do the work] → [Set Workflow Output]
             → (context) → [Use the ids/tenant the caller supplied]

Usage Example#

{
  "id": "input",
  "node": {
    "tool_input": {
      "args_schema": {
        "type": "object",
        "properties": { "secret": { "type": "string" } },
        "required": ["secret"]
      },
      "description": "Checks whether a secret matches. Call it with the guessed secret; returns whether it matched."
    }
  }
}

Called with {"secret": "Paris"} from an agent session, this node emits:

  • args: {"secret": "Paris"}
  • context: {"session_id": "01K..."}

Important Behaviors#

  • The payload is closed: a key other than args or context fails the run, so a caller still sending an old shape is reported rather than silently dropped
  • args and context must each be a JSON object or absent; absent becomes {}
  • Running this node outside a tool invocation fails: there is no default payload, and a graph exercised by hand should be driven by its own trigger and data nodes
  • Where context comes from depends on the caller: a Subworkflow Tool node with Supply Context Into Tool on hands over its input socket data, a workflow_tools selection hands over its configured context, and an agent session hands over its own session_id

Troubleshooting#

"Tool Input arguments did not match the declared schema"#

The model sent arguments args_schema rejects. The message names the failing constraints; either widen the schema or improve this node's description so the model sends the right shape.

"Tool Input accepts only "args" and "context""#

The caller delivered an older payload shape, such as tool_args. Re-save the calling workflow so it is rebuilt against the current contract.

"Tool Input runs only as a tool invocation"#

The node ran with no invocation payload, which means the workflow was started some other way. Give the workflow a trigger of its own for manual runs.

  • Subworkflow Tool — publishes a workflow with a Tool Input node as a callable tool
  • Tool Provider — the workflow_tools group does the same from a tool selection
  • Set Workflow Output — what the caller receives back
  • Input — the non-tool entry point, for subworkflow calls and parameterized runs

Inputs

None.

Outputs

  • args
  • context

Configuration

FieldTypeRequiredDescription
args_schemajson_schemaYesJSON Schema the calling agent's arguments must satisfy
descriptiontextYesThe tool description the model sees. Every caller (Tool Workflow groups, Subworkflow Tool nodes, agent sessions) shows this text to the model as the tool's description. Describe what the tool does and when to call it, not the workflow's inner workings
base_configrecordNoShared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow).