Overview
A tool returns its results as messages and variables. This page covers the message interfaces, variable creation, and output schema definitions.Message Types
Return different types of messages such as text, links, images, and JSON
Variables
Create and manipulate variables for workflow integration
Output Schema
Define custom output variables for workflow references
Data Structure
Message Return
Dify supports several message typesâtext, links, images, file blobs, and JSONâeach returned through a dedicated interface. By default, a toolâs output in a workflow includes three fixed variables:files, text, and json. The methods below populate these variables.
Message Types
Parameters
Parameters
File metadata, including:
mime_type: The MIME type of the file, for exampleimage/png.- Other metadata relevant to the file.
Variables
Parameters
Parameters
Custom Output Variables
To reference a toolâs output variables in a Workflow application, declare which variables the tool might output using JSON Schema in the toolâs manifest.Define Output Schema
Schema Structure
Schema Structure