mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
Clarify search and message tool edge cases
This commit is contained in:
@@ -32,9 +32,10 @@ impl Tool for ToolSearchTool {
|
||||
fn description(&self) -> &str {
|
||||
"Search for available extensions to add new capabilities. Extensions include \
|
||||
channels (Telegram, Slack, Discord — connect messaging platforms so IronClaw can \
|
||||
receive and reply there), tools, and MCP servers. Install and activate channels here; \
|
||||
use the `message` tool for proactive outbound sends. Use discover:true to search online \
|
||||
if the built-in registry has no results."
|
||||
receive and reply there), tools, and MCP servers. Use `tool_install` and \
|
||||
`tool_activate` to install and enable channels; use the `message` tool for proactive \
|
||||
outbound sends. Use discover:true to search online if the built-in registry has no \
|
||||
results."
|
||||
}
|
||||
|
||||
fn parameters_schema(&self) -> serde_json::Value {
|
||||
@@ -643,7 +644,7 @@ mod tests {
|
||||
};
|
||||
|
||||
let description = tool.description();
|
||||
assert!(description.contains("Install and activate channels here"));
|
||||
assert!(description.contains("Use `tool_install` and `tool_activate`"));
|
||||
assert!(description.contains("use the `message` tool for proactive outbound sends"));
|
||||
}
|
||||
|
||||
|
||||
@@ -185,9 +185,11 @@ impl Tool for MessageTool {
|
||||
active conversation; use this tool for proactive notifications, routine/background \
|
||||
follow-ups, attachments, or sending to a different channel/recipient. If channel/target \
|
||||
are omitted, reuses the current conversation's channel and sender/group when available. \
|
||||
If you provide `target` without `channel` and no scoped channel can be resolved, the \
|
||||
message may be broadcast across connected channels instead of sent to just one. \
|
||||
Supports file attachments: first download the file with the http tool using save_to \
|
||||
(e.g., http GET https://picsum.photos/800/600 save_to=/tmp/photo.jpg), then pass \
|
||||
the file path in the attachments array. Images are sent as photos on Telegram. \
|
||||
(e.g., http GET https://picsum.photos/800/600 save_to=/tmp/photo.jpg), then pass the \
|
||||
file path in the attachments array. Images are sent as photos on Telegram. \
|
||||
- Signal: target accepts E.164 (+1234567890) or group ID \
|
||||
- Telegram: target accepts username or chat ID \
|
||||
- Slack: target accepts channel (#general) or user ID"
|
||||
@@ -457,6 +459,7 @@ mod tests {
|
||||
assert!(!description.is_empty());
|
||||
assert!(description.contains("Use normal assistant output to reply"));
|
||||
assert!(description.contains("proactive notifications"));
|
||||
assert!(description.contains("provide `target` without `channel`"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user