Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions src/shell-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,26 @@ server.resource(
// Shell command execution tool configuration
server.tool(
"shell_exec",
"Executes commands in the specified shell",
"Executes commands in the specified shell with detailed error handling and output capture",
{
command: z.string().min(1),
workingDir: workingDir ? z.string().optional() : z.string(),
command: z
.string()
.min(1)
.describe(
"The shell command to execute in the configured shell environment",
),
workingDir: workingDir
? z
.string()
.optional()
.describe(
"Optional working directory to execute the command in (must be under $HOME for security)",
)
: z
.string()
.describe(
"Working directory to execute the command in (must be under $HOME for security)",
),
},
async ({ command, workingDir: cmdWorkingDir }) => {
try {
Expand Down