Add show_dsc_schema() MCP function#1553
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new show_dsc_schema MCP tool that mirrors the existing dsc schema CLI command, expanding SchemaType to cover several previously-missing schemas and bumping the rmcp dependency so that schema results can be returned via the updated schemars::Schema API.
Changes:
- New
show_dsc_schemaMCP tool, registered inmcp/mod.rsandmcp_server.rs, with a corresponding integration test. SchemaTypegainsAdaptedDscResourceManifest,ConfigurationExportResult,ResourceGetResult,ResourceSetResult,ResourceTestResult(plusDeserialize/JsonSchemaderives), with matching arms inutil::get_schema.- Bumps
rmcpfrom 1.5.0 to 1.7.0 and adjustsshow_dsc_resourceto declare an explicit nullable-object schema for itsOption<Value>field.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dsc/src/mcp/show_dsc_schema.rs | New MCP tool exposing get_schema via ShowSchemaRequest/ShowSchemaResponse. |
| dsc/src/mcp/mod.rs | Declares the new show_dsc_schema module. |
| dsc/src/mcp/mcp_server.rs | Adds the new tool's router to the combined ToolRouter. |
| dsc/src/mcp/show_dsc_resource.rs | Adds explicit nullable_json_object_schema for the schema: Option<Value> field (needed for rmcp 1.7). |
| dsc/src/args.rs | Adds new SchemaType variants and derives Deserialize + JsonSchema. |
| dsc/src/util.rs | Maps the new SchemaType variants to schema_for! calls. |
| dsc/tests/dsc_mcp.tests.ps1 | Registers show_dsc_schema in the tool inventory test and adds a smoke test. |
| Cargo.toml / Cargo.lock | Bumps rmcp to 1.7.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
show_dsc_schematool that is equivalent todsc schemacommandrcmpcrate