tools: improve usage/execute_lua desc

Amolith created

Change summary

internal/server/server.go | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)

Detailed changes

internal/server/server.go 🔗

@@ -40,10 +40,21 @@ func New(cfg *config.Config) *mcp.Server {
 	}, &mcp.ServerOptions{})
 
 	// Register tools with the SB client closed over
+	mcp.AddTool(server, &mcp.Tool{
+		Name:        "usage",
+		Description: "Load the SilverBullet usage guide, gotchas, and best practices. Call this BEFORE execute_lua.",
+		Annotations: &mcp.ToolAnnotations{
+			Title:          "Usage Guide",
+			ReadOnlyHint:   true,
+			IdempotentHint: true,
+			OpenWorldHint:  new(false),
+		},
+	}, makeUsageHandler())
+
 	mcp.AddTool(server, &mcp.Tool{
 		Name: "execute_lua",
 		Description: "Execute a Space Lua script on the SilverBullet instance. " +
-			"Always call `usage` first to load the Space Lua reference and API guide.",
+			"DO NOT call this without FIRST calling usage to understand how to interact with SilverBullet in the first place.",
 		Annotations: &mcp.ToolAnnotations{
 			Title:           "Execute Lua",
 			ReadOnlyHint:    false,
@@ -75,18 +86,6 @@ func New(cfg *config.Config) *mcp.Server {
 		},
 	}, makeConsoleLogsHandler(sbClient))
 
-	mcp.AddTool(server, &mcp.Tool{
-		Name: "usage",
-		Description: "Load the full SilverBullet usage guide: Space Lua syntax, available APIs (space.*, editor.*, net.*, query), gotchas, and best practices. " +
-			"Always call this before `execute_lua`.",
-		Annotations: &mcp.ToolAnnotations{
-			Title:          "Usage Guide",
-			ReadOnlyHint:   true,
-			IdempotentHint: true,
-			OpenWorldHint:  ptrBool(false),
-		},
-	}, makeUsageHandler())
-
 	return server
 }