Skip to content

Per-client default toolset for Automatic resolution#176

Merged
rhennigan merged 9 commits into
mainfrom
feature/default-toolset
May 6, 2026
Merged

Per-client default toolset for Automatic resolution#176
rhennigan merged 9 commits into
mainfrom
feature/default-toolset

Conversation

@rhennigan
Copy link
Copy Markdown
Member

Summary

  • Add a DefaultToolset field to each entry in $supportedMCPClients so different clients can advertise different default toolsets.
  • Introduce defaultToolsetForTarget to look up that field for a client name, alias, {name, dir} pair, or file target — falling back to $defaultMCPServer for unknown inputs.
  • Route InstallMCPServer[target, Automatic] and DeployAgentTools[target, Automatic] through the helper so coding-focused clients (Claude Code, Cursor, Codex, Copilot CLI, Augment, Antigravity, Kiro, OpenCode, VS Code, Windsurf, Amazon Q, Cline, Zed) default to "WolframLanguage", while desktop clients (Claude Desktop, Goose) keep "Wolfram".
  • Add appname to the cspell dictionary (matches existing appname_test.json test fixture filenames).
  • Ignore local .mcp.json Claude Code project config.

Test plan

  • TestReport on Tests/InstallMCPServer.wlt — covers defaultToolsetForTarget for canonical names, aliases, {name, dir} pairs, file targets, and unknown inputs, plus end-to-end InstallMCPServer[..., Automatic] and the 1-arg form.
  • TestReport on Tests/DeployAgentTools.wlt — covers DeployAgentTools[..., Automatic] and the 1-arg form for ClaudeCode.
  • Spot-check InstallMCPServer[{"ClaudeCode", dir}] produces a WolframLanguage server, and InstallMCPServer[{"ClaudeDesktop", dir}] still produces Wolfram.

🤖 Generated with Claude Code

rhennigan and others added 3 commits May 5, 2026 19:11
Each entry in `$supportedMCPClients` now carries a `DefaultToolset` key, and
`InstallMCPServer`/`DeployAgentTools` route the `Automatic` server through a
new `defaultToolsetForTarget` helper. CLI/IDE clients default to
"WolframLanguage" while desktop clients (Claude Desktop, Goose) keep "Wolfram".
Aliases, `{name, dir}` pairs, file targets, and unknown clients fall back to
`$defaultMCPServer`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Used in existing `appname_test.json` test fixture filenames in
`Tests/DeployAgentTools.wlt`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Project-scoped MCP server config is per-developer and shouldn't be tracked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 23:13
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

This PR introduces per-client default MCP toolset selection so Automatic no longer always means the same server for every client. It updates the supported-client metadata and threads that metadata into InstallMCPServer and DeployAgentTools, with new tests for the new resolution path.

Changes:

  • Add DefaultToolset metadata to supported MCP clients and expose a shared defaultToolsetForTarget helper.
  • Route InstallMCPServer[..., Automatic] and DeployAgentTools[..., Automatic] through that helper.
  • Add focused tests for Automatic resolution plus minor repo housekeeping updates (.gitignore, cspell).

Reviewed changes

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

Show a summary per file
File Description
Tests/InstallMCPServer.wlt Adds tests for defaultToolsetForTarget and Automatic install resolution.
Tests/DeployAgentTools.wlt Adds tests for Automatic deploy resolution.
Kernel/SupportedClients.wl Adds per-client DefaultToolset metadata and the lookup helper.
Kernel/InstallMCPServer.wl Changes Automatic install resolution to use per-client defaults.
Kernel/DeployAgentTools.wl Changes Automatic deploy resolution to use per-client defaults.
Kernel/CommonSymbols.wl Exports the shared helper symbol in the common context.
.gitignore Ignores local .mcp.json files.
.cspell.json Adds appname to the spelling dictionary.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Kernel/InstallMCPServer.wl Outdated
Comment thread Kernel/DeployAgentTools.wl Outdated
Comment thread Kernel/DeployAgentTools.wl Outdated
Comment thread Tests/InstallMCPServer.wlt
Comment thread Tests/DeployAgentTools.wlt
rhennigan and others added 2 commits May 5, 2026 19:23
Updates user-facing docs to reflect the behavior introduced in
ff07e83: `InstallMCPServer`/`DeployAgentTools` resolve `Automatic` to
the target client's `DefaultToolset` (`"WolframLanguage"` for coding
clients, `"Wolfram"` for chat clients) rather than always falling
back to `"Wolfram"`.

- `docs/mcp-clients.md`: add a **Default Toolset** column to the
  supported-clients table, document the `"DefaultToolset"` field in
  the new-client field reference and example entry.
- `docs/servers.md`: clarify that `"Wolfram"` is the default only for
  chat clients (`ClaudeDesktop`, `Goose`).
- `docs/deploy-agent-tools.md`: correct the `server` argument
  description that previously claimed `Automatic` always resolves to
  `"Wolfram"`.
- `README.md`: note per-client defaults after the Quick Start install
  example.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When `InstallMCPServer`/`DeployAgentTools` is called with an `Automatic`
server and a `File[...]` target whose path doesn't reveal the client,
the explicit `"ApplicationName"` option now drives the default toolset
choice. Previously the path-based guess fell through to `"Wolfram"`
even when the caller had named a client whose `DefaultToolset` is
`"WolframLanguage"` (e.g. Cline at a custom location).

Adds a 2-arg `defaultToolsetForTarget[target, appName]` form so an
explicit application name overrides target-based resolution, and routes
both call sites through it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 23:32
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread docs/deploy-agent-tools.md Outdated
Comment thread Tests/InstallMCPServer.wlt
Comment thread Tests/DeployAgentTools.wlt
Comment thread Tests/InstallMCPServer.wlt
rhennigan and others added 2 commits May 6, 2026 08:20
Reflects that the per-client default only applies when the path or
content identifies a known client (or `"ApplicationName"` is supplied);
other `File[...]` targets fall back to `"Wolfram"`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds positive tests for path-based client detection in
`defaultToolsetForTarget`, `InstallMCPServer`, and `DeployAgentTools`
(`.mcp.json`, `.vscode/mcp.json`, `opencode.json`) and a suite-level
assertion that every `\$SupportedMCPClients` entry has a string
`DefaultToolset` resolving to a real predefined server.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Comment thread docs/mcp-clients.md Outdated
rhennigan and others added 2 commits May 6, 2026 09:36
The `SupportedMCPClients-DefaultToolset-Coverage` test enforces that every
entry in `$supportedMCPClients` defines a valid string `"DefaultToolset"`,
so the contributor-facing table should reflect that invariant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 13:41
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

Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.

@rhennigan rhennigan merged commit 0333a04 into main May 6, 2026
5 of 6 checks passed
@rhennigan rhennigan deleted the feature/default-toolset branch May 6, 2026 14:19
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