Skip to content

Commit bf35222

Browse files
authored
@W-21513849 Update MCP tool names and docs (#270)
1 parent 58e8617 commit bf35222

47 files changed

Lines changed: 257 additions & 265 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/mcp-tool-renames.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@salesforce/b2c-dx-mcp': minor
3+
'@salesforce/b2c-dx-docs': patch
4+
---
5+
6+
Rename MCP tools for clearer, action-oriented naming. scapi_custom_api_scaffold → scapi_custom_api_generate_scaffold. sfnext_map_tokens_to_theme → sfnext_match_tokens_to_theme.

docs/.vitepress/config.mts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,16 @@ const referenceSidebar = [
102102
items: [
103103
{text: 'cartridge_deploy', link: '/mcp/tools/cartridge-deploy'},
104104
{text: 'mrt_bundle_push', link: '/mcp/tools/mrt-bundle-push'},
105-
{text: 'pwakit_development_guidelines', link: '/mcp/tools/pwakit-development-guidelines'},
105+
{text: 'pwakit_get_guidelines', link: '/mcp/tools/pwakit-get-guidelines'},
106106
{text: 'scapi_schemas_list', link: '/mcp/tools/scapi-schemas-list'},
107-
{text: 'scapi_custom_api_scaffold', link: '/mcp/tools/scapi-custom-api-scaffold'},
108-
{text: 'scapi_custom_apis_status', link: '/mcp/tools/scapi-custom-apis-status'},
109-
{text: 'storefront_next_development_guidelines', link: '/mcp/tools/storefront-next-development-guidelines'},
110-
{text: 'storefront_next_figma_to_component_workflow', link: '/mcp/tools/storefront-next-figma-to-component-workflow'},
111-
{text: 'storefront_next_generate_component', link: '/mcp/tools/storefront-next-generate-component'},
112-
{text: 'storefront_next_map_tokens_to_theme', link: '/mcp/tools/storefront-next-map-tokens-to-theme'},
113-
{text: 'storefront_next_page_designer_decorator', link: '/mcp/tools/storefront-next-page-designer-decorator'},
114-
{text: 'storefront_next_site_theming', link: '/mcp/tools/storefront-next-site-theming'},
107+
{text: 'scapi_custom_api_generate_scaffold', link: '/mcp/tools/scapi-custom-api-generate-scaffold'},
108+
{text: 'scapi_custom_apis_get_status', link: '/mcp/tools/scapi-custom-apis-get-status'},
109+
{text: 'sfnext_get_guidelines', link: '/mcp/tools/sfnext-get-guidelines'},
110+
{text: 'sfnext_start_figma_workflow', link: '/mcp/tools/sfnext-start-figma-workflow'},
111+
{text: 'sfnext_analyze_component', link: '/mcp/tools/sfnext-analyze-component'},
112+
{text: 'sfnext_match_tokens_to_theme', link: '/mcp/tools/sfnext-match-tokens-to-theme'},
113+
{text: 'sfnext_add_page_designer_decorator', link: '/mcp/tools/sfnext-add-page-designer-decorator'},
114+
{text: 'sfnext_configure_theme', link: '/mcp/tools/sfnext-configure-theme'},
115115
],
116116
},
117117
];

docs/mcp/figma-tools-setup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Prerequisites and setup for Figma-to-component tools (workflow orch
44

55
# Figma-to-Component Tools Setup
66

7-
Prerequisites and setup for using the Figma workflow tools: `storefront_next_figma_to_component_workflow`, `storefront_next_generate_component`, and `storefront_next_map_tokens_to_theme`.
7+
Prerequisites and setup for using the Figma workflow tools: `sfnext_start_figma_workflow`, `sfnext_analyze_component`, and `sfnext_match_tokens_to_theme`.
88

99
> **Note:** 🚧 This MCP tool is for Storefront Next. Storefront Next is part of a closed pilot and isn't available for general use.
1010
@@ -15,7 +15,7 @@ The Figma-to-component workflow requires an **external Figma MCP server** to fet
1515
**Prerequisites:**
1616
- b2c-dx-mcp configured with `--allow-non-ga-tools` flag (Figma tools are preview)
1717
- Storefront Next project
18-
- `app.css` theme file (required for `storefront_next_map_tokens_to_theme` tool; optional path can be provided)
18+
- `app.css` theme file (required for `sfnext_match_tokens_to_theme` tool; optional path can be provided)
1919
- External Figma MCP server enabled in your MCP client
2020

2121
See [Installation](./installation) for b2c-dx-mcp setup.
@@ -49,8 +49,8 @@ If the Figma MCP server is not enabled, the workflow tool will still return inst
4949

5050
## Related Documentation
5151

52-
- [storefront_next_figma_to_component_workflow](./tools/storefront-next-figma-to-component-workflow) - Workflow orchestrator (call first)
53-
- [storefront_next_generate_component](./tools/storefront-next-generate-component) - REUSE/EXTEND/CREATE recommendation
54-
- [storefront_next_map_tokens_to_theme](./tools/storefront-next-map-tokens-to-theme) - Token mapping
52+
- [sfnext_start_figma_workflow](./tools/sfnext-start-figma-workflow) - Workflow orchestrator (call first)
53+
- [sfnext_analyze_component](./tools/sfnext-analyze-component) - REUSE/EXTEND/CREATE recommendation
54+
- [sfnext_match_tokens_to_theme](./tools/sfnext-match-tokens-to-theme) - Token mapping
5555
- [STOREFRONTNEXT Toolset](./toolsets#storefrontnext) - Overview of Storefront Next tools
5656
- [Figma MCP Server Documentation](https://developers.figma.com/docs/figma-mcp-server) - Official Figma MCP setup

docs/mcp/tools/pwakit-development-guidelines.md renamed to docs/mcp/tools/pwakit-get-guidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
description: Get PWA Kit v3 development guidelines and best practices for React, Chakra UI, and Commerce API.
33
---
44

5-
# pwakit_development_guidelines
5+
# pwakit_get_guidelines
66

77
Returns critical architecture rules, coding standards, and best practices for building PWA Kit v3 applications with React, Chakra UI, and Commerce API.
88

99
## Overview
1010

11-
The `pwakit_development_guidelines` tool provides essential development guidance for PWA Kit v3. It:
11+
The `pwakit_get_guidelines` tool provides essential development guidance for PWA Kit v3. It:
1212

1313
1. Returns comprehensive guidelines by default (quick-reference plus key sections).
1414
2. Supports retrieving specific topic sections on demand.

docs/mcp/tools/scapi-custom-api-scaffold.md renamed to docs/mcp/tools/scapi-custom-api-generate-scaffold.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
description: Generate a new custom SCAPI endpoint (OAS 3.0 schema, api.json, script.js) in an existing cartridge.
33
---
44

5-
# scapi_custom_api_scaffold
5+
# scapi_custom_api_generate_scaffold
66

77
Generate a new custom SCAPI endpoint in an existing cartridge. Creates `schema.yaml` (OAS 3.0 contract), `api.json` (endpoint mapping), and `script.js` (implementation) under the cartridge's `rest-apis/<apiName>/` directory.
88

99
## Overview
1010

11-
The `scapi_custom_api_scaffold` tool scaffolds a new custom API using the B2C tooling SDK's `custom-api` scaffold. It:
11+
The `scapi_custom_api_generate_scaffold` tool scaffolds a new custom API using the B2C tooling SDK's `custom-api` scaffold. It:
1212

1313
- Creates an OpenAPI 3.0 schema, API manifest, and script stub in your project.
1414
- Uses the first cartridge found in the project if you don't specify one.
1515
- Supports **shopper** (siteId, customer-facing) or **admin** (no siteId) API types.
1616

17-
**No instance or OAuth required** — this tool works locally and only writes files into your project. To check registration status after deployment, use [`scapi_custom_apis_status`](./scapi-custom-apis-status).
17+
**No instance or OAuth required** — this tool works locally and only writes files into your project. To check registration status after deployment, use [`scapi_custom_apis_get_status`](./scapi-custom-apis-get-status).
1818

1919
## Parameters
2020

@@ -78,15 +78,15 @@ Returns the scaffold ID, output directory, and list of created files:
7878
1. **Edit** `schema.yaml` to define paths, request/response schemas, and operation IDs.
7979
2. **Edit** `script.js` to implement the endpoint logic.
8080
3. **Deploy** the cartridge to your instance and **activate** the code version to register the API.
81-
4. **Verify** with [`scapi_custom_apis_status`](./scapi-custom-apis-status) that endpoints show as `active`.
81+
4. **Verify** with [`scapi_custom_apis_get_status`](./scapi-custom-apis-get-status) that endpoints show as `active`.
8282

8383
Shopper APIs are available at:
8484
`https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/v1/organizations/{organizationId}/...` and require the `siteId` query parameter and ShopperToken authentication.
8585

8686
## Related Tools
8787

8888
- Part of the [SCAPI](../toolsets#scapi), [PWAV3](../toolsets#pwav3), and [STOREFRONTNEXT](../toolsets#storefrontnext) toolsets
89-
- [`scapi_custom_apis_status`](./scapi-custom-apis-status) — Check custom API endpoint registration status after deployment
89+
- [`scapi_custom_apis_get_status`](./scapi-custom-apis-get-status) — Check custom API endpoint registration status after deployment
9090
- [`scapi_schemas_list`](./scapi-schemas-list) — List or fetch custom API schemas (use `apiFamily: "custom"`)
9191

9292
## See Also

docs/mcp/tools/scapi-custom-apis-status.md renamed to docs/mcp/tools/scapi-custom-apis-get-status.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
description: Check the registration status of custom SCAPI endpoints deployed on your B2C Commerce instance.
33
---
44

5-
# scapi_custom_apis_status
5+
# scapi_custom_apis_get_status
66

77
List custom SCAPI endpoint registration status (active/not_registered). Returns one row per endpoint per site with detailed status information.
88

99
## Overview
1010

1111
Checks the registration status of custom API endpoints deployed on your B2C Commerce instance. Returns endpoint status (`active` or `not_registered`) with per-site details.
1212

13-
**Note:** This tool queries your live instance. For schema definitions, use [`scapi_schemas_list`](./scapi-schemas-list) with `apiFamily: "custom"`. To create a new custom API, use [`scapi_custom_api_scaffold`](./scapi-custom-api-scaffold).
13+
**Note:** This tool queries your live instance. For schema definitions, use [`scapi_schemas_list`](./scapi-schemas-list) with `apiFamily: "custom"`. To create a new custom API, use [`scapi_custom_api_generate_scaffold`](./scapi-custom-api-generate-scaffold).
1414

1515
## Authentication
1616

docs/mcp/tools/scapi-schemas-list.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The `scapi_schemas_list` tool provides two modes of operation.
1313
1. **List (Discovery)**: Browse available schemas without fetching full OpenAPI specs.
1414
2. **Fetch**: Retrieve complete OpenAPI schema for a specific API.
1515

16-
This tool works with both standard SCAPI (Shop, Admin, Shopper APIs) and custom APIs. For endpoint registration status, use [`scapi_custom_apis_status`](./scapi-custom-apis-status) instead.
16+
This tool works with both standard SCAPI (Shop, Admin, Shopper APIs) and custom APIs. For endpoint registration status, use [`scapi_custom_apis_get_status`](./scapi-custom-apis-get-status) instead.
1717

1818
## Authentication
1919

@@ -48,12 +48,6 @@ Omit `includeSchemas` or any identifier to browse available schemas:
4848
- `availableApiNames` - List of available API names
4949
- `availableApiVersions` - List of available API versions
5050

51-
**Example prompts:**
52-
- ✅ "Use the MCP tool to list all available SCAPI schemas."
53-
- ✅ "Use the MCP tool to show me what checkout APIs exist." → `apiFamily: "checkout"`
54-
- ✅ "Use the MCP tool to discover SCAPI product endpoints." → `apiFamily: "product"`
55-
- ✅ "Use the MCP tool to list custom API definitions." → `apiFamily: "custom"`
56-
5751
### Fetch Mode
5852

5953
Set `includeSchemas: true` and provide all three identifiers (`apiFamily`, `apiName`, `apiVersion`) to fetch a complete OpenAPI schema:
@@ -62,11 +56,6 @@ Set `includeSchemas: true` and provide all three identifiers (`apiFamily`, `apiN
6256
- Full OpenAPI schema specification
6357
- Use `expandAll: true` to get the complete schema without collapsing
6458

65-
**Example prompts:**
66-
- ✅ "Use the MCP tool to get the OpenAPI schema for shopper-baskets v1." → `apiFamily: "shopper"`, `apiName: "shopper-baskets"`, `apiVersion: "v1"`, `includeSchemas: true`
67-
- ✅ "Use the MCP tool to show me the full OpenAPI spec for shopper-products v1." → `includeSchemas: true`, `expandAll: true`
68-
- ✅ "Use the MCP tool to show me the loyalty-points custom API schema." → `apiFamily: "custom"`, `apiName: "loyalty-points"`, `apiVersion: "v1"`, `includeSchemas: true`
69-
7059
## Usage Examples
7160

7261
### Standard SCAPI Discovery
@@ -83,6 +72,10 @@ Filter by API family:
8372
Use the MCP tool to show me what checkout APIs exist.
8473
```
8574

75+
```
76+
Use the MCP tool to discover SCAPI product endpoints.
77+
```
78+
8679
### Custom API Discovery
8780

8881
List custom API definitions:
@@ -154,13 +147,13 @@ Use the MCP tool to show me the full OpenAPI spec for shopper-products v1.
154147

155148
- Part of the [SCAPI](../toolsets#scapi), [PWAV3](../toolsets#pwav3), and [STOREFRONTNEXT](../toolsets#storefrontnext) toolsets
156149
- Always enabled (base toolset)
157-
- For endpoint registration status, use [`scapi_custom_apis_status`](./scapi-custom-apis-status)
150+
- For endpoint registration status, use [`scapi_custom_apis_get_status`](./scapi-custom-apis-get-status)
158151

159152
## See Also
160153

161154
- [SCAPI Toolset](../toolsets#scapi) - Overview of SCAPI discovery tools
162-
- [scapi_custom_apis_status](./scapi-custom-apis-status) - Check custom API endpoint registration status
163-
- [scapi_custom_api_scaffold](./scapi-custom-api-scaffold) - Generate a new custom API in a cartridge
155+
- [scapi_custom_apis_get_status](./scapi-custom-apis-get-status) - Check custom API endpoint registration status
156+
- [scapi_custom_api_generate_scaffold](./scapi-custom-api-generate-scaffold) - Generate a new custom API in a cartridge
164157
- [Authentication Setup](../../guide/authentication#scapi-authentication) - Set up SCAPI authentication with required roles and scopes
165158
- [Configuration](../configuration) - Configure OAuth credentials
166159
- [CLI Reference](../../cli/scapi-schemas) - Equivalent CLI commands: `b2c scapi schemas list` and `b2c scapi schemas get`

docs/mcp/tools/storefront-next-page-designer-decorator.md renamed to docs/mcp/tools/sfnext-add-page-designer-decorator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
description: Add Page Designer decorators to React components for Storefront Next to make them available in Page Designer.
33
---
44

5-
# storefront_next_page_designer_decorator
5+
# sfnext_add_page_designer_decorator
66

77
Adds Page Designer decorators (`@Component`, `@AttributeDefinition`, `@RegionDefinition`) to React components to make them available in Page Designer for Storefront Next.
88

99
> **Note:** 🚧 This MCP tool is for Storefront Next. Storefront Next is part of a closed pilot and isn't available for general use.
1010
1111
## Overview
1212

13-
The `storefront_next_page_designer_decorator` tool analyzes React components and generates Page Designer decorators that enable components to be used in Page Designer. It supports two modes:
13+
The `sfnext_add_page_designer_decorator` tool analyzes React components and generates Page Designer decorators that enable components to be used in Page Designer. It supports two modes:
1414

1515
1. **Auto Mode**: Quick setup with sensible defaults-automatically selects suitable props, infers types, and generates decorators immediately.
1616
2. **Interactive Mode**: Multi-step workflow for fine-tuned control over decorator configuration.

docs/mcp/tools/storefront-next-generate-component.md renamed to docs/mcp/tools/sfnext-analyze-component.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
2-
description: Analyze Figma design and discovered components to recommend REUSE, EXTEND, or CREATE strategy.
2+
description: Analyze design and discovered components to recommend REUSE, EXTEND, or CREATE strategy.
33
---
44

5-
# storefront_next_generate_component
5+
# sfnext_analyze_component
66

7-
Analyzes Figma design and discovered components to recommend a component generation strategy. Returns a REUSE, EXTEND, or CREATE action with confidence score, key differences, and suggested implementation approach.
7+
Analyzes design and discovered components to recommend a component generation strategy. Returns a REUSE, EXTEND, or CREATE action with confidence score, key differences, and suggested implementation approach.
88

99
> **Note:** 🚧 This MCP tool is for Storefront Next. Storefront Next is part of a closed pilot and isn't available for general use.
1010
1111
## Overview
1212

13-
The `storefront_next_generate_component` tool compares Figma-generated React code against existing components discovered in the codebase. It analyzes differences across styling, structure, behavior, and props, then recommends the best approach:
13+
The `sfnext_analyze_component` tool compares design React code (e.g., from Figma, design handoff, or other sources) against existing components discovered in the codebase. It analyzes differences across styling, structure, behavior, and props, then recommends the best approach:
1414

1515
- **REUSE**: Use existing component with props or minor styling adjustments
1616
- **EXTEND**: Extend existing component via props, variant, or composition pattern
1717
- **CREATE**: Create a new component (reference existing patterns if applicable)
1818

19-
**Workflow position:** Call this tool **after** retrieving Figma design data and discovering similar components. It is a required step in the Figma-to-component workflow.
19+
**Workflow position:** Call this tool **after** retrieving design data and discovering similar components. It is a required step in the Figma-to-component workflow.
2020

2121
This tool is part of the STOREFRONTNEXT toolset.
2222

2323
## Prerequisites
2424

25-
- Figma design data retrieved via Figma MCP tools
25+
- Design React code (from Figma MCP, design handoff, or other sources)
2626
- Component discovery performed before calling
2727
- Storefront Next project
2828

@@ -32,9 +32,9 @@ See [Figma-to-Component Tools Setup](../figma-tools-setup) for complete prerequi
3232

3333
| Parameter | Type | Required | Description |
3434
|-----------|------|----------|-------------|
35-
| `figmaMetadata` | string | Yes | JSON string containing Figma design metadata from `mcp__figma__get_metadata`. Can be empty string if metadata was not fetched. |
36-
| `figmaCode` | string | Yes | Generated React code from Figma (from `mcp__figma__get_design_context`). |
37-
| `componentName` | string | Yes | Suggested name for the component extracted from the Figma design. |
35+
| `figmaMetadata` | string | Yes | JSON string containing design metadata (from Figma MCP or empty). Can be empty string if metadata was not fetched. |
36+
| `figmaCode` | string | Yes | React code from design (e.g., from Figma `mcp__figma__get_design_context`, or design handoff). |
37+
| `componentName` | string | Yes | Suggested name for the component extracted from the design. |
3838
| `discoveredComponents` | array | Yes | Array of similar components discovered using Glob/Grep/Read. Pass empty array if no similar components found. |
3939
| `workspacePath` | string | No | Optional workspace root path. Defaults to the MCP server project directory. |
4040

@@ -50,6 +50,23 @@ Each item in `discoveredComponents` must have:
5050
| `matchType` | string | One of `'name'`, `'structure'`, `'visual'` |
5151
| `code` | string | Full source code of the component |
5252

53+
## Usage Examples
54+
55+
### With Figma design URL
56+
57+
```
58+
I have a Figma design at [URL]. Use the MCP tool to fetch the design code, search the codebase for similar components, then analyze and recommend whether to reuse, extend, or create a component.
59+
```
60+
61+
### With design code already fetched
62+
63+
```
64+
Use the MCP tool to analyze this design and recommend reuse, extend, or create. Design code: [paste React/JSX from Figma or design handoff]. Search the codebase for similar components first, then call the tool with the discovered components.
65+
```
66+
67+
### Agent workflow note
68+
69+
When the agent searches the codebase and finds no similar components, it should still call the tool with `discoveredComponents: []` to get a CREATE recommendation. The user does not need to specify this—the agent discovers it during the workflow.
5370

5471
## Output
5572

@@ -62,25 +79,10 @@ Returns a formatted recommendation including:
6279
- **Suggested Approach**: Implementation guidance
6380
- **Next Steps**: Action-specific instructions
6481

65-
## Usage Examples
66-
67-
### With Discovered Components
68-
69-
```
70-
Use the MCP tool to analyze the Figma design and recommend whether to reuse, extend, or create a component. I've discovered PrimaryButton and SecondaryButton as similar components.
71-
```
72-
73-
### No Similar Components
74-
75-
```
76-
Use the MCP tool to analyze the Figma design. No similar components were found in the codebase.
77-
```
78-
79-
8082
## Related Tools
8183

82-
- [`storefront_next_figma_to_component_workflow`](./storefront-next-figma-to-component-workflow) - Call first to get workflow instructions and Figma parameters
83-
- [`storefront_next_map_tokens_to_theme`](./storefront-next-map-tokens-to-theme) - Map Figma design tokens to theme variables
84+
- [`sfnext_start_figma_workflow`](./sfnext-start-figma-workflow) - Call first to get workflow instructions and Figma parameters
85+
- [`sfnext_match_tokens_to_theme`](./sfnext-match-tokens-to-theme) - Match design tokens to theme variables
8486
- Part of the [STOREFRONTNEXT](../toolsets#storefrontnext) toolset
8587
- Auto-enabled for Storefront Next projects
8688

0 commit comments

Comments
 (0)