Skip to main content

Tools Configuration

PicoClaw's tool settings live under the tools field of config.json. This page is the reference for global tool behavior, path policy, and the master tool-switch table. Every tool family has a dedicated page under docs/tools.

Tool switches​

Every built-in tool is enabled or disabled individually through tools.<key>.enabled unless noted otherwise. Most switches also accept an environment override following the pattern PICOCLAW_TOOLS_<KEY>_ENABLED (for example PICOCLAW_TOOLS_EXEC_ENABLED=false); the exception is read_file, whose settings are JSON-only.

ToolSwitchDefaultNotes
read_filetools.read_file.enabledtrueMode and size limit under tools.read_file; see Filesystem tools
write_filetools.write_file.enabledtrueFilesystem tools
edit_filetools.edit_file.enabledtrueFilesystem tools
append_filetools.append_file.enabledtrueFilesystem tools
list_dirtools.list_dir.enabledtrueFilesystem tools
search_filestools.search_files.enabledtrueFilesystem tools
load_imagetools.load_image.enabledtrueMedia tools
send_filetools.send_file.enabledtrueMedia tools
send_ttstools.send_tts.enabledfalseRegistered only when a TTS provider is configured; see Media tools
image_generatetools.image_generate.enabledfalseNeeds an image model under tools.image_generate.model_name; see Image generation
web_searchtools.web.enabledtrueSearch providers and settings under tools.web; see Web tools
web_fetchtools.web_fetch.enabledtrueFetch settings under tools.web; see Web tools
exectools.exec.enabledtrueSee Exec tool; env_set (object, JSON-only) and env_allowlist (string[], env PICOCLAW_TOOLS_EXEC_ENV_ALLOWLIST) extend the child-process environment — see Environment sanitization
crontools.cron.enabledtrueSee Cron tool
todotools.todo.enabledfalseSee Todo planning tool
messagetools.message.enabledtrueMedia attachments gated by tools.message.media_enabled (false); see Messaging tools
reactiontools.reaction.enabledfalseFails gracefully on channels without reaction support; see Messaging tools
spawntools.spawn.enabledtrueRequires tools.subagent.enabled; see Subagent tools
subagenttools.subagent.enabledtrueThe sync subagent tool also requires spawn or spawn_status to be enabled
spawn_statustools.spawn_status.enabledfalseRequires tools.subagent.enabled
delegate—multi-agent setupsRegistered automatically when more than one agent exists
find_skillstools.find_skills.enabledtrueRequires tools.skills.enabled; see Skills tools
install_skilltools.install_skill.enabledtrueRequires tools.skills.enabled; see Skills tools
i2c, spi, serialtools.i2c.enabled, tools.spi.enabled, tools.serial.enabledfalsePlatform-specific; see Hardware tools
MCP toolstools.mcp.enabledfalseServers under tools.mcp.servers; see MCP tools
MCP discoverytools.mcp.discovery.enabledfalseRegisters tool_search_tool_bm25 / tool_search_tool_regex; see Tool discovery
memoryagents.defaults.memory.memory_enabledtrueInjects MEMORY.md into the system prompt and registers the memory tool; see Memory tool and Memory options

Two related settings sit outside the pattern:

  • tools.media_cleanup.* prunes stored media and uses the PICOCLAW_MEDIA_CLEANUP_ environment prefix; see Media tools.
  • tools.skills.registries configures the registries used by find_skills and install_skill; see Skills tools.

Browser automation is not a separate built-in switch: it is provided by an MCP server such as Playwright, configured under tools.mcp.servers. See Browser automation.

Agents can see a narrower tool set than the global switches allow: an AGENT.md frontmatter tools: list acts as an allowlist per agent, and turn_profile can narrow the exposed tools further for specific requests (see Configuration).

Tool parameter schemas are adapted per provider. Native Google Gemini endpoints receive full JSON Schema through parametersJsonSchema, while Vertex AI and Gemini-compatible proxies receive sanitized OpenAPI-style schemas. No tool setting is required; see Provider tool schema compatibility.

Path access​

All filesystem-facing tools share one sandbox model:

ConfigTypeDefaultDescription
allow_read_pathsstring[][]Regular expressions of absolute paths that read-only filesystem tools may access even when the workspace restriction would deny them (for example `^/srv/data(?:/
allow_write_pathsstring[][]Regular expressions of absolute paths that write tools (write_file, edit_file, append_file) and exec may modify outside the workspace

These allowlists extend the workspace boundary defined by agents.defaults.restrict_to_workspace (default true) and agents.defaults.allow_read_outside_workspace (default false, read-only). They never override the protected local files policy, so credentials and system files stay denied. The agent's own media directory is always appended to the read allowlist automatically and is also explicitly available to exec for attachment processing; it is not part of the configured read allowlist.

Directory Structure​

{
"tools": {
"web": {
...
},
"mcp": {
...
},
"exec": {
...
},
"cron": {
...
},
"skills": {
...
}
}
}

Sensitive Data Filtering​

Before tool results are sent to the LLM, PicoClaw can redact exact sensitive values (API keys, tokens, secrets) from the output. This is a defense-in-depth control, not a data-loss-prevention (DLP) boundary.

Defense in depth, not DLP. Only exact configured values are replaced. Base64, hex, character-spaced, reversed, compressed, chunked, or model-reconstructed forms bypass the filter. It also does not cover artifacts on disk, logs, channel messages, or the final model response. Do not rely on it to prevent credential exfiltration.

See Sensitive Data Filtering for full documentation.

ConfigTypeDefaultDescription
filter_sensitive_databooltrueEnable/disable filtering
filter_min_lengthint8Minimum content length to trigger filtering

Tool call logs record only the argument keys and count, never the argument values, so secrets passed to a tool are not written to log files. The filter above applies to the content exchanged with the LLM, not to logs.

Large tool results​

Tool results larger than max_inline_result_chars (counted in Unicode characters, not bytes) are not injected into the model context in full. PicoClaw saves the full text as a local artifact in the agent workspace (<workspace>/.artifacts/tool/) and keeps a bounded head+tail preview inline: an honest, front-loaded truncation notice with the real number of omitted characters, then the first and last few kilobytes of the output, then a pointer to the full artifact. Keeping useful content inline means the model can usually answer without re-reading the artifact — important for content tools such as read_file, where re-reading a spilled artifact would spill again and loop. The artifact path is also exposed as a structured [file:...] tag so the model can read it (via read_file with offset/length) or forward it with send_file. The preview never removes a tool's own truncation guidance (for example read_file's "call again with offset=…" hint stays in the head). Recognized JSON envelopes — web_fetch's {url, status, extractor, truncated, length, text} result and an MCP tool's text payload shaped {"result": <text>, ...} — are saved as the pageable text they wrap: the wrapped content with real newlines, followed by a <web-fetch-metadata> or <mcp-result-metadata> block carrying the siblings embedded in that object. MCP text payloads are recognized only for tools whose name starts with mcp_; the protocol-level structuredContent and _meta fields of CallToolResult are separate from the text and are not included by this rewrite. That keeps the artifact pageable by read_file/search_files instead of one giant line with escaped newlines; any unrecognized JSON payload (for example from exec) is saved verbatim. This mirrors the large-text handling already used for MCP tools and applies to every tool, including results produced or replaced by an AfterTool hook; artifacts are pruned automatically (older than tools.artifact_max_age_hours, default 24 hours, or beyond the newest tools.artifact_max_files files per directory, default 128). Pruning is best-effort and throttled per directory: a directory is rescanned at most once per minute, and a burst of writes forces a rescan after 8 writes that skipped it, so a spill-heavy turn cannot rescan the directory on every write.

ConfigTypeDefaultDescription
max_inline_result_charsint16384Maximum tool-result text kept inline, in Go runes. Larger results are spilled to a workspace artifact with a bounded head+tail preview. Set to 0 or a negative value to disable.
artifact_max_filesint128Maximum number of files kept in each artifact directory (.artifacts/tool, .artifacts/mcp, and exec spill directories) after age-based pruning. Set to 0 or a negative value to disable the count bound.
artifact_max_age_hoursint24Maximum age of an artifact file, in hours, before it is pruned. Set to 0 or a negative value to disable age-based pruning.

A second artifact directory, <workspace>/.artifacts/evicted/, is used by the context compaction layer, not by the runtime spillover above. When the context window fills up, old tool outputs that fall outside the protected conversation tail are archived there as tool_result_*.txt files (or reused from an existing spill artifact if one already exists), and each evicted result is replaced in the prompt by a compact stub like [Old tool output archived at /path/to/file; exec "cmd" exit=0 1.2 KB; read_file it, or re-run the tool]. Oversized tool-call arguments outside the protected region are similarly archived as tool_args_*.json. Identical results are deduplicated — a later evicted copy points at the first archive. These files are not age-pruned by the artifact_max_age_hours / artifact_max_files settings; they persist until the workspace is cleared or the files are removed manually. See Context Compression for the full compaction policy.

Truncation is separate from spillover. Some tools bound their own raw output before it reaches this layer: exec keeps the first 40% and the last 60% of foreground output beyond tools.exec.max_output_chars (default 50000) around an [OUTPUT TRUNCATED - N chars omitted out of T total] notice, line-mode read_file clamps max_lines requests to tools.read_file.max_lines while cutting lines longer than tools.read_file.max_line_length with a ... [truncated] marker, and MCP text results keep the first 40% and the last 60% of the sanitized text beyond tools.mcp.max_inline_text_chars around an [MCP RESULT TRUNCATED - N chars omitted out of T total] notice while persisting the full raw payload to their own .artifacts/mcp artifact.

When a tool cut its own output (exec, web_fetch, or an MCP text result whose own artifact write failed), the spillover saves the pre-truncation text rather than the truncated view, and the inline preview shows the real head and tail of the full output — so the omitted middle stays readable from the artifact. Results under max_inline_result_chars are normally not spilled. web_fetch defaults maxChars to that same budget and may only lower it per call; when a smaller value cuts the preview, the full page is persisted even when it fits the inline budget, up to a server-side cap of 2,000,000 characters, and a front-loaded warning points the model at the artifact. If the page exceeds that cap, the artifact keeps a head+tail window plus an [ARTIFACT TRUNCATED - N chars omitted out of T total] notice, and the warning points to a structured endpoint or a narrower source.

Security note — artifacts are not filtered. The artifact file is written from the raw tool result inside result normalization, which runs before filter_sensitive_data is applied. The filter only redacts the content that is later injected into the model context, so the artifact on disk keeps the unfiltered payload (this was already true for MCP large-text artifacts; it now applies to every tool). A large exec result, for example, can persist raw secrets to the workspace even when filtering is enabled. The directory (0700) and files (0600) are permission-restricted, but their contents are not redacted, and the artifact path is exposed to the model — which can read it or forward it with send_file, delivering the raw file. Treat workspace artifacts as sensitive data. See Sensitive Data Filtering.

Protected local files​

Filesystem read tools deny .env, .env.*, .envrc, .security.yml (including its backups), .netrc, .npmrc, .pypirc, .pgpass, .git-credentials, and files inside .ssh, .aws, .kube, .gnupg, .docker, .azure, .config/gh, or .config/gcloud directories. Under PICOCLAW_HOME, reads are also denied for auth.json, auth/mcp, and channels/weixin/context-tokens; the default plugin-data root is hidden because it may contain MCP bearer-token files. Reads of CODEX_HOME/auth.json (default ~/.codex/auth.json) are denied as well. Windows NT/device-namespace paths are rejected before path resolution. The check follows symlinks, hides protected entries from directory listings and file searches, and applies to local files attached through send_file, load_image, or message. Read allow paths do not override it.

Filesystem writes are denied for those same credential paths, except that write_file may write .env.example; edit_file and append_file still cannot read it. Writes to /etc/sudoers, /etc/passwd, /etc/shadow, /etc/sudoers.d, /etc/systemd, and the workspace sessions directory are also denied. The write check follows symlinks and runs for write_file, edit_file, and append_file; write allow paths do not override it. The default plugin-data directory is protected, but a custom plugins.data_dir is not discovered by this policy.

This is a guard for PicoClaw's filesystem tools. Shell commands and external MCP tools run outside this policy; use process or container isolation when they must not access workspace secrets.

Image Generation​

The optional image_generate tool uses an image-capable OpenAI, Gemini, or OpenRouter model configured in model_list and sends generated images to the current chat. See the image generation guide for configuration and supported arguments.

Environment Variables​

All configuration options can be overridden via environment variables with the format PICOCLAW_TOOLS_<SECTION>_<KEY>:

For example:

  • PICOCLAW_TOOLS_WEB_BRAVE_ENABLED=true
  • PICOCLAW_TOOLS_EXEC_ENABLED=false
  • PICOCLAW_TOOLS_EXEC_ENABLE_DENY_PATTERNS=false
  • PICOCLAW_TOOLS_CRON_EXEC_TIMEOUT_MINUTES=10
  • PICOCLAW_TOOLS_MCP_ENABLED=true
  • PICOCLAW_TOOLS_MCP_MAX_INLINE_TEXT_CHARS=16384
  • PICOCLAW_TOOLS_MAX_INLINE_RESULT_CHARS=16384
  • PICOCLAW_TOOLS_ARTIFACT_MAX_FILES=128
  • PICOCLAW_TOOLS_ARTIFACT_MAX_AGE_HOURS=24

Note: Nested map-style config (for example tools.mcp.servers.<name>.*) is configured in config.json rather than environment variables.

Concurrency​

agents.defaults.max_parallel_tool_calls (env PICOCLAW_AGENTS_DEFAULTS_MAX_PARALLEL_TOOL_CALLS, default 4) controls how many tool calls from a single LLM response may run at the same time. 0 or 1 runs all calls sequentially. See Parallel tool calls for which tools are parallel-eligible and how conflicts are resolved.

Memory​

The memory tool and its companion prompt injections are configured under agents.defaults.memory (not under tools). Limits are counted in Unicode characters (Go runes). A non-positive value falls back to its default.

ConfigEnvTypeDefaultDescription
agents.defaults.memory.memory_enabledPICOCLAW_AGENTS_DEFAULTS_MEMORY_ENABLEDbooltrueInject MEMORY.md into the system prompt and register the memory tool. USER.md is injected regardless of this setting
agents.defaults.memory.memory_char_limitPICOCLAW_AGENTS_DEFAULTS_MEMORY_CHAR_LIMITint2200Character cap for MEMORY.md; the memory tool refuses writes that would exceed it
agents.defaults.memory.user_char_limitPICOCLAW_AGENTS_DEFAULTS_MEMORY_USER_CHAR_LIMITint1375Character cap for USER.md, enforced the same way
agents.defaults.memory.daily_notes_enabledPICOCLAW_AGENTS_DEFAULTS_MEMORY_DAILY_NOTES_ENABLEDbooltrueInject the most recent daily notes (memory/YYYYMM/YYYYMMDD.md) into the system prompt
agents.defaults.memory.recent_daily_notes_countPICOCLAW_AGENTS_DEFAULTS_MEMORY_RECENT_DAILY_NOTES_COUNTint3How many days of daily notes to inject
agents.defaults.memory.daily_notes_char_limitPICOCLAW_AGENTS_DEFAULTS_MEMORY_DAILY_NOTES_CHAR_LIMITint1000Character cap per injected daily note; newest lines win when trimming

See Memory tool for the tool's arguments and limit-exceeded behavior.

For MCP tools, tools.mcp.max_inline_text_chars controls how much text result is kept inline in model context. The threshold is counted in Unicode characters (Go runes), not bytes. For example, 16384 means up to 16,384 characters inline, which may occupy more than 16 KB for multibyte text such as CJK. Above this threshold, PicoClaw keeps the first 40% and the last 60% of the sanitized MCP text around an [MCP RESULT TRUNCATED - N chars omitted out of T total] notice and saves the full raw payload as a local artifact in the agent workspace, with a short note plus a structured [file:...] artifact path pointing at it. If the artifact write fails, the bounded view stays inline and the full payload is handed to the spillover above, which can still save it under a different artifact directory.