mcp-mesh 0.5.7__py3-none-any.whl → 0.6.0__py3-none-any.whl
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.
- _mcp_mesh/__init__.py +1 -1
- _mcp_mesh/engine/base_injector.py +171 -0
- _mcp_mesh/engine/decorator_registry.py +136 -33
- _mcp_mesh/engine/dependency_injector.py +91 -18
- _mcp_mesh/engine/http_wrapper.py +5 -22
- _mcp_mesh/engine/llm_config.py +41 -0
- _mcp_mesh/engine/llm_errors.py +115 -0
- _mcp_mesh/engine/mesh_llm_agent.py +440 -0
- _mcp_mesh/engine/mesh_llm_agent_injector.py +487 -0
- _mcp_mesh/engine/response_parser.py +240 -0
- _mcp_mesh/engine/signature_analyzer.py +229 -99
- _mcp_mesh/engine/tool_executor.py +169 -0
- _mcp_mesh/engine/tool_schema_builder.py +125 -0
- _mcp_mesh/engine/unified_mcp_proxy.py +14 -12
- _mcp_mesh/generated/.openapi-generator/FILES +4 -0
- _mcp_mesh/generated/mcp_mesh_registry_client/__init__.py +81 -44
- _mcp_mesh/generated/mcp_mesh_registry_client/models/__init__.py +72 -35
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter.py +132 -0
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter_filter_inner.py +172 -0
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter_filter_inner_one_of.py +92 -0
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_info.py +121 -0
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_agent_registration.py +98 -51
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_registration_response.py +93 -44
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_tool_registration.py +84 -41
- _mcp_mesh/pipeline/api_heartbeat/api_dependency_resolution.py +9 -72
- _mcp_mesh/pipeline/mcp_heartbeat/heartbeat_pipeline.py +6 -3
- _mcp_mesh/pipeline/mcp_heartbeat/llm_tools_resolution.py +222 -0
- _mcp_mesh/pipeline/mcp_startup/fastmcpserver_discovery.py +7 -0
- _mcp_mesh/pipeline/mcp_startup/heartbeat_preparation.py +65 -4
- _mcp_mesh/pipeline/mcp_startup/startup_pipeline.py +2 -2
- _mcp_mesh/shared/registry_client_wrapper.py +60 -4
- _mcp_mesh/utils/fastmcp_schema_extractor.py +476 -0
- {mcp_mesh-0.5.7.dist-info → mcp_mesh-0.6.0.dist-info}/METADATA +1 -1
- {mcp_mesh-0.5.7.dist-info → mcp_mesh-0.6.0.dist-info}/RECORD +39 -25
- mesh/__init__.py +8 -4
- mesh/decorators.py +344 -2
- mesh/types.py +145 -94
- {mcp_mesh-0.5.7.dist-info → mcp_mesh-0.6.0.dist-info}/WHEEL +0 -0
- {mcp_mesh-0.5.7.dist-info → mcp_mesh-0.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Tool executor for LLM tool integration.
|
|
3
|
+
|
|
4
|
+
Handles execution of tool calls from LLM responses.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import json
|
|
8
|
+
import logging
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .llm_errors import ToolExecutionError
|
|
12
|
+
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ToolExecutor:
|
|
17
|
+
"""
|
|
18
|
+
Utility for executing tool calls from LLM responses.
|
|
19
|
+
|
|
20
|
+
Handles:
|
|
21
|
+
- Parsing tool call arguments
|
|
22
|
+
- Finding tools in available tools list
|
|
23
|
+
- Executing tools via proxies
|
|
24
|
+
- Formatting results for LLM conversation
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
@staticmethod
|
|
28
|
+
async def execute_calls(
|
|
29
|
+
tool_calls: list[Any], available_tools: dict[str, Any] | list[Any]
|
|
30
|
+
) -> list[dict[str, Any]]:
|
|
31
|
+
"""
|
|
32
|
+
Execute tool calls and return results.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
tool_calls: List of tool call objects from LLM response
|
|
36
|
+
available_tools: Dict mapping function_name -> proxy OR list of tool metadata/proxies
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
List of tool result messages for LLM conversation
|
|
40
|
+
|
|
41
|
+
Raises:
|
|
42
|
+
ToolExecutionError: If tool execution fails
|
|
43
|
+
"""
|
|
44
|
+
tool_results = []
|
|
45
|
+
|
|
46
|
+
for tool_call in tool_calls:
|
|
47
|
+
tool_name = tool_call.function.name
|
|
48
|
+
tool_call_id = tool_call.id
|
|
49
|
+
|
|
50
|
+
try:
|
|
51
|
+
# Parse arguments
|
|
52
|
+
try:
|
|
53
|
+
arguments = json.loads(tool_call.function.arguments)
|
|
54
|
+
except json.JSONDecodeError as e:
|
|
55
|
+
raise ToolExecutionError(
|
|
56
|
+
tool_name=tool_name,
|
|
57
|
+
arguments={},
|
|
58
|
+
original_error=e,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
logger.debug(f"🔧 Executing tool '{tool_name}' with args: {arguments}")
|
|
62
|
+
|
|
63
|
+
# Find and execute tool
|
|
64
|
+
result = await ToolExecutor._find_and_execute_tool(
|
|
65
|
+
tool_name, arguments, available_tools
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
logger.debug(f"✅ Tool '{tool_name}' executed successfully")
|
|
69
|
+
|
|
70
|
+
# Format result for LLM
|
|
71
|
+
tool_results.append(
|
|
72
|
+
ToolExecutor._format_tool_result(tool_call_id, result)
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
except ToolExecutionError:
|
|
76
|
+
raise
|
|
77
|
+
except Exception as e:
|
|
78
|
+
logger.error(f"❌ Tool execution failed: {e}")
|
|
79
|
+
raise ToolExecutionError(
|
|
80
|
+
tool_name=tool_name,
|
|
81
|
+
arguments=arguments if "arguments" in locals() else {},
|
|
82
|
+
original_error=e if isinstance(e, Exception) else Exception(str(e)),
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
return tool_results
|
|
86
|
+
|
|
87
|
+
@staticmethod
|
|
88
|
+
async def _find_and_execute_tool(
|
|
89
|
+
tool_name: str, arguments: dict[str, Any], available_tools: Any
|
|
90
|
+
) -> Any:
|
|
91
|
+
"""
|
|
92
|
+
Find tool in available tools and execute it.
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
tool_name: Name of tool to execute
|
|
96
|
+
arguments: Tool arguments
|
|
97
|
+
available_tools: Dict mapping function_name -> proxy OR list of tool metadata/proxies
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
Tool execution result
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
ToolExecutionError: If tool not found or execution fails
|
|
104
|
+
"""
|
|
105
|
+
# Handle dict format (function_name -> proxy mapping)
|
|
106
|
+
if isinstance(available_tools, dict):
|
|
107
|
+
tool_proxy = available_tools.get(tool_name)
|
|
108
|
+
if not tool_proxy:
|
|
109
|
+
raise ToolExecutionError(
|
|
110
|
+
tool_name=tool_name,
|
|
111
|
+
arguments=arguments,
|
|
112
|
+
original_error=ValueError(
|
|
113
|
+
f"Tool '{tool_name}' not found in available tools"
|
|
114
|
+
),
|
|
115
|
+
)
|
|
116
|
+
# Execute tool via proxy
|
|
117
|
+
result = await tool_proxy.call_tool(tool_name, arguments)
|
|
118
|
+
return result
|
|
119
|
+
|
|
120
|
+
# Handle list format (legacy support)
|
|
121
|
+
tool_proxy = None
|
|
122
|
+
for tool in available_tools:
|
|
123
|
+
# Check if it's a dict-based metadata (from registry)
|
|
124
|
+
if isinstance(tool, dict) and tool.get("function_name") == tool_name:
|
|
125
|
+
tool_proxy = tool
|
|
126
|
+
break
|
|
127
|
+
# Check if it's a proxy object (for tests)
|
|
128
|
+
elif hasattr(tool, "name") and tool.name == tool_name:
|
|
129
|
+
tool_proxy = tool
|
|
130
|
+
break
|
|
131
|
+
|
|
132
|
+
if not tool_proxy:
|
|
133
|
+
raise ToolExecutionError(
|
|
134
|
+
tool_name=tool_name,
|
|
135
|
+
arguments=arguments,
|
|
136
|
+
original_error=ValueError(
|
|
137
|
+
f"Tool '{tool_name}' not found in available tools"
|
|
138
|
+
),
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
# Execute tool
|
|
142
|
+
if hasattr(tool_proxy, "call_tool"):
|
|
143
|
+
# It's a proxy object with call_tool method
|
|
144
|
+
result = await tool_proxy.call_tool(**arguments)
|
|
145
|
+
else:
|
|
146
|
+
# It's dict metadata - TODO: Execute via UnifiedMCPProxy
|
|
147
|
+
result = f"Tool '{tool_name}' executed with args: {arguments}"
|
|
148
|
+
|
|
149
|
+
return result
|
|
150
|
+
|
|
151
|
+
@staticmethod
|
|
152
|
+
def _format_tool_result(tool_call_id: str, result: Any) -> dict[str, Any]:
|
|
153
|
+
"""
|
|
154
|
+
Format tool result for LLM conversation.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
tool_call_id: ID of the tool call
|
|
158
|
+
result: Tool execution result
|
|
159
|
+
|
|
160
|
+
Returns:
|
|
161
|
+
Formatted tool result message
|
|
162
|
+
"""
|
|
163
|
+
return {
|
|
164
|
+
"role": "tool",
|
|
165
|
+
"tool_call_id": tool_call_id,
|
|
166
|
+
"content": json.dumps(
|
|
167
|
+
result if isinstance(result, dict) else {"result": result}
|
|
168
|
+
),
|
|
169
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Tool schema builder for LLM tool integration.
|
|
3
|
+
|
|
4
|
+
Builds OpenAI-format tool schemas from MCP tool metadata.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import logging
|
|
8
|
+
from typing import Any
|
|
9
|
+
|
|
10
|
+
logger = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ToolSchemaBuilder:
|
|
14
|
+
"""
|
|
15
|
+
Utility for building LLM tool schemas.
|
|
16
|
+
|
|
17
|
+
Converts MCP tool metadata into OpenAI-format schemas
|
|
18
|
+
compatible with LiteLLM.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
@staticmethod
|
|
22
|
+
def build_schemas(tools: list[Any]) -> list[dict[str, Any]]:
|
|
23
|
+
"""
|
|
24
|
+
Build tool schemas in OpenAI format for LiteLLM.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
tools: List of tool metadata (dict or object format)
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
List of tool schemas in OpenAI format
|
|
31
|
+
"""
|
|
32
|
+
if not tools:
|
|
33
|
+
return []
|
|
34
|
+
|
|
35
|
+
tool_schemas = []
|
|
36
|
+
|
|
37
|
+
for tool in tools:
|
|
38
|
+
schema = ToolSchemaBuilder._build_single_schema(tool)
|
|
39
|
+
if schema:
|
|
40
|
+
tool_schemas.append(schema)
|
|
41
|
+
|
|
42
|
+
logger.debug(f"🔧 Built {len(tool_schemas)} tool schemas for LLM")
|
|
43
|
+
return tool_schemas
|
|
44
|
+
|
|
45
|
+
@staticmethod
|
|
46
|
+
def _build_single_schema(tool: Any) -> dict[str, Any] | None:
|
|
47
|
+
"""
|
|
48
|
+
Build schema for a single tool.
|
|
49
|
+
|
|
50
|
+
Supports both dict-based metadata (from registry) and
|
|
51
|
+
object-based proxies (for tests).
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
tool: Tool metadata or proxy object
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
Tool schema in OpenAI format, or None if invalid
|
|
58
|
+
"""
|
|
59
|
+
# Support both dict format and object format
|
|
60
|
+
if isinstance(tool, dict):
|
|
61
|
+
# Dict-based metadata (from registry)
|
|
62
|
+
return ToolSchemaBuilder._build_from_dict(tool)
|
|
63
|
+
else:
|
|
64
|
+
# Object-based proxy (for tests)
|
|
65
|
+
return ToolSchemaBuilder._build_from_object(tool)
|
|
66
|
+
|
|
67
|
+
@staticmethod
|
|
68
|
+
def _build_from_dict(tool: dict[str, Any]) -> dict[str, Any]:
|
|
69
|
+
"""
|
|
70
|
+
Build schema from dict-based tool metadata.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
tool: Tool metadata dict (must match OpenAPI spec field names)
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
Tool schema in OpenAI format
|
|
77
|
+
"""
|
|
78
|
+
# OpenAPI spec uses "name" (camelCase) - enforce strict contract
|
|
79
|
+
function_name = tool.get("name")
|
|
80
|
+
if not function_name:
|
|
81
|
+
logger.error(f"❌ Tool missing 'name' field: {tool}")
|
|
82
|
+
raise ValueError(
|
|
83
|
+
f"Tool metadata missing required 'name' field (OpenAPI contract): {tool}"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
tool_schema = {
|
|
87
|
+
"type": "function",
|
|
88
|
+
"function": {
|
|
89
|
+
"name": function_name,
|
|
90
|
+
"description": tool.get("description", ""),
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
# OpenAPI spec uses "inputSchema" (camelCase) - enforce strict contract
|
|
95
|
+
input_schema = tool.get("inputSchema")
|
|
96
|
+
if input_schema:
|
|
97
|
+
tool_schema["function"]["parameters"] = input_schema
|
|
98
|
+
|
|
99
|
+
logger.debug(f"🔧 Built tool schema for '{function_name}'")
|
|
100
|
+
return tool_schema
|
|
101
|
+
|
|
102
|
+
@staticmethod
|
|
103
|
+
def _build_from_object(tool: Any) -> dict[str, Any]:
|
|
104
|
+
"""
|
|
105
|
+
Build schema from object-based tool proxy.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
tool: Tool proxy object
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Tool schema in OpenAI format
|
|
112
|
+
"""
|
|
113
|
+
tool_schema = {
|
|
114
|
+
"type": "function",
|
|
115
|
+
"function": {
|
|
116
|
+
"name": getattr(tool, "name", "unknown"),
|
|
117
|
+
"description": getattr(tool, "description", ""),
|
|
118
|
+
},
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# Add input_schema if available
|
|
122
|
+
if hasattr(tool, "input_schema"):
|
|
123
|
+
tool_schema["function"]["parameters"] = tool.input_schema
|
|
124
|
+
|
|
125
|
+
return tool_schema
|
|
@@ -16,9 +16,8 @@ logger = logging.getLogger(__name__)
|
|
|
16
16
|
class UnifiedMCPProxy:
|
|
17
17
|
"""Unified MCP proxy using FastMCP's built-in client.
|
|
18
18
|
|
|
19
|
-
This
|
|
20
|
-
|
|
21
|
-
FastMCP's superior client.
|
|
19
|
+
This provides the implementation for McpMeshAgent type parameters,
|
|
20
|
+
offering all MCP protocol features using FastMCP's superior client.
|
|
22
21
|
|
|
23
22
|
Features:
|
|
24
23
|
- All MCP protocol methods (tools, resources, prompts)
|
|
@@ -58,14 +57,15 @@ class UnifiedMCPProxy:
|
|
|
58
57
|
|
|
59
58
|
def _is_ip_address(self, hostname: str) -> bool:
|
|
60
59
|
"""Check if hostname is an IP address vs DNS name.
|
|
61
|
-
|
|
60
|
+
|
|
62
61
|
Args:
|
|
63
62
|
hostname: Hostname to check
|
|
64
|
-
|
|
63
|
+
|
|
65
64
|
Returns:
|
|
66
65
|
True if IP address, False if DNS name
|
|
67
66
|
"""
|
|
68
67
|
import ipaddress
|
|
68
|
+
|
|
69
69
|
try:
|
|
70
70
|
ipaddress.ip_address(hostname)
|
|
71
71
|
return True
|
|
@@ -85,14 +85,15 @@ class UnifiedMCPProxy:
|
|
|
85
85
|
FastMCP Client instance with or without trace headers
|
|
86
86
|
"""
|
|
87
87
|
try:
|
|
88
|
-
# Extract hostname from endpoint URL for DNS detection
|
|
88
|
+
# Extract hostname from endpoint URL for DNS detection
|
|
89
89
|
from urllib.parse import urlparse
|
|
90
|
+
|
|
90
91
|
parsed = urlparse(endpoint)
|
|
91
|
-
hostname = parsed.hostname or parsed.netloc.split(
|
|
92
|
-
|
|
92
|
+
hostname = parsed.hostname or parsed.netloc.split(":")[0]
|
|
93
|
+
|
|
93
94
|
# DNS resolution works perfectly with FastMCP - no need to force HTTP fallback
|
|
94
95
|
self.logger.debug(f"✅ Using FastMCP client for endpoint: {hostname}")
|
|
95
|
-
|
|
96
|
+
|
|
96
97
|
from fastmcp import Client
|
|
97
98
|
from fastmcp.client.transports import StreamableHttpTransport
|
|
98
99
|
|
|
@@ -112,9 +113,11 @@ class UnifiedMCPProxy:
|
|
|
112
113
|
self.logger.debug(f"🔄 FastMCP client unavailable: {e}")
|
|
113
114
|
raise # Re-raise to trigger _fallback_http_call
|
|
114
115
|
except Exception as e:
|
|
115
|
-
# Any other error - this will trigger HTTP fallback
|
|
116
|
+
# Any other error - this will trigger HTTP fallback
|
|
116
117
|
self.logger.debug(f"🔄 FastMCP client error: {e}")
|
|
117
|
-
raise ImportError(
|
|
118
|
+
raise ImportError(
|
|
119
|
+
f"FastMCP client failed: {e}"
|
|
120
|
+
) # Convert to ImportError to trigger fallback
|
|
118
121
|
|
|
119
122
|
def _get_trace_headers(self) -> dict[str, str]:
|
|
120
123
|
"""Extract trace headers from current context for distributed tracing.
|
|
@@ -361,7 +364,6 @@ class UnifiedMCPProxy:
|
|
|
361
364
|
"""
|
|
362
365
|
import time
|
|
363
366
|
|
|
364
|
-
|
|
365
367
|
start_time = time.time()
|
|
366
368
|
|
|
367
369
|
try:
|
|
@@ -25,6 +25,10 @@ mcp_mesh_registry_client/models/health_response.py
|
|
|
25
25
|
mcp_mesh_registry_client/models/heartbeat_request.py
|
|
26
26
|
mcp_mesh_registry_client/models/heartbeat_request_metadata.py
|
|
27
27
|
mcp_mesh_registry_client/models/heartbeat_response.py
|
|
28
|
+
mcp_mesh_registry_client/models/llm_tool_filter.py
|
|
29
|
+
mcp_mesh_registry_client/models/llm_tool_filter_filter_inner.py
|
|
30
|
+
mcp_mesh_registry_client/models/llm_tool_filter_filter_inner_one_of.py
|
|
31
|
+
mcp_mesh_registry_client/models/llm_tool_info.py
|
|
28
32
|
mcp_mesh_registry_client/models/mesh_agent_register_metadata.py
|
|
29
33
|
mcp_mesh_registry_client/models/mesh_agent_registration.py
|
|
30
34
|
mcp_mesh_registry_client/models/mesh_registration_response.py
|
|
@@ -21,7 +21,7 @@ CONTRACT: Registry service communication only
|
|
|
21
21
|
"""
|
|
22
22
|
MCP Mesh Registry API
|
|
23
23
|
|
|
24
|
-
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
24
|
+
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
25
25
|
|
|
26
26
|
The version of the OpenAPI document: 1.0.0
|
|
27
27
|
Contact: dhyanraj@gmail.com
|
|
@@ -34,48 +34,85 @@ CONTRACT: Registry service communication only
|
|
|
34
34
|
__version__ = "1.0.0"
|
|
35
35
|
|
|
36
36
|
# import apis into sdk package
|
|
37
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.api.agents_api import
|
|
38
|
-
|
|
39
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.api.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.api.agents_api import \
|
|
38
|
+
AgentsApi
|
|
39
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.api.health_api import \
|
|
40
|
+
HealthApi
|
|
41
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.api.tracing_api import \
|
|
42
|
+
TracingApi
|
|
43
43
|
from _mcp_mesh.generated.mcp_mesh_registry_client.api_client import ApiClient
|
|
44
|
-
|
|
45
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.
|
|
46
|
-
|
|
47
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.
|
|
48
|
-
|
|
49
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.exceptions import
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
# import ApiClient
|
|
45
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.api_response import \
|
|
46
|
+
ApiResponse
|
|
47
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.configuration import \
|
|
48
|
+
Configuration
|
|
49
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.exceptions import (
|
|
50
|
+
ApiAttributeError, ApiException, ApiKeyError, ApiTypeError, ApiValueError,
|
|
51
|
+
OpenApiException)
|
|
52
52
|
# import models into sdk package
|
|
53
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_info import
|
|
54
|
-
|
|
55
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
56
|
-
|
|
57
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
58
|
-
|
|
59
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
60
|
-
|
|
61
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
62
|
-
|
|
63
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
64
|
-
|
|
65
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
66
|
-
|
|
67
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
68
|
-
|
|
69
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
70
|
-
|
|
71
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
72
|
-
|
|
73
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
74
|
-
|
|
75
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
76
|
-
|
|
77
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
78
|
-
|
|
79
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
80
|
-
|
|
81
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
53
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_info import \
|
|
54
|
+
AgentInfo
|
|
55
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_metadata import \
|
|
56
|
+
AgentMetadata
|
|
57
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_metadata_dependencies_inner import \
|
|
58
|
+
AgentMetadataDependenciesInner
|
|
59
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_metadata_dependencies_inner_one_of import \
|
|
60
|
+
AgentMetadataDependenciesInnerOneOf
|
|
61
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_registration import \
|
|
62
|
+
AgentRegistration
|
|
63
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_registration_metadata import \
|
|
64
|
+
AgentRegistrationMetadata
|
|
65
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agents_list_response import \
|
|
66
|
+
AgentsListResponse
|
|
67
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.capability_info import \
|
|
68
|
+
CapabilityInfo
|
|
69
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.decorator_agent_metadata import \
|
|
70
|
+
DecoratorAgentMetadata
|
|
71
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.decorator_agent_request import \
|
|
72
|
+
DecoratorAgentRequest
|
|
73
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.decorator_info import \
|
|
74
|
+
DecoratorInfo
|
|
75
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.dependency_info import \
|
|
76
|
+
DependencyInfo
|
|
77
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.error_response import \
|
|
78
|
+
ErrorResponse
|
|
79
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.health_response import \
|
|
80
|
+
HealthResponse
|
|
81
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request import \
|
|
82
|
+
HeartbeatRequest
|
|
83
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request_metadata import \
|
|
84
|
+
HeartbeatRequestMetadata
|
|
85
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_response import \
|
|
86
|
+
HeartbeatResponse
|
|
87
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter import \
|
|
88
|
+
LLMToolFilter
|
|
89
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter_filter_inner import \
|
|
90
|
+
LLMToolFilterFilterInner
|
|
91
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter_filter_inner_one_of import \
|
|
92
|
+
LLMToolFilterFilterInnerOneOf
|
|
93
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_info import \
|
|
94
|
+
LLMToolInfo
|
|
95
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_agent_register_metadata import \
|
|
96
|
+
MeshAgentRegisterMetadata
|
|
97
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_agent_registration import \
|
|
98
|
+
MeshAgentRegistration
|
|
99
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_registration_response import \
|
|
100
|
+
MeshRegistrationResponse
|
|
101
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_registration_response_dependencies_resolved_value_inner import \
|
|
102
|
+
MeshRegistrationResponseDependenciesResolvedValueInner
|
|
103
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_tool_dependency_registration import \
|
|
104
|
+
MeshToolDependencyRegistration
|
|
105
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_tool_register_metadata import \
|
|
106
|
+
MeshToolRegisterMetadata
|
|
107
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_tool_registration import \
|
|
108
|
+
MeshToolRegistration
|
|
109
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.registration_response import \
|
|
110
|
+
RegistrationResponse
|
|
111
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.rich_dependency import \
|
|
112
|
+
RichDependency
|
|
113
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.root_response import \
|
|
114
|
+
RootResponse
|
|
115
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.standardized_dependency import \
|
|
116
|
+
StandardizedDependency
|
|
117
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.trace_event import \
|
|
118
|
+
TraceEvent
|
|
@@ -2,45 +2,82 @@
|
|
|
2
2
|
|
|
3
3
|
# flake8: noqa
|
|
4
4
|
"""
|
|
5
|
-
|
|
5
|
+
MCP Mesh Registry API
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
The version of the OpenAPI document: 1.0.0
|
|
10
|
+
Contact: dhyanraj@gmail.com
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Do not edit the class manually.
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
# import models into model package
|
|
18
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_info import
|
|
19
|
-
|
|
20
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
21
|
-
|
|
22
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
23
|
-
|
|
24
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
25
|
-
|
|
26
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
27
|
-
|
|
28
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
29
|
-
|
|
30
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
31
|
-
|
|
32
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
33
|
-
|
|
34
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
35
|
-
|
|
36
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
37
|
-
|
|
38
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
39
|
-
|
|
40
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
41
|
-
|
|
42
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
43
|
-
|
|
44
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
45
|
-
|
|
46
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.
|
|
18
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_info import \
|
|
19
|
+
AgentInfo
|
|
20
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_metadata import \
|
|
21
|
+
AgentMetadata
|
|
22
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_metadata_dependencies_inner import \
|
|
23
|
+
AgentMetadataDependenciesInner
|
|
24
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_metadata_dependencies_inner_one_of import \
|
|
25
|
+
AgentMetadataDependenciesInnerOneOf
|
|
26
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_registration import \
|
|
27
|
+
AgentRegistration
|
|
28
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agent_registration_metadata import \
|
|
29
|
+
AgentRegistrationMetadata
|
|
30
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.agents_list_response import \
|
|
31
|
+
AgentsListResponse
|
|
32
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.capability_info import \
|
|
33
|
+
CapabilityInfo
|
|
34
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.decorator_agent_metadata import \
|
|
35
|
+
DecoratorAgentMetadata
|
|
36
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.decorator_agent_request import \
|
|
37
|
+
DecoratorAgentRequest
|
|
38
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.decorator_info import \
|
|
39
|
+
DecoratorInfo
|
|
40
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.dependency_info import \
|
|
41
|
+
DependencyInfo
|
|
42
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.error_response import \
|
|
43
|
+
ErrorResponse
|
|
44
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.health_response import \
|
|
45
|
+
HealthResponse
|
|
46
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request import \
|
|
47
|
+
HeartbeatRequest
|
|
48
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request_metadata import \
|
|
49
|
+
HeartbeatRequestMetadata
|
|
50
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_response import \
|
|
51
|
+
HeartbeatResponse
|
|
52
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter import \
|
|
53
|
+
LLMToolFilter
|
|
54
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter_filter_inner import \
|
|
55
|
+
LLMToolFilterFilterInner
|
|
56
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter_filter_inner_one_of import \
|
|
57
|
+
LLMToolFilterFilterInnerOneOf
|
|
58
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_info import \
|
|
59
|
+
LLMToolInfo
|
|
60
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_agent_register_metadata import \
|
|
61
|
+
MeshAgentRegisterMetadata
|
|
62
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_agent_registration import \
|
|
63
|
+
MeshAgentRegistration
|
|
64
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_registration_response import \
|
|
65
|
+
MeshRegistrationResponse
|
|
66
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_registration_response_dependencies_resolved_value_inner import \
|
|
67
|
+
MeshRegistrationResponseDependenciesResolvedValueInner
|
|
68
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_tool_dependency_registration import \
|
|
69
|
+
MeshToolDependencyRegistration
|
|
70
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_tool_register_metadata import \
|
|
71
|
+
MeshToolRegisterMetadata
|
|
72
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_tool_registration import \
|
|
73
|
+
MeshToolRegistration
|
|
74
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.registration_response import \
|
|
75
|
+
RegistrationResponse
|
|
76
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.rich_dependency import \
|
|
77
|
+
RichDependency
|
|
78
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.root_response import \
|
|
79
|
+
RootResponse
|
|
80
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.standardized_dependency import \
|
|
81
|
+
StandardizedDependency
|
|
82
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.trace_event import \
|
|
83
|
+
TraceEvent
|