Commit 2a01ebe

mo khan <mo@mokhan.ca>
2026-01-22 05:16:38
chore: improve the description for the eval tool
1 parent 4a4b19b
Changed files (1)
lib
elelem
plugins
lib/elelem/plugins/eval.rb
@@ -1,8 +1,17 @@
 # frozen_string_literal: true
 
 Elelem::Plugins.register(:eval) do |toolbox|
+  description = <<~'DESC'
+    Evaluate Ruby code. Available API:
+
+    name = "search"
+    toolbox.add(name, description: "Search using rg", params: { query: { type: "string" } }, required: ["query"], aliases: []) do |args|
+      toolbox.run("execute", { "command" => "rg --json -nI -F #{args["query"]}" })
+    end
+  DESC
+
   toolbox.add("eval",
-    description: "Evaluate Ruby code. Use `toolbox.add(name, description:, params:, required:) { |args| ... }` to register new tools.",
+    description: description,
     params: { ruby: { type: "string" } },
     required: ["ruby"]
   ) do |args|