mcp-proxy-adapter 2.1.8__py3-none-any.whl → 2.1.9__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.
@@ -493,6 +493,13 @@ class MCPProxyAdapter:
493
493
  "details": "Request requires 'command', 'method' or 'params' field"
494
494
  }
495
495
  }
496
+ # Подмена help -> __help
497
+ if command == "help":
498
+ command = "__help"
499
+ # Переименовываем параметр внутри params
500
+ if "command" in params:
501
+ params["cmdname"] = params.pop("command")
502
+ logger.info(f"[DEBUG] MCP CMD: command={command}, params={params}")
496
503
 
497
504
  # Check if command exists
498
505
  if command not in self.registry.dispatcher.get_valid_commands():
@@ -501,12 +508,14 @@ class MCPProxyAdapter:
501
508
  "error": {
502
509
  "code": 404,
503
510
  "message": f"Unknown command: {command}",
504
- "details": f"Command '{command}' not found in registry. Available commands: {', '.join(self.registry.dispatcher.get_valid_commands())}"
511
+ "details": f"Unknown command: {command}. Available commands: {', '.join(self.registry.dispatcher.get_valid_commands())}"
505
512
  }
506
513
  }
507
514
 
515
+ logger.info(f"[DEBUG] MCP CMD: command={command}, params={params}")
508
516
  # Check for required parameters
509
517
  command_info = self.registry.dispatcher.get_command_info(command)
518
+ logger.info(f"[DEBUG] MCP CMD: command_info={command_info}")
510
519
  if command_info and "params" in command_info:
511
520
  missing_params = []
512
521
  for param_name, param_info in command_info["params"].items():
@@ -522,7 +531,7 @@ class MCPProxyAdapter:
522
531
  "details": f"Command '{command}' requires following parameters: {', '.join(missing_params)}"
523
532
  }
524
533
  }
525
-
534
+ logger.info(f"[DEBUG] MCP CMD: command={command}, params={params}")
526
535
  # Check parameter types
527
536
  type_errors = self._validate_param_types(command, params)
528
537
  if type_errors:
@@ -534,9 +543,10 @@ class MCPProxyAdapter:
534
543
  "details": "Check parameter types and try again"
535
544
  }
536
545
  }
537
-
546
+ logger.info(f"[DEBUG] MCP CMD: command={command}, params={params}")
538
547
  # Execute the command
539
548
  try:
549
+ logger.info(f"[DEBUG] MCP CMD: executing command={command}, params={params}")
540
550
  result = self.registry.dispatcher.execute(command, **params)
541
551
 
542
552
  # Return result in MCP Proxy format
@@ -41,7 +41,7 @@ class JsonRpcDispatcher(BaseDispatcher):
41
41
  description="Returns information about available commands",
42
42
  summary="Command help",
43
43
  params={
44
- "command": {
44
+ "cmdname": {
45
45
  "type": "string",
46
46
  "description": "Command name for detailed information",
47
47
  "required": False
@@ -157,31 +157,26 @@ class JsonRpcDispatcher(BaseDispatcher):
157
157
  def _help_command(self, params: Dict[str, Any] = None) -> Dict[str, Any]:
158
158
  """
159
159
  Built-in help command for getting command information.
160
-
161
160
  Args:
162
- params: Command parameters
163
- command: Command name for detailed information
164
-
161
+ params: Command parameters (dict)
162
+ cmdname: Command name for detailed information
165
163
  Returns:
166
164
  Dict[str, Any]: Command help information
167
165
  """
168
- if not params:
166
+ if params is None:
169
167
  params = {}
170
-
171
168
  # If specific command is specified, return information only about it
172
- if "command" in params and params["command"]:
173
- command = params["command"]
174
- if command not in self._metadata:
169
+ cmdname = params.get("cmdname")
170
+ if cmdname:
171
+ if cmdname not in self._metadata:
175
172
  return {
176
- "error": f"Command '{command}' not found",
173
+ "error": f"Command '{cmdname}' not found",
177
174
  "available_commands": list(self._metadata.keys())
178
175
  }
179
-
180
176
  return {
181
- "command": command,
182
- "info": self._metadata[command]
177
+ "cmdname": cmdname,
178
+ "info": self._metadata[cmdname]
183
179
  }
184
-
185
180
  # Otherwise return brief information about all commands
186
181
  commands_info = {}
187
182
  for cmd, info in self._metadata.items():
@@ -190,9 +185,8 @@ class JsonRpcDispatcher(BaseDispatcher):
190
185
  "description": info["description"],
191
186
  "params_count": len(info["params"])
192
187
  }
193
-
194
188
  return {
195
189
  "commands": commands_info,
196
190
  "total": len(commands_info),
197
- "note": "Use the 'command' parameter to get detailed information about a specific command"
191
+ "note": "Use the 'cmdname' parameter to get detailed information about a specific command"
198
192
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-proxy-adapter
3
- Version: 2.1.8
3
+ Version: 2.1.9
4
4
  Summary: Adapter for exposing Command Registry commands as tools for AI models via MCP Proxy.
5
5
  Home-page: https://github.com/vasilyvz/mcp-proxy-adapter
6
6
  Author: Vasiliy VZ
@@ -1,5 +1,5 @@
1
1
  mcp_proxy_adapter/__init__.py,sha256=_6D-TfANWp9zc550M5LUeGPvioFqG1bAl3tZj-gNmJU,463
2
- mcp_proxy_adapter/adapter.py,sha256=76dkVeDuqLsJ5AhuftzLlwy2M6yr_PfNbmNfo9dXVhc,28844
2
+ mcp_proxy_adapter/adapter.py,sha256=XQGhht_lhLH7eaSAgoxl4NdbT1MwMW5mwDrTJMXl8pk,29631
3
3
  mcp_proxy_adapter/models.py,sha256=acqVQBYAojHXeJ1MJyvpMyT6-J6aMxWuZMszn_-RsOU,2338
4
4
  mcp_proxy_adapter/registry.py,sha256=jgC4TKaPbMbAsoxvGp2ToaOE4drD-VfZug7WJbm4IW4,15853
5
5
  mcp_proxy_adapter/schema.py,sha256=HZM0TTQTSi8ha1TEeVevdCyGZOUPoT1soB7Nex0hV50,10947
@@ -9,7 +9,7 @@ mcp_proxy_adapter/analyzers/docstring_analyzer.py,sha256=T3FLJEo_uChShfiEKRl8GpV
9
9
  mcp_proxy_adapter/analyzers/type_analyzer.py,sha256=6Wac7osKwF03waFSwQ8ZM0Wqn_zAP2D-I4WMEpR0hQM,5230
10
10
  mcp_proxy_adapter/dispatchers/__init__.py,sha256=FWgimgInGphIjCEnvA3-ZExiapUzYAVis2H9C5IWivU,365
11
11
  mcp_proxy_adapter/dispatchers/base_dispatcher.py,sha256=S5_Xri058jAmOWeit1tedB_GMZQ9RLcNcYabA83ZF6k,2288
12
- mcp_proxy_adapter/dispatchers/json_rpc_dispatcher.py,sha256=ffu1M32E1AdC7IB44mlbV2L56eJQMsp-7fYi_r4rmHc,6331
12
+ mcp_proxy_adapter/dispatchers/json_rpc_dispatcher.py,sha256=Iv7Z4GX5Wy6gGNESEYqjLnrPvxPYXa9WJiwaTSKMjg0,6238
13
13
  mcp_proxy_adapter/examples/analyze_config.py,sha256=vog7TNHDw5ZoYhQLbAvZvEoufmQwH54KJzQBJrSq5w4,4283
14
14
  mcp_proxy_adapter/examples/basic_integration.py,sha256=w_oA777YiQt36gzI113KPQ6k45caXbMCqW9hD8sy8zo,4657
15
15
  mcp_proxy_adapter/examples/docstring_and_schema_example.py,sha256=c96L4KF_7yWzffmvd4hyeQuXSdYyYkv7Uvuy0QxgMcQ,1929
@@ -22,8 +22,8 @@ mcp_proxy_adapter/examples/project_structure_example.py,sha256=sswTo6FZb1F5juHa0
22
22
  mcp_proxy_adapter/examples/testing_example.py,sha256=AB13c4C1bjs1145O-yriwyreeVXtMOlQLzs2BCGmprk,1719
23
23
  mcp_proxy_adapter/validators/docstring_validator.py,sha256=Onpq2iNJ1qF4ejkJJIlBkLROuSNIVALHVmXIgkCpaFI,2934
24
24
  mcp_proxy_adapter/validators/metadata_validator.py,sha256=uCrn38-VYYn89l6f5CC_GoTAHAweaOW2Z6Esro1rtGw,3155
25
- mcp_proxy_adapter-2.1.8.dist-info/licenses/LICENSE,sha256=OkApFEwdgMCt_mbvUI-eIwKMSTe38K3XnU2DT5ub-wI,1072
26
- mcp_proxy_adapter-2.1.8.dist-info/METADATA,sha256=00u84DQvT9pK7oERFmMbyrOiBbCaMxeBiqOpx2NRgV8,12578
27
- mcp_proxy_adapter-2.1.8.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
28
- mcp_proxy_adapter-2.1.8.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
29
- mcp_proxy_adapter-2.1.8.dist-info/RECORD,,
25
+ mcp_proxy_adapter-2.1.9.dist-info/licenses/LICENSE,sha256=OkApFEwdgMCt_mbvUI-eIwKMSTe38K3XnU2DT5ub-wI,1072
26
+ mcp_proxy_adapter-2.1.9.dist-info/METADATA,sha256=nZ4aznn1akyMf7bPXO3kQb0Az6FiOx2hoCssFuvM05Y,12578
27
+ mcp_proxy_adapter-2.1.9.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
28
+ mcp_proxy_adapter-2.1.9.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
29
+ mcp_proxy_adapter-2.1.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.1.0)
2
+ Generator: setuptools (80.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5