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

Function _format_function_call

src/sandbox_vm/mcp/server.py:20–28  ·  view source on GitHub ↗
(name: str, args: tuple, kwargs: dict)

Source from the content-addressed store, hash-verified

18
19
20def _format_function_call(name: str, args: tuple, kwargs: dict) -> str:
21 def short_repr(x):
22 r = repr(x)
23 return r if len(r) <= 20 else r[:17] + "..."
24
25 args_str = ", ".join(short_repr(a) for a in args)
26 kwargs_str = ", ".join(f"{k}={short_repr(v)}" for k, v in kwargs.items())
27 all_args = ", ".join(filter(None, [args_str, kwargs_str]))
28 return f"{name}({all_args})"
29
30
31def _make_wrapper(func, name):

Callers 1

wrapperFunction · 0.85

Calls 1

short_reprFunction · 0.85

Tested by

no test coverage detected