Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/dify_plugin/entities/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from dify_plugin.entities import I18nObject, ParameterOption
from dify_plugin.entities.invoke_message import InvokeMessage
from dify_plugin.entities.model.message import PromptMessageTool
from dify_plugin.entities.model.provider import FormShowOnObject
from dify_plugin.entities.oauth import OAuthSchema
from dify_plugin.entities.provider_config import (
CommonParameterType,
Expand Down Expand Up @@ -122,6 +123,7 @@ class ToolParameterForm(Enum):
options: list[ToolParameterOption] | None = None
# MCP object and array type parameters use this field to store the schema
input_schema: Mapping[str, Any] | None = None
show_on: list[FormShowOnObject] = Field(default_factory=list)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To maintain consistency with other fields in the ToolParameter class and to ensure proper documentation generation via the @docs decorator, please add a description to the show_on field.

Suggested change
show_on: list[FormShowOnObject] = Field(default_factory=list)
show_on: list[FormShowOnObject] = Field(default_factory=list, description="The conditions to show the parameter")



@docs(
Expand Down