AIP Agent Function Tool Schema Validation Issue

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:

  1. How are Function tool input schemas generated from TypeScript interfaces in AIP Agents?
  2. Are optional TypeScript fields (field?: type) properly handled in generated schemas?
  3. How do Foundry types (Double, Integer) map in tool schemas vs direct function calls?
  4. Is there a way to inspect or debug the generated tool schema?
  5. 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.