bot/workspace/TOOLS.md
Use tools when they improve accuracy or perform an action the user requested. The tool definitions available in the current turn are the source of truth for names and parameters; some tools may be unavailable because of configuration, channel policy, read-only mode, or runtime context.
OpenViking is the preferred source for knowledge already stored there, especially personal or internal context. This does not mean searching OpenViking before every tool call: use the local workspace for current local files and the web for current public information.
Available OpenViking tools may include:
| Tool | Use it for |
|---|---|
openviking_search | Semantic retrieval across resources, memories, and skills |
openviking_multi_read | Reading the complete content of one or more known Viking URIs |
openviking_list | Browsing a Viking URI hierarchy |
openviking_grep | Regex or exact-text search inside OpenViking content |
openviking_glob | Finding resources by URI or filename pattern |
openviking_add_resource | Persisting and indexing a URL or local file in OpenViking |
openviking_memory_commit | Explicitly storing durable personal memory |
openviking_search when the request is conceptual or semantic. Search results contain URIs and summaries, not necessarily full content.openviking_multi_read on the relevant result URIs before relying on details that are not present in the summary. Batch independent URIs in one call.openviking_grep for known text or regex patterns, openviking_glob for path patterns, and openviking_list to explore a known directory.openviking_memory_commit only when the user explicitly asks you to remember information for future conversations. Ordinary conversation history is synchronized separately; do not commit every conversation or duplicate the same memory.user and assistant messages. Do not add a session_id; the tool manages its own commit session.openviking_add_resource when the user asks to save, index, or reuse a resource—not merely to read it once. Resource ingestion is asynchronous; a timeout may mean processing continues, so do not immediately submit the same resource again.openviking_add_resource is not available in read-only mode. All OpenViking tools may be hidden for a channel or request; use only tools present in the current turn.The local tools operate inside the current session's sandbox, whose paths may differ from host paths.
list_dir to inspect a directory and read_file to read a known file.edit_file for a precise replacement. Read the file first and provide enough surrounding text for old_text to match exactly once.write_file to create a file or intentionally replace its full contents. Do not overwrite an existing file when a targeted edit is safer.exec for commands, search, builds, tests, and diagnostics. Use pwd when the sandbox working directory is unclear.web_search to discover relevant public sources. Use web_fetch when the URL is already known or when a search result needs full-text inspection.messagemessage immediately sends content to the current user and channel. For a normal conversational reply, return text directly instead of calling message.
Use message only when immediate or proactive delivery is needed, such as a heartbeat update or a background workflow. Avoid sending the same content through both message and the final response.
generate_imagegenerate requires a prompt.edit requires a prompt and base_image; mask is optional.variation requires base_image.base_image and mask may be a data URI, URL, or sandbox-local path.send_to_user=false only when the image should remain an intermediate result.Use only options supported by the current tool schema and configured image model.
spawnUse spawn for a substantial, self-contained task that can run independently in the background. Give the subagent a complete task description, including the expected output and essential context.
Do not spawn for a simple task, for work that blocks the current step, or merely to avoid doing the work yourself. The subagent reports its result asynchronously; do not wait by repeatedly polling or spawn duplicate tasks.
cronUse cron when the user asks for a one-time reminder, a fixed interval, or a recurring schedule.
at is for one-time execution. Prefer an ISO datetime with an explicit UTC offset when timezone could be ambiguous.every_seconds is for fixed intervals.cron_expr is for calendar-based recurring schedules.list before removing a job if its ID is unknown, then remove it by job_id.Heartbeat is different from cron. The runtime periodically reads HEARTBEAT.md; it is suitable for best-effort checks, not exact-time reminders.
HEARTBEAT.md only when the user asks for an ongoing periodic check or task.message for actionable updates. If nothing needs attention, reply exactly HEARTBEAT_OK.Configured MCP tools appear with names such as mcp_<server>_<tool>. Follow their current schemas and descriptions. Apply the same inspection, authorization, safety, and verification rules as for built-in tools, especially when an MCP tool changes external state.