embabel-agent icon indicating copy to clipboard operation
embabel-agent copied to clipboard

Input schema details are missing for tools defined with @LlmTool

Open stefanks-px opened this issue 10 months ago • 0 comments

The input schema generated by SimpleInputSchema.toJsonSchema() doesn't account for the structure of complex types.

For example:

@LlmTool
public String getInformation(WrappedType someType) {
    ...
}

class WrappedType {
    int internalId; 
}

results in the input schema

{
  "type" : "object",
  "properties" : {
	  "someType" : {
	      "type" : "object",
	      "description" : ""
	}
  },
  "required" : [ "someType" ]
}

Using @Tool from SpringAI, the input schema is generated correctly.

stefanks-px avatar Jan 26 '26 09:01 stefanks-px