You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(tools): Add valueFromParam support to Tool config (#2333)
This PR introduces a new configuration field valueFromParam to the tool
definitions. This feature allows a parameter to automatically inherit
its value from another sibling parameter, mainly to streamline the
configuration of vector insertion tools.
Parameters utilizing valueFromParam are excluded from the Tool and MCP
manifests. This means the LLM does not see these parameters and is not
required to generate them. The value is resolved internally by the
Toolbox during execution.
returnfmt.Errorf("tool %q config error: parameter %q (index %d) references '%q' in the 'valueFromParam' field, which is not a defined parameter", name, pName, i, refName)
326
+
}
327
+
328
+
// Check for self-reference
329
+
ifrefName==pName {
330
+
returnfmt.Errorf("tool %q config error: parameter %q cannot copy value from itself", name, pName)
331
+
}
332
+
}
333
+
}
334
+
}
335
+
}
299
336
yamlDecoder, err:=util.NewStrictDecoder(v)
300
337
iferr!=nil {
301
338
returnfmt.Errorf("error creating YAML decoder for tool %q: %w", name, err)
0 commit comments