MCPcopy Create free account
hub / github.com/Louisym/MiniCC / bash_tool

Function bash_tool

mini_claude_code/tools.py:21–37  ·  view source on GitHub ↗
(input_json:str)

Source from the content-addressed store, hash-verified

19 return handler(tool_input_json)
20
21def bash_tool(input_json:str):
22 data = json.loads(input_json)
23 cmd = data['command']
24 try:
25 result = subprocess.run(
26 cmd,
27 shell=True,
28 capture_output=True,
29 text=True,
30 timeout=30,
31 )
32 output = result.stdout
33 if result.stderr:
34 output += f'\nSTDERR: {result.stderr}'
35 return output
36 except subprocess.TimeoutExpired:
37 return 'ERROR: timeout for 30s'
38
39def read_tool(input_json:str):
40 data = json.loads(input_json)

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected