tinyhumansai/openhuman · error

generated tool `{}` requires adapter `{}` but got `{}`

Error message

generated tool `{}` requires adapter `{}` but got `{}`

What it means

GeneratedTool::new rejects the pair (definition, adapter) when the adapter's id does not equal definition.adapter_id. The adapter is what executes the generated tool, so a mismatch would mean the tool advertises behavior its executor cannot provide; the definition is rejected at registration rather than failing at call time.

Source

Thrown at src/openhuman/tools/generated.rs:175

        mut definition: GeneratedToolDefinition,
        adapter: Arc<dyn GeneratedToolAdapter>,
    ) -> anyhow::Result<Self> {
        normalize_definition(&mut definition);
        if let Err(err) = validate_definition(&definition) {
            log::debug!(
                "[generated_tools] definition validation failed tool_name={} error={err}",
                definition.name
            );
            return Err(err);
        }
        if adapter.id() != definition.adapter_id {
            log::debug!(
                "[generated_tools] adapter mismatch tool_name={} required_adapter={} actual_adapter={}",
                definition.name,
                definition.adapter_id,
                adapter.id()
            );
            anyhow::bail!(
                "generated tool `{}` requires adapter `{}` but got `{}`",
                definition.name,
                definition.adapter_id,
                adapter.id()
            );
        }
        Ok(Self {
            definition,
            adapter,
        })
    }

    /// Borrow the normalized generated tool definition.
    pub fn definition(&self) -> &GeneratedToolDefinition {
        &self.definition
    }
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Register the tool with the adapter whose id matches definition.adapter_id.
  2. Fix the adapter_id in the generated definition to name the adapter actually being used.
  3. Check the capability/adapter resolution step that produced the pair.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/generated.rs:175 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/8b7a57924e183a81. Report an issue: GitHub.