Fix contributed tool compatibility - #8
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 183e9776c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var pluginPath = Path.of(normalizedPlugin).toRealPath(); | ||
| var providerPath = Path.of(normalizedProvider).toRealPath(); |
There was a problem hiding this comment.
Offload real-path resolution from the reactive request thread
When a contributed provider's URI is nested rather than exactly equal, toRealPath() performs synchronous filesystem I/O for both paths. The WebFlux tools/list and tools/call flows reach this predicate without a scheduler boundary, and registeredTools() deliberately repeats discovery for every request, so a slow or network-backed plugin filesystem can block the event-loop thread and stall unrelated MCP requests. Resolve these paths ahead of request handling or offload the operation to a bounded-elastic scheduler.
AGENTS.md reference: AGENTS.md:L26-L30
Useful? React with 👍 / 👎.
| if (textContent == null && result.structuredContent() != null) { | ||
| textContent = JsonMapper.shared().writeValueAsString(result.structuredContent()); |
There was a problem hiding this comment.
Require text in the current result contract instead of falling back
When a provider omits textContent, this branch silently preserves that incomplete result shape by synthesizing text at the transport boundary. The repository is unreleased and explicitly prohibits compatibility and fallback branches, so the current McpToolResult contract and its providers should instead be changed directly to construct or require the desired text representation; otherwise the obsolete one-argument result form remains supported indefinitely.
AGENTS.md reference: AGENTS.md:L32-L32
Useful? React with 👍 / 👎.
What
Reproduction
Validation
./gradlew check --no-daemon.plugin-docsme/list-projectsthrough the MCP endpoint and confirmed that JSON text and structured content both contain the same four projects.