Skip to content
Merged
Show file tree
Hide file tree
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: 1 addition & 1 deletion packages/uipath/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath"
version = "2.10.67"
version = "2.10.68"
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
41 changes: 38 additions & 3 deletions packages/uipath/src/uipath/agent/models/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,48 @@ class AgentMcpTool(BaseCfg):


class DynamicToolsMode(str, CaseInsensitiveEnum):
"""Dynamic tools mode enumeration."""
"""Dynamic tools mode enumeration.

Deprecated: kept for backwards compatibility with older ``agent.json`` files
that still serialize the ``dynamicTools`` field. New code should use
:class:`ToolsConfiguration` (see ``AgentMcpResourceConfig.tools_configuration``).
"""

NONE = "none"
SCHEMA = "schema"
ALL = "all"


class CachedToolsConfig(BaseCfg):
"""Cached tools configuration: use the tools saved in the agent definition snapshot."""

type: Literal["cached"] = Field(default="cached", frozen=True)


class DynamicToolsConfig(BaseCfg):
"""Dynamic tools configuration: fetch the tool list from the MCP server at runtime.

When ``allow_all`` is true, every tool the server exposes is forwarded
to the agent. When false, the live list is filtered by the snapshot's
``available_tools`` allowlist (live schemas, curated tool set).
"""

type: Literal["dynamic"] = Field(default="dynamic", frozen=True)
allow_all: bool = Field(alias="allowAll")


DiscoveryMode = Annotated[
Union[CachedToolsConfig, DynamicToolsConfig],
Field(discriminator="type"),
]


class ToolsConfiguration(BaseCfg):
"""Configuration describing how tools are sourced for an MCP resource."""

discovery_mode: DiscoveryMode = Field(alias="discoveryMode")


class AgentMcpResourceConfig(BaseAgentResourceConfig):
"""Agent MCP resource configuration model."""

Expand All @@ -462,8 +497,8 @@ class AgentMcpResourceConfig(BaseAgentResourceConfig):
folder_path: str = Field(alias="folderPath")
slug: str = Field(..., alias="slug")
available_tools: List[AgentMcpTool] = Field(..., alias="availableTools")
dynamic_tools: DynamicToolsMode = Field(
default=DynamicToolsMode.NONE, alias="dynamicTools"
tools_configuration: Optional[ToolsConfiguration] = Field(
default=None, alias="toolsConfiguration"
)
Comment thread
radugheo marked this conversation as resolved.
Comment thread
radugheo marked this conversation as resolved.


Expand Down
4 changes: 2 additions & 2 deletions packages/uipath/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading