From cd772043b9bbf0e4d7bffc7432b55e20a95e759f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 07:07:33 +0000 Subject: [PATCH 1/2] Add descriptions to shell_exec tool schema Co-Authored-By: hinoshita1992@gmail.com --- src/shell-server/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shell-server/index.ts b/src/shell-server/index.ts index d3a00c8..8943af2 100644 --- a/src/shell-server/index.ts +++ b/src/shell-server/index.ts @@ -118,10 +118,12 @@ 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 { From a8b84465aefb8cfe716bca8a373899235f102245 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 07:10:05 +0000 Subject: [PATCH 2/2] Fix: Apply Prettier formatting Co-Authored-By: hinoshita1992@gmail.com --- src/shell-server/index.ts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/shell-server/index.ts b/src/shell-server/index.ts index 8943af2..9e4cecb 100644 --- a/src/shell-server/index.ts +++ b/src/shell-server/index.ts @@ -120,10 +120,24 @@ server.tool( "shell_exec", "Executes commands in the specified shell with detailed error handling and output capture", { - 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)"), + 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 {