Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ For complete documentation, see [Use DX MCP Tools for LWC](https://developer.sal
- `create_lightning_type` (GA) - Provides guidance for creating Custom Lightning Types (CLT) for Salesforce applications, agent actions, Lightning web components, and Lightning Platform integrations.
- `explore_slds_blueprints` (NON-GA) - Retrieves SLDS blueprint specifications by name, category, Lightning component, CSS class, or styling hook.
- `guide_design_general` (GA) - Provides SLDS guidelines and best practices for Lightning Web Components with accessibility, responsive design, and component usage patterns.
- `guide_lwc_accessibility` (GA) - Provides accessibility guidelines and testing instructions for LWC components.
- `guide_component_accessibility` (GA) - Provides accessibility guidelines and testing instructions for LWC components.
- `guide_lwc_best_practices` (GA) - Offers LWC development best practices and coding standards guidance.
- `guide_lwc_development` (GA) - Provides LWC development workflow and implementation guidelines.
- `guide_lwc_rtl_support` (GA) - Provides Right-to-Left (RTL) internationalization support and RTL development guidance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ async function getMcpClient(opts: { args: string[] }) {
return client;
}

const TOOL_RENAMES: Record<string, string> = {
'guide_lwc_accessibility': 'guide_component_accessibility',
};

async function getExpectedArgsAndTools(): Promise<{ args: string[]; tools: string[] }> {
try {
const result = await execAsync('gh api repos/forcedotcom/cline-fork/contents/src/shared/mcp/a4dServerArgs.json | jq -r .content | base64 --decode');
Expand All @@ -55,7 +59,7 @@ async function getExpectedArgsAndTools(): Promise<{ args: string[]; tools: strin

return {
args: mcpRepoConfig.args ?? [],
tools: mcpRepoConfig.tools ?? []
tools: (mcpRepoConfig.tools ?? []).map(t => TOOL_RENAMES[t] ?? t)
};
} catch (error) {
throw new Error(`Failed to fetch a4dServerArgs.json via gh command: ${String(error)}`);
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@salesforce/mcp-provider-api": "0.6.0",
"@salesforce/mcp-provider-dx-core": "0.9.5",
"@salesforce/mcp-provider-code-analyzer": "0.7.1",
"@salesforce/mcp-provider-lwc-experts": "0.6.10",
"@salesforce/mcp-provider-lwc-experts": "0.7.0",
"@salesforce/mcp-provider-aura-experts": "0.3.7",
"@salesforce/mcp-provider-mobile-web": "0.2.2",
"@salesforce/mcp-provider-devops": "0.3.4",
Expand Down
10 changes: 10 additions & 0 deletions packages/mcp/src/utils/registry-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ export async function registerToolsets(
tools[tools.indexOf('create_lwc_component')] = 'create_lwc_component_from_prd';
}

// This is a temporary fix to handle a tool rename. Tool alias support is coming soon.
// If the invalid tools list includes the *old* guide_lwc_accessibility tool name
if(invalidTools.includes('guide_lwc_accessibility')) {
ux.stderr('Tool "guide_lwc_accessibility" has been renamed to "guide_component_accessibility". Update config to remove this warning.')
// Remove that entry from invalidTools
invalidTools.splice(invalidTools.indexOf('guide_lwc_accessibility'), 1);
// Then rename the old tool with guide_component_accessibility in the tools array
tools[tools.indexOf('guide_lwc_accessibility')] = 'guide_component_accessibility';
}

if (invalidTools.length > 0) throw new Error(`Invalid tool names provided to --tools: "${invalidTools.join('", "')}"
Valid tools include:
- ${Array.from(existingToolNames).join(`${EOL}- `)}`);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3408,10 +3408,10 @@
open "^10.1.2"
zod "^3.25.76"

"@salesforce/mcp-provider-lwc-experts@0.6.10":
version "0.6.10"
resolved "https://registry.yarnpkg.com/@salesforce/mcp-provider-lwc-experts/-/mcp-provider-lwc-experts-0.6.10.tgz#32ba2bb1ab4c0ed6fc0b065669fd38b3374e78c1"
integrity sha512-b0NJ/MaVoBV3C02tuXSohE6oUK9XMgQZScvCGQr1uE2A/atkAkV0TDocf3la/5nFpZIYdsOjIiOH3ycPSBgCbA==
"@salesforce/mcp-provider-lwc-experts@0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@salesforce/mcp-provider-lwc-experts/-/mcp-provider-lwc-experts-0.7.0.tgz#fa99de22c37a78fc30194139147dd87dc05fc766"
integrity sha512-5ykVqLrV9q/UPo28VwqXgwGcJg3ps7Gl9jyD7/94AtYdq/ih9uh4PGZZlk7wy27krfhcCHvbhz/hwtQrkJJfyA==
dependencies:
"@modelcontextprotocol/sdk" "^1.9.0"
"@salesforce/core" "^8.19.0"
Expand Down
Loading