Zhuoxi2000 opened a new issue, #1015: URL: https://github.com/apache/flink-agents/issues/1015
### Search before asking - [x] I searched in the [issues](https://github.com/apache/flink-agents/issues) and found nothing similar. ### Description Description `SchemaUtils.getParamSchema` maps Java parameter types to JSON Schema with a small if/else chain. It currently handles `String`, `int`/`Integer`, `double`/`Double`, and `boolean`/`Boolean`; everything else falls back to `"object"`. As a result, common numeric types such as `long`, `Long`, `float`, `Float`, `short`, and `byte` are advertised to the model as objects. For example, a tool like `getOrder(long orderId)` generates `"type": "object"` for `orderId`. This can cause models to produce the wrong argument shape or avoid the tool call entirely, while the failure looks like a model/tool-calling issue rather than a schema-generation bug. Expected: * `long` / `Long` / `short` / `Short` / `byte` / `Byte` → `"integer"` * `float` / `Float` → `"number"` Suggested fix: extend the existing numeric mappings in `getParamSchema` and add `SchemaUtilsTest` coverage for these types. Arrays, collections, and POJOs can continue falling back to `"object"` for now. ### How to reproduce 1. Define a tool with a numeric type that is not currently recognized: @Tool(description = "Fetch an order") public static String getOrder(@ToolParam(name = "orderId") long orderId) { ... } 2. Call `SchemaUtils.generateSchema(method, null)`, or inspect the schema sent by any chat model connector. 3. The generated schema contains: "orderId": {"type": "object"} Expected: ``` "orderId": {"type": "integer"} ``` ### Version and environment Current main (3070ee2). Pure schema-generation issue in `plan`'s SchemaUtils; affects every chat-model integration that forwards the generated tool schema. ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
