A plugin can reverse invoke other tool-type plugins within the Dify platform. If you are unfamiliar with the basics of reverse invocation, first read Reverse Invocation of Dify Services.
Consider the following scenarios:
- A tool-type plugin implements a function, but the result is not as expected and the data needs post-processing.
- A task requires a web scraper, and you want the flexibility to choose the scraping service.
- You need to aggregate results from multiple tools, which is difficult to handle in a Workflow application.
In these cases, your plugin needs to call other existing tools: tools from the marketplace, a self-built Workflow as a Tool, or a custom tool. All of them are available through the plugin’s self.session.tool field.
Call Installed Tools#
Call any tool installed in the current Workspace, including other tool-type plugins.
Entry Point#
Interface#
provider: The plugin ID plus the tool provider name, formatted likelanggenius/google/google.tool_name: The specific tool name.parameters: The arguments passed to the tool.
Call Workflow as Tool#
See the Tool Plugin documentation for more information on Workflow as Tool.
Entry Point#
Interface#
provider: The ID of this tool.tool_name: The name specified when the tool was created.
Call Custom Tool#
Entry Point#
Interface#
provider: The ID of this tool.tool_name: Theoperation_idfrom the OpenAPI specification. If nooperation_idexists, this is thetool_nameautomatically generated by Dify, which you can find on the tool management page.
Related Resources#
- Reverse Invocation of Dify Services - Understand the fundamental concepts of reverse invocation
- Reverse Invocation App - Learn how to call Apps within the platform
- Reverse Invocation Model - Learn how to call model capabilities within the platform
- Tool Plugin Development Guide - Learn how to develop tool plugins
- Advanced Tool Plugins - Learn about advanced features like Workflow as Tool