Tool Integration Not Reflecting in UI #6806

Closed
opened 2026-02-21 18:17:24 -05:00 by yindo · 4 comments
Owner

Originally created by @ibrahimcal on GitHub (Nov 17, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Created a new tool directory structure:
core/tools/provider/builtin/weather/
├── _assets/
│   └── icon.svg
├── weather.yaml
├── weather.py
├── tools/
│   ├── get_current_weather.yaml
│   └── get_current_weather.py
  1. Created provider configuration (weather.yaml):
identity:
  author: User
  name: weather
  label:
    en_US: WeatherAPI.com
  description:
    en_US: Get real-time weather data using WeatherAPI.com
  icon: icon.svg

credentials_for_provider:
  api_key:
    type: secret-input
    required: true
    # ... credential configuration
  1. Created tool configuration (tools/get_current_weather.yaml):
identity:
  name: get_current_weather
  author: User
  label:
    en_US: Get Current Weather
  description:
    human:
      en_US: Get the current weather in a given location

parameters:
  - name: location
    type: string
    required: true
    # ... parameter configuration
  - name: unit
    type: select
    required: false
    options:
      - value: celsius
      - value: fahrenheit
    # ... parameter configuration
  1. Added implementation files:

    • Created weather.py with WeatherProvider class
    • Created get_current_weather.py with GetCurrentWeatherTool class
    • Added appropriate icon in _assets folder
  2. Restarted the Dify API container

✔️ Expected Behavior

  • The new Weather tool should appear in the Tools UI
  • Should be able to configure the API key
  • Should be able to use the tool in conversations

Additional Notes

Actual Behavior

  • Changes are not reflected in the Tools UI
  • Cannot find the added files when checking inside the docker-api container

Questions

  1. Are there additional steps needed beyond those in the documentation?
  2. Is there a specific location where custom tools should be placed in the Docker container?
  3. Is there a required build/compilation step that's missing from the documentation?
Originally created by @ibrahimcal on GitHub (Nov 17, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.11.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Created a new tool directory structure: ``` core/tools/provider/builtin/weather/ ├── _assets/ │ └── icon.svg ├── weather.yaml ├── weather.py ├── tools/ │ ├── get_current_weather.yaml │ └── get_current_weather.py ``` 2. Created provider configuration (`weather.yaml`): ```yaml identity: author: User name: weather label: en_US: WeatherAPI.com description: en_US: Get real-time weather data using WeatherAPI.com icon: icon.svg credentials_for_provider: api_key: type: secret-input required: true # ... credential configuration ``` 3. Created tool configuration (`tools/get_current_weather.yaml`): ```yaml identity: name: get_current_weather author: User label: en_US: Get Current Weather description: human: en_US: Get the current weather in a given location parameters: - name: location type: string required: true # ... parameter configuration - name: unit type: select required: false options: - value: celsius - value: fahrenheit # ... parameter configuration ``` 4. Added implementation files: - Created `weather.py` with `WeatherProvider` class - Created `get_current_weather.py` with `GetCurrentWeatherTool` class - Added appropriate icon in `_assets` folder 5. Restarted the Dify API container ### ✔️ Expected Behavior - The new Weather tool should appear in the Tools UI - Should be able to configure the API key - Should be able to use the tool in conversations ## Additional Notes - Followed the documentation at https://docs.dify.ai/guides/tools/quick-tool-integration - Verified all file permissions and directory structure - Checked docker logs for any relevant errors ### ❌ Actual Behavior - Changes are not reflected in the Tools UI - Cannot find the added files when checking inside the docker-api container ## Questions 1. Are there additional steps needed beyond those in the documentation? 2. Is there a specific location where custom tools should be placed in the Docker container? 3. Is there a required build/compilation step that's missing from the documentation?
yindo added the 🔨 feat:tools label 2026-02-21 18:17:24 -05:00
yindo closed this issue 2026-02-21 18:17:24 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 17, 2024):

Hello, @ibrahimcal! I'm here to assist you with bug fixes, questions, and becoming a contributor. Let's dive into this together and see what we can uncover! 🤖

I found a similar unsolved discussion regarding tool development problems [1]. Additionally, there was a closed issue about workflow tools not appearing on localhost, which suggested ensuring the sandbox service is properly configured and running in your Docker setup [2].

For your specific issue, here are some steps and considerations:

  1. Directory Structure and Placement: Ensure that the directory structure and file placements are correct as per the documentation. The files should be placed under core/tools/provider/builtin/ with the correct subdirectory for your tool.

  2. Docker Configuration: Verify that your Docker setup is correctly configured to recognize new tools. This might involve ensuring that the Docker container has access to the new files. You might need to rebuild the Docker image if the files are not being recognized.

  3. Rebuilding Docker Image: If changes are not reflected, try rebuilding the Docker image. This can be done by running:

    docker-compose down
    docker-compose up --build
    

    This ensures that any new files or changes are included in the Docker container.

  4. Logs and Errors: Check the Docker logs for any errors or warnings that might indicate why the tool is not appearing. This can provide clues if there are issues with file permissions or configurations.

  5. Documentation Review: Double-check the documentation to ensure all steps were followed, especially regarding YAML configurations and Python class implementations.

If these steps do not resolve the issue, consider checking for any updates or additional documentation that might address tool integration in the latest version of Dify.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 17, 2024): <!-- Greeting --> Hello, @ibrahimcal! I'm here to assist you with bug fixes, questions, and becoming a contributor. Let's dive into this together and see what we can uncover! 🤖 <!-- Answer --> I found a similar unsolved discussion regarding tool development problems <sup>[[1]](https://github.com/langgenius/dify/discussions/8212)</sup>. Additionally, there was a closed issue about workflow tools not appearing on localhost, which suggested ensuring the `sandbox` service is properly configured and running in your Docker setup <sup>[[2]](https://github.com/langgenius/dify/issues/5135)</sup>. For your specific issue, here are some steps and considerations: 1. **Directory Structure and Placement**: Ensure that the directory structure and file placements are correct as per the documentation. The files should be placed under `core/tools/provider/builtin/` with the correct subdirectory for your tool. 2. **Docker Configuration**: Verify that your Docker setup is correctly configured to recognize new tools. This might involve ensuring that the Docker container has access to the new files. You might need to rebuild the Docker image if the files are not being recognized. 3. **Rebuilding Docker Image**: If changes are not reflected, try rebuilding the Docker image. This can be done by running: ```bash docker-compose down docker-compose up --build ``` This ensures that any new files or changes are included in the Docker container. 4. **Logs and Errors**: Check the Docker logs for any errors or warnings that might indicate why the tool is not appearing. This can provide clues if there are issues with file permissions or configurations. 5. **Documentation Review**: Double-check the documentation to ensure all steps were followed, especially regarding YAML configurations and Python class implementations. If these steps do not resolve the issue, consider checking for any updates or additional documentation that might address tool integration in the latest version of Dify. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Nov 17, 2024):

The bot's right, if you add some new tools, you need to rebuild the image if you are using docker image, if you are using source code, then only restart is required.

@crazywoola commented on GitHub (Nov 17, 2024): The bot's right, if you add some new tools, you need to rebuild the image if you are using docker image, if you are using source code, then only restart is required.
Author
Owner

@ibrahimcal commented on GitHub (Nov 20, 2024):

Rebuilding the docker image did not solve the problem. I think the problem is with the docker-compose.yaml, where it has the following:
services:

API service

api:
image: langgenius/dify-api:0.11.1

I think, it is reading the official image while executing the container

@ibrahimcal commented on GitHub (Nov 20, 2024): Rebuilding the docker image did not solve the problem. I think the problem is with the docker-compose.yaml, where it has the following: services: # API service api: image: langgenius/dify-api:0.11.1 I think, it is reading the official image while executing the container
Author
Owner

@transcendence-x commented on GitHub (Jan 6, 2025):

How did you solve it? I'm using the official image and have mapped the directory to the host machine.

@transcendence-x commented on GitHub (Jan 6, 2025): How did you solve it? I'm using the official image and have mapped the directory to the host machine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6806