MCPcopy Create free account
hub / github.com/codehamr/codehamr / BashSchema

Function BashSchema

internal/tools/bash.go:99–121  ·  view source on GitHub ↗

BashSchema is the OpenAI tool definition for bash, exposed by every profile.

()

Source from the content-addressed store, hash-verified

97 // Exit errors go into the output, exactly what the model needs.
98 s += fmt.Sprintf("\n(exit: %v)", err)
99 }
100 }
101 return s
102}
103
104// BashSchema is the OpenAI tool definition for bash, exposed by every profile.
105func BashSchema() map[string]any {
106 return map[string]any{
107 "type": "function",
108 "function": map[string]any{
109 "name": BashName,
110 "description": "Run a shell command in the user's environment. Combined stdout+stderr is returned; a non-zero exit comes back as `(exit: N)`, not an error. Use targeted commands (grep, head, tail) to keep output small. Independent commands belong in one message together with any other independent calls.",
111 "parameters": map[string]any{
112 "type": "object",
113 "properties": map[string]any{
114 "cmd": map[string]any{
115 "type": "string",
116 "description": "The shell command to execute.",
117 },
118 "timeout_seconds": map[string]any{
119 "type": "integer",
120 "description": "Optional per call timeout in seconds. Default 600, hard capped at 3600. Raise for commands you expect to run longer (large test suites, docker build, DB migrations). If a call comes back `(timeout after ...)` and the command was legitimately slow, re-issue it once with a larger value - raising the timeout is a different call, not a repeat.",
121 },
122 },
123 "required": []string{"cmd"},
124 },

Callers 1

buildToolsMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected