zeroclaw-labs/zeroclaw · error
{tool_name} tool is enabled but no allowed_domains are confi
Error message
{tool_name} tool is enabled but no allowed_domains are configured. Add [{tool_name}].allowed_domains in config.toml What it means
Error "{tool_name} tool is enabled but no allowed_domains are configured. Add [{tool_name}].allowed_domains in config.toml" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/web_fetch.rs:718
tool_name: &str,
validate_dns: impl FnOnce(&str, bool) -> anyhow::Result<()>,
) -> anyhow::Result<String> {
let url = raw_url.trim();
if url.is_empty() {
anyhow::bail!("URL cannot be empty");
}
if url.chars().any(char::is_whitespace) {
anyhow::bail!("URL cannot contain whitespace");
}
if !url.starts_with("http://") && !url.starts_with("https://") {
anyhow::bail!("Only http:// and https:// URLs are allowed");
}
if allowed_domains.is_empty() {
anyhow::bail!(
"{tool_name} tool is enabled but no allowed_domains are configured. \
Add [{tool_name}].allowed_domains in config.toml"
);
}
let host = extract_host(url)?;
// blocked_domains always takes precedence
if domain_guard::host_matches_allowlist(&host, blocked_domains) {
anyhow::bail!("Host '{host}' is in {tool_name}.blocked_domains");
}
let host_is_private_or_local = domain_guard::is_private_or_local_host(&host);
let private_match = private_allowlist_match(&host, allowed_private_hosts);
// An explicit entry (a specific host/IP or suffix) is a deliberate per-host
// carve-out; the "*" wildcard blanket-tolerates a private/internal
// resolution for any host. The distinction only affects the WARN below.
let private_explicit = matches!(private_match, PrivateAllow::Explicit);View on GitHub (pinned to 88bb9c8533)
Solutions
- Add [<tool_name>].allowed_domains in config.toml listing permitted hosts.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/web_fetch.rs:718 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/06407d0b1f7e195b.
Report an issue: GitHub.