From 287c398229f0513e869d57d341f9ab19407fde1f Mon Sep 17 00:00:00 2001 From: Shuvra Basak <95076423+becauseno7@users.noreply.github.com> Date: Sun, 25 Oct 2026 14:16:31 +0600 Subject: [PATCH] automation: doc comments on list_commands and list_effects --- crates/automation/src/tools.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/automation/src/tools.rs b/crates/automation/src/tools.rs index d19bfc654..1d6074247 100644 --- a/crates/automation/src/tools.rs +++ b/crates/automation/src/tools.rs @@ -175,6 +175,7 @@ fn params_of(v: Option<&Value>) -> Result { // ------------------------------------------------------------------ engine tools +/// `list_commands` tool: the engine command list, minus empty fields; with `compact`, only `id` and `label`. fn list_commands(b: &mut Backend, a: &Value) -> Result { let compact = get(a, "compact").and_then(Value::as_bool).unwrap_or(false); let schemas = (!compact && get(a, "schemas").and_then(Value::as_bool).unwrap_or(false)).then_some(json!(true)); @@ -209,6 +210,7 @@ fn describe_command(b: &mut Backend, a: &Value) -> Result { json_reply(b.exec("command.describe", json!({"command": id}))?) } +/// `list_effects` tool: the effect registry; with `compact`, only `id`, `name` and `category`. fn list_effects(b: &mut Backend, a: &Value) -> Result { let mut r = b.exec("effect.list", obj(&[("filter", get(a, "filter"))]))?; if get(a, "compact").and_then(Value::as_bool).unwrap_or(false) {