Skip to content

Add show_dsc_schema() MCP function#1553

Merged
SteveL-MSFT merged 2 commits into
PowerShell:mainfrom
SteveL-MSFT:mcp-schema
May 31, 2026
Merged

Add show_dsc_schema() MCP function#1553
SteveL-MSFT merged 2 commits into
PowerShell:mainfrom
SteveL-MSFT:mcp-schema

Conversation

@SteveL-MSFT
Copy link
Copy Markdown
Member

PR Summary

  • Add new show_dsc_schema tool that is equivalent to dsc schema command
  • Added some missing schemas to list that can be returned
  • Fixed how schemas are returned due to change in rcmp crate

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_schema MCP tool, registered in mcp/mod.rs and mcp_server.rs, with a corresponding integration test.
  • SchemaType gains AdaptedDscResourceManifest, ConfigurationExportResult, ResourceGetResult, ResourceSetResult, ResourceTestResult (plus Deserialize/JsonSchema derives), with matching arms in util::get_schema.
  • Bumps rmcp from 1.5.0 to 1.7.0 and adjusts show_dsc_resource to declare an explicit nullable-object schema for its Option<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.

Comment thread dsc/src/mcp/show_dsc_schema.rs Outdated
Comment thread dsc/tests/dsc_mcp.tests.ps1
@SteveL-MSFT SteveL-MSFT merged commit 6c162ed into PowerShell:main May 31, 2026
19 checks passed
@SteveL-MSFT SteveL-MSFT deleted the mcp-schema branch May 31, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants