-
Notifications
You must be signed in to change notification settings - Fork 25
further mcp integration #398 #438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR further integrates the MCP Server by adding a new tool to list validation parameters, extending the validation call pipeline to accept custom parameters, enhancing request building and resource serialization, updating documentation and endpoints, bumping project versions, and adding completion logging. Sequence diagram for validation with custom parameters in MCP integrationsequenceDiagram
participant Client
participant MCPMatchboxBridge
participant RequestBuilder
participant RestfulServer
participant MockHttpServletResponse
Client->>MCPMatchboxBridge: Call getValidationResult with contextMap
MCPMatchboxBridge->>MCPMatchboxBridge: Parse validationparams from contextMap
MCPMatchboxBridge->>RequestBuilder: Build request with custom query params
RequestBuilder->>RestfulServer: handleRequest()
RestfulServer->>MockHttpServletResponse: Write response
MCPMatchboxBridge->>Client: Return validation result
Class diagram for new and updated MCP integration classesclassDiagram
class McpMatchboxBridge {
+generateTools()
+getExtraValidationParameters(contextMap, interaction)
+getValidationResult(contextMap, interaction)
}
class ToolFactory {
+listValidationParameters()
+listFhirProfilesToValidateFor()
}
class RequestBuilder {
+buildRequest()
}
class CrossVersionResourceUtils {
+serializeR5(Resource, MatchboxFhirFormat, Writer)
+serializeR5(IBase, MatchboxFhirFormat, Writer)
}
McpMatchboxBridge --> ToolFactory : uses
McpMatchboxBridge --> RequestBuilder : uses
McpMatchboxBridge --> CrossVersionResourceUtils : uses
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Consider refactoring the duplicated FHIR request/response handling in getExtraValidationParameters and existing call handlers into a shared helper to reduce boilerplate.
- The manual JSON array construction in getExtraValidationParameters appends a trailing comma before the closing bracket, leading to invalid JSON—either trim the last comma or use a JSON builder.
- Parsing validationparams as a comma-separated string is brittle—consider accepting and validating a structured JSON object for more reliable parameter handling.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider refactoring the duplicated FHIR request/response handling in getExtraValidationParameters and existing call handlers into a shared helper to reduce boilerplate.
- The manual JSON array construction in getExtraValidationParameters appends a trailing comma before the closing bracket, leading to invalid JSON—either trim the last comma or use a JSON builder.
- Parsing validationparams as a comma-separated string is brittle—consider accepting and validating a structured JSON object for more reliable parameter handling.
## Individual Comments
### Comment 1
<location> `docs/validation-with-ai-tutorial.md:90` </location>
<code_context>
```
-The MCP-Server can be reached at the endpoint `http://<<your-url>>/matchbox/mcp/sse`
+The MCP-Server can be reached at the endpoint `http://<<your-url>>/matchbox(v3)/mcp/message`
### Setting up matchbox for Claude Desktop
</code_context>
<issue_to_address>
**suggestion:** Inconsistent use of parentheses in endpoint URL.
Ensure the endpoint format is consistent across all documentation references.
Suggested implementation:
```
The MCP-Server can be reached at the endpoint `http://<<your-url>>/matchbox/v3/mcp/message`
```
Review the rest of the documentation for any other references to the endpoint and update them to use `/matchbox/v3/mcp/message` (without parentheses) for consistency.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| ``` | ||
| The MCP-Server can be reached at the endpoint `http://<<your-url>>/matchbox/mcp/sse` | ||
| The MCP-Server can be reached at the endpoint `http://<<your-url>>/matchbox(v3)/mcp/message` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Inconsistent use of parentheses in endpoint URL.
Ensure the endpoint format is consistent across all documentation references.
Suggested implementation:
The MCP-Server can be reached at the endpoint `http://<<your-url>>/matchbox/v3/mcp/message`
Review the rest of the documentation for any other references to the endpoint and update them to use /matchbox/v3/mcp/message (without parentheses) for consistency.
Summary by Sourcery
Enhance MCP Server integration by adding support for listing and passing extra validation parameters, updating request handling and serialization utilities, logging validation completion, and refreshing documentation and versioning to 4.0.14.
New Features:
Enhancements:
Build:
Documentation: