MCPcopy Index your code
hub / github.com/IBM/mcp-cli / demonstrate_command

Function demonstrate_command

examples/commands/command_system_demo.py:165–185  ·  view source on GitHub ↗

Run a command and show the result.

(command: str, description: str)

Source from the content-addressed store, hash-verified

163
164
165async def demonstrate_command(command: str, description: str):
166 """Run a command and show the result."""
167 output.rule(f"[bold blue]{description}[/bold blue]")
168 output.print(f"[cyan]Command:[/cyan] {command}")
169 output.print()
170
171 result = False
172 try:
173 # Execute the command
174 result = await handle_command(command)
175
176 if result:
177 output.success("Command handled successfully")
178 else:
179 output.warning("Command not recognized")
180
181 except Exception as e:
182 output.error(f"Error executing command: {e}")
183
184 output.print()
185 return result
186
187
188async def main():

Callers 1

mainFunction · 0.85

Calls 1

successMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…