MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / wrapper

Method wrapper

src/mcp_client/client.py:316–323  ·  view source on GitHub ↗
(*args, is_catch_exception=True, **kwargs)

Source from the content-addressed store, hash-verified

314 self, tool_name: str, param_names: list[str]
315 ) -> callable:
316 def wrapper(*args, is_catch_exception=True, **kwargs) -> dict:
317 if len(args) > len(param_names):
318 raise ValueError(
319 f"Too many arguments: expected {len(param_names)}, got {len(args)}"
320 )
321 arguments = dict(zip(param_names, args))
322 arguments.update(kwargs)
323 return self.invoke(tool_name, arguments, is_catch_exception)
324
325 return wrapper
326

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.95

Tested by

no test coverage detected