- severity: High
- files:
shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/response/ShenyuMcpResponseDecorator.java:72-78
- description: In
writeWith, doOnNext appends each chunk to body and, if !future.isDone(), immediately completes responseFuture with applyResponseTemplate(this.body.toString()) — i.e. with only the first chunk accumulated so far. Subsequent chunks append to body but the future is already done.
- impact: Tool-call results are truncated to the first chunk for any response delivered in more than one DataBuffer.
- suggested_fix: Complete the future only in
setComplete() (or use collectList() then complete), not per-chunk.
- confidence: High
- related_existing: none
Identified during the 2026-08-02 deep re-scan; full list in docs/scan2-2026-08-02/00-consolidated-critical-high.md.
shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/response/ShenyuMcpResponseDecorator.java:72-78writeWith,doOnNextappends each chunk tobodyand, if!future.isDone(), immediately completesresponseFuturewithapplyResponseTemplate(this.body.toString())— i.e. with only the first chunk accumulated so far. Subsequent chunks append tobodybut the future is already done.setComplete()(or usecollectList()then complete), not per-chunk.Identified during the 2026-08-02 deep re-scan; full list in
docs/scan2-2026-08-02/00-consolidated-critical-high.md.