feat: depending on the number of tools in use, this change should save ~50% of overall tokens used. fixes https://github.com/BeehiveInnovations/zen-mcp-server/issues/255 but also refactored individual tools to instead encourage the agent to use the listmodels tool if needed.
This commit is contained in:
@@ -93,6 +93,7 @@ class WorkflowSchemaBuilder:
|
||||
tool_name: str = None,
|
||||
excluded_workflow_fields: list[str] = None,
|
||||
excluded_common_fields: list[str] = None,
|
||||
require_model: bool = False,
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
Build complete schema for workflow tools.
|
||||
@@ -142,7 +143,7 @@ class WorkflowSchemaBuilder:
|
||||
|
||||
required = standard_required + (required_fields or [])
|
||||
|
||||
if auto_mode and "model" not in required:
|
||||
if (auto_mode or require_model) and "model" not in required:
|
||||
required.append("model")
|
||||
|
||||
# Build the complete schema
|
||||
|
||||
Reference in New Issue
Block a user