microsoft-agents-a365-tooling-extensions-azureaifoundry 0.2.0.dev5__tar.gz → 0.2.1.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/PKG-INFO +1 -1
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/microsoft_agents_a365/tooling/extensions/azureaifoundry/services/__init__.py +2 -1
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/microsoft_agents_a365/tooling/extensions/azureaifoundry/services/mcp_tool_registration_service.py +15 -3
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/microsoft_agents_a365_tooling_extensions_azureaifoundry.egg-info/PKG-INFO +1 -1
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/microsoft_agents_a365_tooling_extensions_azureaifoundry.egg-info/top_level.txt +1 -0
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/pyproject.toml +4 -0
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/setup.py +1 -1
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/README.md +0 -0
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/microsoft_agents_a365/tooling/extensions/azureaifoundry/__init__.py +0 -0
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/microsoft_agents_a365_tooling_extensions_azureaifoundry.egg-info/SOURCES.txt +0 -0
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/microsoft_agents_a365_tooling_extensions_azureaifoundry.egg-info/dependency_links.txt +0 -0
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/microsoft_agents_a365_tooling_extensions_azureaifoundry.egg-info/requires.txt +0 -0
- {microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.0.dev5 → microsoft_agents_a365_tooling_extensions_azureaifoundry-0.2.1.dev2}/setup.cfg +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
# Copyright (c) Microsoft
|
|
1
|
+
# Copyright (c) Microsoft Corporation.
|
|
2
|
+
# Licensed under the MIT License.
|
|
2
3
|
|
|
3
4
|
"""
|
|
4
5
|
MCP Tool Registration Service implementation for Azure Foundry.
|
|
@@ -21,6 +22,7 @@ from microsoft_agents_a365.runtime.utility import Utility
|
|
|
21
22
|
from microsoft_agents_a365.tooling.services.mcp_tool_server_configuration_service import (
|
|
22
23
|
McpToolServerConfigurationService,
|
|
23
24
|
)
|
|
25
|
+
from microsoft_agents_a365.tooling.models import ToolOptions
|
|
24
26
|
from microsoft_agents_a365.tooling.utils.constants import Constants
|
|
25
27
|
from microsoft_agents_a365.tooling.utils.utility import get_mcp_platform_authentication_scope
|
|
26
28
|
|
|
@@ -45,6 +47,8 @@ class McpToolRegistrationService:
|
|
|
45
47
|
>>> service.add_tool_servers_to_agent(project_client, agent_id, token)
|
|
46
48
|
"""
|
|
47
49
|
|
|
50
|
+
_orchestrator_name: str = "AzureAIFoundry"
|
|
51
|
+
|
|
48
52
|
def __init__(
|
|
49
53
|
self,
|
|
50
54
|
logger: Optional[logging.Logger] = None,
|
|
@@ -139,9 +143,10 @@ class McpToolRegistrationService:
|
|
|
139
143
|
return ([], None)
|
|
140
144
|
|
|
141
145
|
# Get MCP server configurations
|
|
146
|
+
options = ToolOptions(orchestrator_name=self._orchestrator_name)
|
|
142
147
|
try:
|
|
143
148
|
servers = await self._mcp_server_configuration_service.list_tool_servers(
|
|
144
|
-
agentic_app_id, auth_token
|
|
149
|
+
agentic_app_id, auth_token, options
|
|
145
150
|
)
|
|
146
151
|
except Exception as ex:
|
|
147
152
|
self._logger.error(
|
|
@@ -174,8 +179,11 @@ class McpToolRegistrationService:
|
|
|
174
179
|
else server.mcp_server_name
|
|
175
180
|
)
|
|
176
181
|
|
|
182
|
+
# Use the URL from server (always populated by the configuration service)
|
|
183
|
+
server_url = server.url
|
|
184
|
+
|
|
177
185
|
# Create MCP tool using Azure Foundry SDK
|
|
178
|
-
mcp_tool = McpTool(server_label=server_label, server_url=
|
|
186
|
+
mcp_tool = McpTool(server_label=server_label, server_url=server_url)
|
|
179
187
|
|
|
180
188
|
# Configure the tool
|
|
181
189
|
mcp_tool.set_approval_mode("never")
|
|
@@ -189,6 +197,10 @@ class McpToolRegistrationService:
|
|
|
189
197
|
)
|
|
190
198
|
mcp_tool.update_headers(Constants.Headers.AUTHORIZATION, header_value)
|
|
191
199
|
|
|
200
|
+
mcp_tool.update_headers(
|
|
201
|
+
Constants.Headers.USER_AGENT, Utility.get_user_agent_header(self._orchestrator_name)
|
|
202
|
+
)
|
|
203
|
+
|
|
192
204
|
# Add to collections
|
|
193
205
|
tool_definitions.extend(mcp_tool.definitions)
|
|
194
206
|
if mcp_tool.resources and mcp_tool.resources.mcp:
|
|
@@ -66,6 +66,10 @@ target-version = ['py311']
|
|
|
66
66
|
line-length = 100
|
|
67
67
|
target-version = "py311"
|
|
68
68
|
|
|
69
|
+
[tool.ruff.lint.flake8-copyright]
|
|
70
|
+
notice-rgx = "# Copyright \\(c\\) Microsoft Corporation\\.\\r?\\n# Licensed under the MIT License\\."
|
|
71
|
+
min-file-size = 1
|
|
72
|
+
|
|
69
73
|
[tool.mypy]
|
|
70
74
|
python_version = "3.11"
|
|
71
75
|
strict = true
|
|
@@ -13,7 +13,7 @@ package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")
|
|
|
13
13
|
helper_path = Path(__file__).parent.parent.parent / "versioning" / "helper"
|
|
14
14
|
sys.path.insert(0, str(helper_path))
|
|
15
15
|
|
|
16
|
-
from setup_utils import get_dynamic_dependencies
|
|
16
|
+
from setup_utils import get_dynamic_dependencies # noqa: E402
|
|
17
17
|
|
|
18
18
|
# Use minimum version strategy:
|
|
19
19
|
# - Internal packages get: >= current_base_version (e.g., >= 0.1.0)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|