> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool

> Call installed tools, Workflow as Tool, and custom tools from your plugin

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](/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation).

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

```python theme={null}
    self.session.tool
```

### Interface

```python theme={null}
    def invoke_builtin_tool(
        self, provider: str, tool_name: str, parameters: dict[str, Any]
    ) -> Generator[ToolInvokeMessage, None, None]:
        pass
```

* **`provider`**: The plugin ID plus the tool provider name, formatted like `langgenius/google/google`.
* **`tool_name`**: The specific tool name.
* **`parameters`**: The arguments passed to the tool.

## Call Workflow as Tool

See the [Tool Plugin documentation](/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin) for more information on Workflow as Tool.

### Entry Point

```python theme={null}
    self.session.tool
```

### Interface

```python theme={null}
    def invoke_workflow_tool(
        self, provider: str, tool_name: str, parameters: dict[str, Any]
    ) -> Generator[ToolInvokeMessage, None, None]:
        pass
```

* **`provider`**: The ID of this tool.
* **`tool_name`**: The name specified when the tool was created.

## Call Custom Tool

### Entry Point

```python theme={null}
    self.session.tool
```

### Interface

```python theme={null}
    def invoke_api_tool(
        self, provider: str, tool_name: str, parameters: dict[str, Any]
    ) -> Generator[ToolInvokeMessage, None, None]:
        pass
```

* **`provider`**: The ID of this tool.
* **`tool_name`**: The `operation_id` from the OpenAPI specification. If no `operation_id` exists, this is the `tool_name` automatically generated by Dify, which you can find on the tool management page.

## Related Resources

* [Reverse Invocation of Dify Services](/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation) - Understand the fundamental concepts of reverse invocation
* [Reverse Invocation App](/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-app) - Learn how to call Apps within the platform
* [Reverse Invocation Model](/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-model) - Learn how to call model capabilities within the platform
* [Tool Plugin Development Guide](/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin) - Learn how to develop tool plugins
* [Advanced Tool Plugins](/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin) - Learn about advanced features like Workflow as Tool
