lizhimins opened a new pull request, #4308: URL: https://github.com/apache/rocketmq-dashboard/pull/4308
Closes #4307 The instance identifier becomes an explicit required parameter instead of an ambient target: the MCP header is `x-rmq-instance-id`, `ToolExecutionContext` and `McpAuthentication` expose `instanceId()`, the executor requires `instanceId` in the tool arguments and cross-checks it against the authenticated target, and the eleven platform-level tools skip both checks. Tool discovery keeps returning an empty list for a blank target so the console can still list the global tools. This is the tool-layer half of the instance model in `docs/studio-instance-model-spec.md`: `instanceId` is declared in each instance-scoped tool's schema rather than being implied by the connection, so a client reading the catalog can see the requirement, and a mismatch between the argument and the authenticated target becomes a 4xx instead of silently operating on a different instance. The exemption is validated by `ToolCatalog` rather than left to convention, so adding a platform-level tool without declaring it fails the catalog test. 31 files, +550/−243. Server side covers the executor, `ToolExecutionContext`, `McpAuthentication`, the header plumbing and their tests; the web side (`web/src/api/ai.ts`, `web/src/pages/ai/index.tsx` and tests) passes `instanceId` through `executeTool`. `StudioApplicationTest` keeps asserting that `listTools(null)` returns an empty list, which is what preserves the console's global tool scope. -- 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]
