MCPcopy Create free account
hub / github.com/IBM/mcp-cli / wrapper

Method wrapper

src/mcp_cli/adapters/cli.py:73–87  ·  view source on GitHub ↗

Typer command wrapper.

(**kwargs)

Source from the content-addressed store, hash-verified

71
72 # Create the wrapper function
73 def wrapper(**kwargs):
74 """Typer command wrapper."""
75 # Run the async command synchronously
76 result = asyncio.run(
77 CLICommandAdapter._execute_command(command, kwargs)
78 )
79
80 # Handle result
81 if result.success:
82 if result.output:
83 output.print(result.output)
84 else:
85 if result.error:
86 output.error(result.error)
87 raise typer.Exit(code=1)
88
89 # Set function annotations for Typer
90 wrapper.__annotations__ = annotations

Callers

nothing calls this directly

Calls 2

runMethod · 0.80
_execute_commandMethod · 0.80

Tested by

no test coverage detected