Issue:
TypeScript function works perfectly in Live Preview but consistently fails with ServiceException: INVALID_ARGUMENT (AipTools:FunctionHasInvalidInputs) when called as a Function tool from an AIP Agent.
Technical Details:
- Function has complex interface with required fields (strings, arrays) and optional fields with
?operator - Uses Foundry-specific types (
Double,Integer) in interface - Identical payload succeeds in Live Preview, fails in Agent tool context
- Error occurs before function code executes (schema validation layer)
Tested Variations:
- All required fields present and valid
- Optional fields included as empty strings vs omitted
- Made all interface fields required (removed
?) - Simplified payloads to minimal valid cases
- All variations fail with same error
Questions:
- How are Function tool input schemas generated from TypeScript interfaces in AIP Agents?
- Are optional TypeScript fields (
field?: type) properly handled in generated schemas? - How do Foundry types (
Double,Integer) map in tool schemas vs direct function calls? - Is there a way to inspect or debug the generated tool schema?
- Why would identical payloads pass function validation but fail tool schema validation?
Request:
Guidance on Function tool schema generation and compatibility with TypeScript interfaces containing optional fields and Foundry-specific types.