feat: adding tool annotation used by MCP

This commit is contained in:
Lance Galletti 2025-06-23 10:56:08 -04:00
parent 929ac618ce
commit 4b1330a84b
9 changed files with 160 additions and 0 deletions

View file

@ -65,6 +65,7 @@ async def list_mcp_tools(endpoint: str, headers: dict[str, str]) -> ListToolDefs
description=param_schema.get("description", ""),
)
)
annotations = getattr(tool, "annotations", None)
tools.append(
ToolDef(
name=tool.name,
@ -73,6 +74,7 @@ async def list_mcp_tools(endpoint: str, headers: dict[str, str]) -> ListToolDefs
metadata={
"endpoint": endpoint,
},
annotations=annotations,
)
)
return ListToolDefsResponse(data=tools)