Skip to content

Latest commit

 

History

History
86 lines (53 loc) · 4.81 KB

File metadata and controls

86 lines (53 loc) · 4.81 KB

Preferences Content

This document describes the system preferences UI provided by AgentTools for managing deployed Wolfram toolsets across MCP clients.

Overview

CreatePreferencesContent[] builds the panel content shown in the system preferences dialog for AgentTools. It lists every supported MCP client and provides controls to install or uninstall a Wolfram toolset on each one. The panel reads from and writes to the same managed deployment store as DeployAgentTools, so changes made through the UI are reflected by DeployedAgentTools[] and vice versa.

The panel exposes two toolsets to the user:

UI Label Underlying Server Description
Computation Tools Wolfram Tools for general computation and knowledge
Development Tools WolframLanguage Tools for Wolfram Language development

Selecting a toolset for a client calls DeployAgentTools[client, server, OverwriteTarget -> True]. Selecting "No toolset" removes any existing global deployment (Wolfram or WolframLanguage) for that client.

Note: The UI label/server name mapping is currently hard-coded in clientControls. See the comment block in Kernel/PreferencesContent.wl near clientControls for context. Once the predefined server names are aligned with the UX, the mapping should be removed.

Usage

CreatePreferencesContent[]

Returns a Deploy[Pane[...]] expression suitable for embedding in a preferences panel.

Panel Sections

Header

A subtitle describing the purpose of the panel and a "Documentation" link button. Holding the option/alt key when clicking the button opens a notebook showing DeployedAgentTools[] instead of opening the documentation URL.

Toolset Descriptions

Two short headings describing the Computation Tools and Development Tools toolsets.

Client List

The main body of the panel is generated by the internal clientInterfaces function. It groups supported clients into two categories:

  • Configured: clients that already have a deployed Wolfram or WolframLanguage global toolset
  • More: clients that are supported but have no current deployment

Each client row contains:

  • The client name, hyperlinked to the client's website
  • A PopupMenu to pick "Computation Tools", "Development Tools", or "No toolset"
  • An info icon that, when hovered, shows the on-disk install location for the deployed toolset
  • A per-directory settings list (when applicable) showing project-level deployments

Per-Directory Settings

When a client has project-level deployments (e.g., from DeployAgentTools[{"ClaudeCode", "/path/to/project"}, ...]), each path is listed under "Settings for specific directories:" along with the toolset that was deployed there. Clicking a path opens its directory in the OS file browser.

The optional file-scoped flag $allowDirectoryOperations (default False in Kernel/PreferencesContent.wl) controls whether per-directory rows include an "x" button for uninstalling that specific deployment. When the flag is enabled, removed rows remain visible but are rendered with strikethrough styling so the user can see what was uninstalled during the current session.

Front End Resources

Strings and graphics used by the panel are loaded from FrontEnd/Assets/AgentTools.wl via FEPrivateFrontEndResource`:

  • "AgentToolsStrings"LanguageSwitched translations for every label and tooltip in the panel (English plus Chinese Simplified, Chinese Traditional, French, Japanese, Korean, and Spanish)
  • "AgentToolsExpressions"GraphicsBox definitions for the down-pointer, remove ("x"), and info icons

These resources are made available to the front end through the paclet's "FrontEnd" extension declared in PacletInfo.wl:

{ "FrontEnd",
    "Root" -> "FrontEnd"
}

To add new strings or icons, edit FrontEnd/Assets/AgentTools.wl and reference them from Kernel/PreferencesContent.wl using the local helpers tr["id"] (strings) or icon["id", ...] (graphics).

Related Files

  • Kernel/PreferencesContent.wl — Implementation of CreatePreferencesContent and its helpers (clientInterfaces, clientRow, clientControls, dirSettingsRow, infoLink, docsLink)
  • FrontEnd/Assets/AgentTools.wl — Localized strings and graphics resources
  • Kernel/DeployAgentTools.wl — Deployment system used by the panel (see deploy-agent-tools.md)
  • Kernel/SupportedClients.wl — Source of $SupportedMCPClients data shown for each client row

Related Documentation