windmill-labs/windmill · error

Tool module '{}': {}

Error message

Tool module '{}': {}

What it means

Same as the plain module traversal error but raised for tool modules nested inside a flow (e.g. inside tool items of a flow step). get_value() on the tool module failed, and the module id is prepended for diagnosis.

Source

Thrown at backend/windmill-types/src/flows.rs:745

                    Self::traverse_modules(&branch.modules, cb)?;
                }
                Self::traverse_modules(default, cb)?;
            }
            FlowModuleValue::BranchAll { branches, .. } => {
                for branch in branches {
                    Self::traverse_modules(&branch.modules, cb)?;
                }
            }
            FlowModuleValue::AIAgent { tools, .. } => {
                for tool in tools {
                    let Some(tool_module) = Option::<FlowModule>::from(tool) else {
                        continue;
                    };

                    cb(&tool_module)?;
                    let tool_value = tool_module
                        .get_value()
                        .map_err(|e| anyhow::anyhow!("Tool module '{}': {}", tool_module.id, e))?;
                    Self::traverse_module_value(&tool_value, cb)?;
                }
            }
            _ => {}
        }
        Ok(())
    }
}

#[derive(Deserialize)]
pub struct UntaggedInputTransform {
    #[serde(rename = "type")]
    pub type_: String,
    pub value: Option<Box<RawValue>>,
    pub expr: Option<String>,
}

impl<'de> Deserialize<'de> for InputTransform {

View on GitHub (pinned to e474e8803c)

Solutions

  1. Read the wrapped inner error and the tool module id
  2. Open that tool in the flow editor and fix its value
  3. Re-save/redeploy the flow to normalize the stored value
  4. Verify windmill version consistency between environments
Defensive patterns

Strategy: try-catch

Try / catch

match result {
    Err(e) if e.to_string().contains("Tool module") => {
        let id = e.to_string().split('\'').nth(1).unwrap_or("?");
        eprintln!("fix tool module {id}: {e:#}");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Traversing a flow whose value contains tools (e.g. an AI-agent style module) and one tool module's get_value() fails to resolve/parse.

Common situations: Corrupt or hand-edited tool definitions; tool payload schema drift across versions; imported flows referencing tools that fail validation.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/cc3fb242124d5d3a. Report an issue: GitHub.