add mcp tool report an error #15286

Closed
opened 2026-02-21 19:21:02 -05:00 by yindo · 1 comment
Owner

Originally created by @skyfire0705 on GitHub (Jul 11, 2025).

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

1.6.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The following error will be prompted when saving or authorizing.

'String' is not a valid ToolParameter.ToolParameterType 'String' is not a valid ToolParameter.ToolParameterType

✔️ Expected Behavior

save and authorize without error

Actual Behavior

Originally created by @skyfire0705 on GitHub (Jul 11, 2025). ### 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 1.6.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce The following error will be prompted when saving or authorizing. 'String' is not a valid ToolParameter.ToolParameterType 'String' is not a valid ToolParameter.ToolParameterType ### ✔️ Expected Behavior save and authorize without error ### ❌ Actual Behavior <!-- Failed to upload "image.png" -->
yindo added the 🐞 bugstale labels 2026-02-21 19:21:02 -05:00
yindo closed this issue 2026-02-21 19:21:02 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 11, 2025):

The error happens because Dify expects tool parameter types to match specific enum values exactly—so it must be STRING (all uppercase), not String (capitalized) or any other variation. This is a case-sensitive check enforced in the backend, and using the wrong case will trigger the error you saw when saving or authorizing the mcp tool. The valid types include STRING, NUMBER, BOOLEAN, SELECT, SECRET_INPUT, FILE, FILES, APP_SELECTOR, MODEL_SELECTOR, DYNAMIC_SELECT, ARRAY, and OBJECT (see code reference).

To fix this, update your tool configuration so that all parameter types use the correct uppercase enum values (for example, STRING instead of String). This should resolve the error and allow you to save and authorize the tool.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 11, 2025): <!-- Answer --> The error happens because Dify expects tool parameter types to match specific enum values exactly—so it must be `STRING` (all uppercase), not `String` (capitalized) or any other variation. This is a case-sensitive check enforced in the backend, and using the wrong case will trigger the error you saw when saving or authorizing the mcp tool. The valid types include `STRING`, `NUMBER`, `BOOLEAN`, `SELECT`, `SECRET_INPUT`, `FILE`, `FILES`, `APP_SELECTOR`, `MODEL_SELECTOR`, `DYNAMIC_SELECT`, `ARRAY`, and `OBJECT` [(see code reference)](https://github.com/langgenius/dify/blob/1d85979a7464d8d4d01e582eb6083d4206ea46ba/api/core/tools/entities/tool_entities.py). To fix this, update your tool configuration so that all parameter types use the correct uppercase enum values (for example, `STRING` instead of `String`). This should resolve the error and allow you to save and authorize the tool. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5e1e97f6-ba0a-4552-9f39-86b2638ecab4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5e1e97f6-ba0a-4552-9f39-86b2638ecab4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5e1e97f6-ba0a-4552-9f39-86b2638ecab4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5e1e97f6-ba0a-4552-9f39-86b2638ecab4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5e1e97f6-ba0a-4552-9f39-86b2638ecab4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5e1e97f6-ba0a-4552-9f39-86b2638ecab4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5e1e97f6-ba0a-4552-9f39-86b2638ecab4?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/22240)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15286