Skip to main content

Module tools

Module tools 

Source
Expand description

Agent tool system for RustyClaw.

Provides a registry of tools that the language model can invoke, and formatters that serialise the tool definitions into each provider’s native schema (OpenAI function-calling, Anthropic tool-use, Google function declarations).

Structs§

ToolCall
A tool call requested by the model (sent gateway → client for display).
ToolDef
A tool that the agent can invoke.
ToolParam
JSON-Schema-like parameter definition.
ToolResult
The result of executing a tool (sent gateway → client for display, and also injected back into the conversation for the model).

Constants§

VAULT_ACCESS_DENIED
Standard denial message when a tool tries to touch the vault.

Statics§

AGENTS_LIST
APPLY_PATCH
BROWSER
CANVAS
CRON
EDIT_FILE
EXECUTE_COMMAND
FIND_FILES
GATEWAY
IMAGE
LIST_DIRECTORY
MEMORY_GET
MEMORY_SEARCH
MESSAGE
NODES
PROCESS
READ_FILE
read_file — read the contents of a file on disk.
SEARCH_FILES
SECRETS_GET
SECRETS_LIST
SECRETS_STORE
SESSIONS_HISTORY
SESSIONS_LIST
SESSIONS_SEND
SESSIONS_SPAWN
SESSION_STATUS
SKILL_ENABLE
SKILL_INFO
SKILL_INSTALL
SKILL_LINK_SECRET
SKILL_LIST
SKILL_SEARCH
TTS
WEB_FETCH
WEB_SEARCH
WRITE_FILE

Functions§

agents_list_params
all_tools
Return all available tools.
apply_patch_params
browser_params
canvas_params
command_references_credentials
Returns true when a command string references the credentials directory.
cron_params
edit_file_params
execute_command_params
execute_tool
Find a tool by name and execute it with the given arguments.
expand_tilde
Expand a leading ~ to the user’s home directory.
find_files_params
gateway_params
image_params
init_sandbox
Called once from the gateway to initialize the sandbox.
is_protected_path
Returns true when path falls inside the credentials directory.
is_secrets_tool
Returns true for tools that must be routed through the gateway (i.e. handled by execute_secrets_tool) rather than execute_tool.
is_skill_tool
Returns true for skill-management tools that are routed through the gateway (i.e. handled by execute_skill_tool) because they need access to the process-global SkillManager.
list_directory_params
memory_get_params
memory_search_params
message_params
nodes_params
process_manager
Get the global process manager instance.
process_params
read_file_params
run_sandboxed_command
Run a command through the sandbox (or unsandboxed if not initialized).
sandbox
Get the global sandbox instance, if initialized.
sanitize_tool_output
Sanitize tool output: truncate if too large, warn if garbage detected.
search_files_params
secrets_get_params
secrets_list_params
secrets_store_params
session_status_params
sessions_history_params
sessions_list_params
sessions_send_params
sessions_spawn_params
set_credentials_dir
Called once from the gateway to register the credentials path.
set_vault
Called once from the gateway to register the vault for tool access.
skill_enable_params
skill_info_params
skill_install_params
skill_link_secret_params
skill_list_params
skill_search_params
tools_anthropic
Anthropic tool-use format.
tools_google
Google Gemini function-declaration format.
tools_openai
OpenAI / OpenAI-compatible function-calling format.
tts_params
vault
Get the global vault instance, if initialized.
web_fetch_params
web_search_params
write_file_params

Type Aliases§

SharedVault
Shared vault type for thread-safe access (uses tokio::sync::Mutex for async).