From 1393a13df7cbb7bbb51195183c5e20ca5fea14f3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 3 Feb 2026 12:54:32 -0600 Subject: [PATCH] Improve tool descriptions for build_project and git_commit --- src/lib/tools/BuildProjectTool.test.ts | 2 +- src/lib/tools/BuildProjectTool.ts | 2 +- src/lib/tools/GitCommitTool.test.ts | 2 +- src/lib/tools/GitCommitTool.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/tools/BuildProjectTool.test.ts b/src/lib/tools/BuildProjectTool.test.ts index 36a1caac..517a67cb 100644 --- a/src/lib/tools/BuildProjectTool.test.ts +++ b/src/lib/tools/BuildProjectTool.test.ts @@ -28,7 +28,7 @@ describe('BuildProjectTool', () => { }); it('should have correct description', () => { - expect(tool.description).toBe('Build the project using esbuild. Creates optimized production files in the dist directory.'); + expect(tool.description).toContain('Build the project using esbuild-wasm. Creates optimized production files in the dist directory'); }); it('should fail if package.json does not exist', async () => { diff --git a/src/lib/tools/BuildProjectTool.ts b/src/lib/tools/BuildProjectTool.ts index c91e6a86..275bfbaa 100644 --- a/src/lib/tools/BuildProjectTool.ts +++ b/src/lib/tools/BuildProjectTool.ts @@ -7,7 +7,7 @@ export class BuildProjectTool implements Tool { private cwd: string; private esmUrl: string; - readonly description = "Build the project using esbuild. Creates optimized production files in the dist directory."; + readonly description = "Build the project using esbuild-wasm. Creates optimized production files in the dist directory, making the site preview visible to the user (or updating the existing preview) and ready for deployment. This tool also helps verify that your changes are correct. ALWAYS call this tool when you have finished making changes."; constructor(fs: JSRuntimeFS, cwd: string, esmUrl: string) { this.fs = fs; diff --git a/src/lib/tools/GitCommitTool.test.ts b/src/lib/tools/GitCommitTool.test.ts index d83513ff..8b98d12e 100644 --- a/src/lib/tools/GitCommitTool.test.ts +++ b/src/lib/tools/GitCommitTool.test.ts @@ -54,7 +54,7 @@ describe('GitCommitTool', () => { }); it('should have correct description and inputSchema', () => { - expect(tool.description).toBe('Commit changes to git with a commit message. Automatically adds all unstaged files.'); + expect(tool.description).toContain('Commit changes to git with a commit message. Automatically adds all unstaged files.'); expect(tool.inputSchema).toBeDefined(); }); diff --git a/src/lib/tools/GitCommitTool.ts b/src/lib/tools/GitCommitTool.ts index fd857a10..ea87020e 100644 --- a/src/lib/tools/GitCommitTool.ts +++ b/src/lib/tools/GitCommitTool.ts @@ -14,7 +14,7 @@ export class GitCommitTool implements Tool { private cwd: string; private onCommit?: () => void; - readonly description = "Commit changes to git with a commit message. Automatically adds all unstaged files."; + readonly description = "Commit changes to git with a commit message. Automatically adds all unstaged files. ALWAYS call this tool after you have finished making changes, and after you have successfully built the project with the `build_project` tool."; readonly inputSchema = z.object({ message: z.string().describe('Commit message text'),