Skip to content

Add invoke_dsc_function() and invoke_dsc_expression() tools to Server mode#1588

Open
SteveL-MSFT wants to merge 3 commits into
PowerShell:mainfrom
SteveL-MSFT:server-invoke-function
Open

Add invoke_dsc_function() and invoke_dsc_expression() tools to Server mode#1588
SteveL-MSFT wants to merge 3 commits into
PowerShell:mainfrom
SteveL-MSFT:server-invoke-function

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

PR Summary

  • Complete renaming of loc string tags to server instead of mcp
  • Add invoke_dsc_function() and invoke_dsc_expression() tools

rmcp crate doesn't allow direct use of serde_json::Value type, so need a wrapper enum to make it work.

PR Context

For you @ThomasNieto :)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends DSC “server” mode by adding two new JSON-RPC tools—invoke_dsc_expression and invoke_dsc_function—and updates server-mode localization keys to use the server.* namespace (instead of mcp.*).

Changes:

  • Added invoke_dsc_expression and invoke_dsc_function tool implementations and registered them with the server tool router.
  • Renamed server-mode i18n keys from mcp.* to server.* and updated call sites accordingly.
  • Expanded Pester coverage to validate the new tools via tools/call.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
dsc/tests/dsc_server.tests.ps1 Adds Pester coverage for invoke_dsc_expression / invoke_dsc_function and updates the expected tool list.
dsc/src/server/invoke_dsc_expression.rs Implements the new invoke_dsc_expression tool.
dsc/src/server/invoke_dsc_function.rs Implements the new invoke_dsc_function tool.
dsc/src/server/mcp_server.rs Registers the new tool routers and updates server instructions i18n key.
dsc/src/server/mod.rs Exposes the new server modules and updates i18n key usage.
dsc/src/server/invoke_dsc_config.rs Updates i18n keys from mcp.* to server.*.
dsc/src/server/invoke_dsc_resource.rs Updates i18n keys from mcp.* to server.*.
dsc/src/server/list_dsc_functions.rs Updates i18n keys from mcp.* to server.*.
dsc/src/server/list_dsc_resources.rs Updates i18n keys from mcp.* to server.*.
dsc/src/server/show_dsc_resource.rs Updates i18n keys from mcp.* to server.*.
dsc/locales/en-us.toml Moves server-mode strings under [server.*] and adds strings for the new tools.

Comment thread dsc/tests/dsc_server.tests.ps1 Outdated
Comment thread dsc/tests/dsc_server.tests.ps1 Outdated
Comment thread dsc/src/server/invoke_dsc_function.rs Outdated
Comment thread dsc/src/server/invoke_dsc_function.rs Outdated
Comment thread dsc/locales/en-us.toml Outdated
@SteveL-MSFT SteveL-MSFT force-pushed the server-invoke-function branch from 83a2352 to 21cfeb9 Compare June 19, 2026 23:34
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