Overview
Before diving into the detailed interface documentation, make sure you have a general understanding of the tool integration process for Dify plugins.
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 various message types such as
text, links, images, file BLOBs, and JSON. These messages can be returned through specialized interfaces.files, text, and json. The methods below help you populate these variables with appropriate content.
Message Types
Parameters
Parameters
string
required
URL to an image that will be downloaded and displayed
string
required
URL to be displayed as a clickable link
string
required
Text content to be displayed
bytes
required
Raw file data in bytes format
dict
File metadata including:
mime_type: The MIME type of the file (e.g., “image/png”)- Other metadata relevant to the file
dict
required
Python dictionary to be serialized as JSON
Variables
Parameters
Parameters
Custom Output Variables
To reference a tool’s output variables in a workflow application, you need to define which variables might be output. This is done using the JSON Schema format in your tool’s manifest.
Define Output Schema
Schema Structure
Schema Structure
Example Implementation
Examples
Complete Tool Implementation
Edit this page | Report an issue