Custom tool parameter support issues #14982

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

Originally created by @zswll2 on GitHub (Jun 28, 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.5.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

    "/proposals/{id}/lines": {
      "post": {
        "operationId": "addProposalLines",
        "summary": "添加报价单行项目",
        "description": "为指定ID的报价单添加行项目",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "报价单ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "DOLAPIKEY",
            "in": "query",
            "description": "API密钥",
            "required": true,
            "schema": {
              "type": "string",
              "default": "xxx"
            }
          }
        ],
        "requestBody": {
          "description": "报价单行项目数据",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "desc": {
                      "type": "string",
                      "description": "产品描述",
                      "example": "高级定制产品 - 型号XYZ123"
                    },
                    "product_type": {
                      "type": "integer",
                      "description": "产品类型(0=产品, 1=服务)",
                      "example": 0
                    },
                    "qty": {
                      "type": "number",
                      "description": "数量",
                      "example": 100
                    },
                    "tva_tx": {
                      "type": "number",
                      "description": "增值税率(%)",
                      "example": 13
                    },
                    "multicurrency_subprice": {
                      "type": "number",
                      "description": "单价(外币)",
                      "example": 25.75
                    },
                    "remise_percent": {
                      "type": "number",
                      "description": "折扣百分比(%)",
                      "example": 5
                    },
                    "fk_product": {
                      "type": "integer",
                      "description": "产品ID(可选,如果使用现有产品)",
                      "example": null
                    }
                  }
                }
              },
              "examples": {
                "singleLine": {
                  "value": [
                    {
                      "desc": "高级定制产品 - 型号XYZ123",
                      "product_type": 0,
                      "qty": 100,
                      "tva_tx": 13,
                      "multicurrency_subprice": 25.75,
                      "remise_percent": 5
                    }
                  ]
                },
                "multipleLines": {
                  "value": [
                    {
                      "desc": "产品A",
                      "product_type": 0,
                      "qty": 50,
                      "tva_tx": 13,
                      "multicurrency_subprice": 10.5,
                      "remise_percent": 0
                    },
                    {
                      "desc": "服务B",
                      "product_type": 1,
                      "qty": 2,
                      "tva_tx": 6,
                      "multicurrency_subprice": 200,
                      "remise_percent": 10
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功添加报价单行项目",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "description": "添加的行项目ID"
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求错误"
          },
          "404": {
            "description": "报价单不存在"
          },
          "500": {
            "description": "服务器错误"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {}
  }
}

✔️ Expected Behavior

For example, in the data of this custom widget's requestBody, "required": true, but there is no input area on the test page.
Is this not supported, or is it a bug?

Image

Actual Behavior

No parameter input box will appear.

Originally created by @zswll2 on GitHub (Jun 28, 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.5.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ``` "/proposals/{id}/lines": { "post": { "operationId": "addProposalLines", "summary": "添加报价单行项目", "description": "为指定ID的报价单添加行项目", "parameters": [ { "name": "id", "in": "path", "description": "报价单ID", "required": true, "schema": { "type": "integer" } }, { "name": "DOLAPIKEY", "in": "query", "description": "API密钥", "required": true, "schema": { "type": "string", "default": "xxx" } } ], "requestBody": { "description": "报价单行项目数据", "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "desc": { "type": "string", "description": "产品描述", "example": "高级定制产品 - 型号XYZ123" }, "product_type": { "type": "integer", "description": "产品类型(0=产品, 1=服务)", "example": 0 }, "qty": { "type": "number", "description": "数量", "example": 100 }, "tva_tx": { "type": "number", "description": "增值税率(%)", "example": 13 }, "multicurrency_subprice": { "type": "number", "description": "单价(外币)", "example": 25.75 }, "remise_percent": { "type": "number", "description": "折扣百分比(%)", "example": 5 }, "fk_product": { "type": "integer", "description": "产品ID(可选,如果使用现有产品)", "example": null } } } }, "examples": { "singleLine": { "value": [ { "desc": "高级定制产品 - 型号XYZ123", "product_type": 0, "qty": 100, "tva_tx": 13, "multicurrency_subprice": 25.75, "remise_percent": 5 } ] }, "multipleLines": { "value": [ { "desc": "产品A", "product_type": 0, "qty": 50, "tva_tx": 13, "multicurrency_subprice": 10.5, "remise_percent": 0 }, { "desc": "服务B", "product_type": 1, "qty": 2, "tva_tx": 6, "multicurrency_subprice": 200, "remise_percent": 10 } ] } } } } }, "responses": { "200": { "description": "成功添加报价单行项目", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "integer", "description": "添加的行项目ID" } } } } }, "400": { "description": "请求错误" }, "404": { "description": "报价单不存在" }, "500": { "description": "服务器错误" } } } } }, "components": { "schemas": {} } } ``` ### ✔️ Expected Behavior For example, in the data of this custom widget's requestBody, `"required": true`, but there is no input area on the test page. Is this not supported, or is it a bug? ![Image](https://github.com/user-attachments/assets/f94587f5-d360-40fa-982b-da393ac0f861) ### ❌ Actual Behavior No parameter input box will appear.
yindo closed this issue 2026-02-21 19:19:39 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 28, 2025):

This is a current limitation in Dify 1.5.0: the UI for custom tools does not support rendering input fields for requestBody parameters of type array or object, even if they are required. Only primitive types like string and number are mapped to input fields in the test page. This is due to how the form schema and rendering logic are implemented—array and object types are not handled, so no input area appears for them in the UI. This isn't a parsing bug, but rather unsupported feature coverage in both the schema generator and form renderer. There are no official workarounds documented, and no recent updates address this gap. If you need to test endpoints with complex request bodies, you may need to use external tools or simplify your schema to use supported types for now.
Reference: code analysis

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 (Jun 28, 2025): <!-- Answer --> This is a current limitation in Dify 1.5.0: the UI for custom tools does not support rendering input fields for requestBody parameters of type array or object, even if they are required. Only primitive types like string and number are mapped to input fields in the test page. This is due to how the form schema and rendering logic are implemented—array and object types are not handled, so no input area appears for them in the UI. This isn't a parsing bug, but rather unsupported feature coverage in both the schema generator and form renderer. There are no official workarounds documented, and no recent updates address this gap. If you need to test endpoints with complex request bodies, you may need to use external tools or simplify your schema to use supported types for now. [Reference: code analysis](https://github.com/langgenius/dify/blob/37e19de7ab3d8c1ffd8dfd8b789ff52b47f981cb/web/app/components/tools/utils/to-form-schema.ts) <!-- 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/9f55fe3f-901f-422d-a11d-3d189febea46?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9f55fe3f-901f-422d-a11d-3d189febea46?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9f55fe3f-901f-422d-a11d-3d189febea46?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9f55fe3f-901f-422d-a11d-3d189febea46?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9f55fe3f-901f-422d-a11d-3d189febea46?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9f55fe3f-901f-422d-a11d-3d189febea46?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9f55fe3f-901f-422d-a11d-3d189febea46?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/21672)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14982