tool parameter instruction not found in tool config
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.0.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
An error occurred using the default code parser tool call
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
To resolve the issue of a missing tool parameter instruction in the tool config when using the default code parser tool with the "FunctionCalling" strategy and "qwen-max" model in a self-hosted Docker environment, ensure that the tool parameter is correctly initialized and provided in the configuration. Here's what you can do:
-
Check Tool Configuration: Make sure that all required parameters for the code parser tool are specified in the tool configuration. The required parameters are:
language: Must be specified as "python3" or "javascript".code: The code to be executed, ensuring it only uses native packages and avoids network/IO operations [1].
-
Initialization Function: The function
init_frontend_parameterchecks if the parameter value is provided. If not, it uses a default value. If the parameter is required and no value is found, it raises aValueError. Ensure that:- The tool parameter is specified in the tool configuration.
- If the parameter is required, it must be present; otherwise, ensure a default value is set in the
rule.default[2].
-
Runtime Parameters: Ensure that runtime parameters are correctly defined in the tool's implementation. For example, in the
VectorizerToolclass, theget_runtime_parametersmethod defines required parameters. Make sure your tool's parameters are similarly defined and included in the configuration [3].
By following these steps, you should be able to resolve the missing tool parameter issue in your configuration.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
To resolve the issue of a missing tool parameter instruction in the tool config when using the default code parser tool with the "FunctionCalling" strategy and "qwen-max" model in a self-hosted Docker environment, ensure that the tool parameter is correctly initialized and provided in the configuration. Here's what you can do:解决在使用默认代码解析工具的“FunctionCalling”策略和“qwen-max”模型以及自托管 Docker 环境中,工具配置中缺少工具参数指令的问题,请确保工具参数在配置中正确初始化并提供。以下是您可以采取的操作:
Check Tool Configuration: Make sure that all required parameters for the code parser tool are specified in the tool configuration. The required parameters are:检查工具配置:请确保在工具配置中指定了代码解析工具所需的所有参数。所需参数包括:
language: Must be specified as "python3" or "javascript".必须指定为“python3”或“javascript”。code: The code to be executed, ensuring it only uses native packages and avoids network/IO operations [1].执行代码,确保它仅使用本地包并避免网络/IO 操作Initialization Function: The function
init_frontend_parameterchecks if the parameter value is provided. If not, it uses a default value. If the parameter is required and no value is found, it raises aValueError. Ensure that:初始化函数:函数init_frontend_parameter检查是否提供了参数值。如果没有提供,则使用默认值。如果参数是必需的且未找到值,则引发ValueError。确保:Runtime Parameters: Ensure that runtime parameters are correctly defined in the tool's implementation. For example, in the
VectorizerToolclass, theget_runtime_parametersmethod defines required parameters. Make sure your tool's parameters are similarly defined and included in the configuration [3].运行参数:确保在工具实现中正确定义运行参数。例如,在VectorizerTool类中,get_runtime_parameters方法定义了必需的参数。请确保您的工具参数以类似方式定义并包含在配置 [3] 中。By following these steps, you should be able to resolve the missing tool parameter issue in your configuration.按照这些步骤操作,你应该能够解决配置中缺少工具参数的问题。
To continue talking to Dosu, mention @dosu.继续与 Dosu 交谈,请提及。
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
这个工具是dify官方提供的,工具有参数描述和是否自动生成的开关
I have the same question, if I build an agent directly, this agent can use all tools whether the tools are original or I build. However, when I tried to create an agent in the workflow, it always showed the same problem as yours
Me too
I also encountered this issue at the beginning. After filling in the instructions and queries separately, I can now add and run an Agent in Chatflow without problems. Version 1.1.3
Have you added any custom tools? Could you provide a prototype of an interface function (without content) and the tool definition in JSON format?
@Iceblue76ec
I'm having the same issue. I'm using Dify 1.1.3 with docker and I'm getting an error when using the Agent.
Log
2025-04-09T18:34:07+09:00 Traceback (most recent call last):
2025-04-09T18:34:07+09:00 File "/app/api/core/workflow/graph_engine/graph_engine.py", line 645, in _run_node
2025-04-09T18:34:07+09:00 for item in generator:
2025-04-09T18:34:07+09:00 ^^^^^^^^^
2025-04-09T18:34:07+09:00 File "/app/api/core/workflow/nodes/base/node.py", line 84, in run
2025-04-09T18:34:07+09:00 yield from result
2025-04-09T18:34:07+09:00 File "/app/api/core/workflow/nodes/agent/agent_node.py", line 94, in _run
2025-04-09T18:34:07+09:00 yield from self._transform_message(
2025-04-09T18:34:07+09:00 File "/app/api/core/workflow/nodes/tool/tool_node.py", line 208, in _transform_message
2025-04-09T18:34:07+09:00 for message in message_stream:
2025-04-09T18:34:07+09:00 ^^^^^^^^^^^^^^
2025-04-09T18:34:07+09:00 File "/app/api/core/tools/utils/message_transformer.py", line 25, in transform_tool_invoke_messages
2025-04-09T18:34:07+09:00 for message in messages:
2025-04-09T18:34:07+09:00 ^^^^^^^^
2025-04-09T18:34:07+09:00 File "/app/api/core/agent/strategy/base.py", line 25, in invoke
2025-04-09T18:34:07+09:00 yield from self._invoke(params, user_id, conversation_id, app_id, message_id)
2025-04-09T18:34:07+09:00 File "/app/api/core/agent/strategy/plugin.py", line 47, in _invoke
2025-04-09T18:34:07+09:00 initialized_params = self.initialize_parameters(params)
2025-04-09T18:34:07+09:00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T18:34:07+09:00 File "/app/api/core/agent/strategy/plugin.py", line 31, in initialize_parameters
2025-04-09T18:34:07+09:00 params[parameter.name] = parameter.init_frontend_parameter(params.get(parameter.name))
2025-04-09T18:34:07+09:00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T18:34:07+09:00 File "/app/api/core/agent/plugin_entities.py", line 57, in init_frontend_parameter
2025-04-09T18:34:07+09:00 return init_frontend_parameter(self, self.type, value)
2025-04-09T18:34:07+09:00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T18:34:07+09:00 File "/app/api/core/plugin/entities/parameters.py", line 154, in init_frontend_parameter
2025-04-09T18:34:07+09:00 raise ValueError(f"tool parameter {rule.name} not found in tool config")
2025-04-09T18:34:07+09:00 ValueError: tool parameter instruction not found in tool config
2025-04-09T18:41:22+09:00 2025-04-09 09:41:22,364.364 INFO [Dummy-337] [_client.py:1038] - HTTP Request: GET https://marketplace.dify.ai/api/v1/plugins/download?unique_identifier=langgenius/agent:0.0.12@6b1af1fc9a716f494ff669f64c6dd4d2ae29fb5f60c15919df3f2dac89c700da "HTTP/1.1 200 OK"
I am getting this error even though I am not using a custom tool and am using the Currenttime tool with the default Agent in the Market.
How do I solve this?
why is this case closed?