The tool output defines what the tool returns to its caller: a JSON schema the result is validated against before it's sent back. This article walks integrator.io users through the Define tool output editor — naming the step, building the output schema, and previewing the final payload — and then points you to mapping, where you connect your steps' results to the schema. For the schema editor's types, validations, and modes, see Tool schema and validation reference.
Important
Prerequisites: Add lookups and imports to a tool. A tool with no logic step has nothing to return.
Define the output
- Go to AI studio, and then select Tools.
- Select the tool, and then select Tool output on the canvas. The Define tool output editor opens.
- Under General, enter Name your tool output and a Description. The name replaces the placeholder
outputon the canvas. - Under Create schema, build the output schema the same way as the input schema: Manual for a flat result, JSON for anything that needs
anyOf,$ref, or other keywords. If an AI agent calls the tool, use JSON mode and check the provider's keyword support in Tool schema and validation reference.
Preview the output
The Input tab shows the record the output step receives from the tool's logic steps, generated from the tool's configuration. Select Preview, and then select Send, to see the payload the caller would receive after hooks and mapping. A validation error here means the mapped result doesn't satisfy the output schema — usually a required property that isn't mapped.
Map the result into the schema
The output schema only describes the shape. To fill it, map the results of your lookups and imports into it: see Map data in a tool. To run a script before or after the mapping, select More on the Tool output step, and then select Pre map hook or Post map hook. For the hook stages, see Hooks and scripts.