Skip to content

Commit 62fec29

Browse files
fix: add default empty tags field to tools to prevent validation errors
Co-authored-by: aider (openai/gemini-2.5-pro) <aider@aider.chat>
1 parent e573e3c commit 62fec29

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/solace_agent_mesh/agent/protocol/event_handlers.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,19 @@ def publish_agent_card(component):
14571457
# Create the extension object for the agent's tools.
14581458
dynamic_tools = getattr(component, "agent_card_tool_manifest", [])
14591459
if dynamic_tools:
1460-
tools_params = ToolsExtensionParams(tools=dynamic_tools)
1460+
# Ensure all tools have a 'tags' field to prevent validation errors.
1461+
processed_tools = []
1462+
for tool in dynamic_tools:
1463+
if "tags" not in tool:
1464+
log.debug(
1465+
"%s Tool '%s' in manifest is missing 'tags' field. Defaulting to empty list.",
1466+
component.log_identifier,
1467+
tool.get("id", "unknown"),
1468+
)
1469+
tool["tags"] = []
1470+
processed_tools.append(tool)
1471+
1472+
tools_params = ToolsExtensionParams(tools=processed_tools)
14611473
tools_extension = AgentExtension(
14621474
uri=TOOLS_EXTENSION_URI,
14631475
description="A list of tools available to the agent.",

0 commit comments

Comments
 (0)