Skip to content

Commit b05a6f4

Browse files
feat: add tool_type metadata to all tools (#401)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1c03e29 commit b05a6f4

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath_langchain/agent/tools/context_tool.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ async def context_tool_fn(query: str) -> dict[str, Any]:
106106
args_schema=input_model,
107107
coroutine=context_tool_fn,
108108
output_type=output_model,
109+
metadata={
110+
"tool_type": "context",
111+
"display_name": resource.name,
112+
},
109113
)
110114

111115

@@ -183,6 +187,10 @@ async def context_tool_fn(query: str) -> dict[str, Any]:
183187
args_schema=input_model,
184188
coroutine=context_tool_fn,
185189
output_type=output_model,
190+
metadata={
191+
"tool_type": "context",
192+
"display_name": resource.name,
193+
},
186194
)
187195

188196

@@ -302,6 +310,10 @@ async def context_tool_fn(
302310
args_schema=input_model,
303311
coroutine=context_tool_fn,
304312
output_type=output_model,
313+
metadata={
314+
"tool_type": "context",
315+
"display_name": resource.name,
316+
},
305317
)
306318

307319

src/uipath_langchain/agent/tools/integration_tool.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ async def integration_tool_fn(**kwargs: Any):
179179
args_schema=input_model,
180180
coroutine=integration_tool_fn,
181181
output_type=output_model,
182+
metadata={
183+
"tool_type": "integration",
184+
"display_name": resource.name,
185+
},
182186
)
183187
tool.set_tool_wrappers(awrapper=wrapper)
184188

src/uipath_langchain/agent/tools/mcp_tool.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ async def init_session(
6666
async with semaphore:
6767
await session.initialize()
6868
tools = await load_mcp_tools(session)
69+
for tool in tools:
70+
tool.metadata = {"tool_type": "mcp", "display_name": tool.name}
6971
return _filter_tools(tools, cfg)
7072

7173
async def create_session(

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)