Skip to main content

substitute_params

Function substitute_params 

Source
pub fn substitute_params(
    tool_key: &str,
    run: &[String],
    args: &Value,
) -> AgentResult<Vec<String>>
Expand description

${param} substitution per element (argv, no shell).

  • Only the ${name} form is recognized; bare text such as $FOO or anything outside the ${…} form is left untouched (${ENV:…} has already been resolved to a literal at product-layer registration, so none should remain by this point);
  • Parameter values are inserted verbatim, no re-expansion;
  • Missing, non-scalar (null/array/object), or unclosed ${ → AgentError::ToolArgsInvalid (fail-closed, tool error for that call).