[BUG] JsonSchemaUtil never emits required array — all MCP tool parameters advertised as optional
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
## Description
`executeToolCall` subscribes fire-and-forget (`chain.execute(decoratedExchange).subscribe(...)` at line 266) then blocks on `responseFuture.get(DEFAULT_TIMEOUT_SECONDS, …)`. On `TimeoutException` it throws, but the `Disposable` returned by `subscribe()` is never captured/cancelled, and `doFinally` does not cancel the chain. The downstream request keeps running after the tool call has already returned an error to the MCP client.
## Location
- `shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/callback/ShenyuToolCallback.java:266-283`
## Impact
Timed-out tool calls leak downstream work/connections and may produce side effects (e.g. upstream API calls) after the client has received an error.
## Suggested fix
Capture the `Disposable`, and on `TimeoutException` call `disposable.dispose()` before throwing.
## Related existing
None — distinct from MCP-01..05 (#6640-#6644, response decorator) and MCP-11 (notifications).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.