X-LightYear opened a new issue, #5037:
URL: https://github.com/apache/rocketmq-dashboard/issues/5037

   ## Problem
   
   RocketMQ Studio already exposes live consumer client thread-stack 
diagnostics through the REST endpoint 
`/api/groups/{group}/instances/{clientId}/stack`. The existing UI uses this 
capability to help operators investigate blocked or stalled consumers.
   
   The MCP tool catalog has no equivalent operation. An agent can inspect group 
metadata and client identities through `rmq.group.detail`, but cannot request 
the live stack for a selected online client, so an operator must leave the 
agent workflow and use the REST/UI path manually.
   
   ## Existing capability
   
   The production path is already implemented and tested:
   
   `ConsumerDiagnosticsService.getConsumerStack` → 
`ConsumerDiagnosticsProvider` → Apache provider, which prefers proxy client 
diagnostics and falls back to the selected instance's broker admin client. The 
provider parses the bounded `ConsumerRunningInfo` jstack into structured thread 
rows and reports offline/admin failures explicitly.
   
   ## Proposed scope
   
   Add a read-only instance-scoped MCP tool for the existing capability. It 
should accept `instanceId`, `groupName`, and `clientId`, reuse 
`ConsumerDiagnosticsService`, require the existing consumer-group-management 
and REMOTING capabilities, and use the existing `group:read` permission.
   
   Cloud-only instances should not discover the tool because they do not expose 
the RocketMQ remoting consumer-stack path. No new provider behavior or 
duplicate diagnostics logic is required.
   
   ## Expected value
   
   An MCP planner can inspect a group's online clients and then retrieve a 
selected client's live thread stacks in the same diagnostic workflow, which is 
useful for identifying blocked listener threads, wait states, and client-side 
stalls.
   
   ## Validation plan
   
   Add deterministic handler tests, catalog/schema coverage, discovery 
capability coverage, and run the relevant consumer diagnostics/provider/MCP 
tests plus checkstyle and package verification.
   
   Related backend diagnostic work in open PR #4970 is broader hang analysis; 
this proposal is only the missing MCP integration for the already-existing 
stack endpoint.


-- 
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]

Reply via email to