b2c-dx-mcp

v3.17.0
@salesforce/b2c-dx-mcp Checked 5 hours ago Published 10 days ago

MCP server for B2C Commerce developer experience tools

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

cartridge_deploy

Find and deploy cartridges or selected files to B2C Commerce via WebDAV; overwrites matching remote files. Prerequisites (instance, credentials, code version): skill://mcp/b2c-mcp-config/SKILL.md. After deployment, add new cartridges to the site's cartridge path in Business Manager: Sites → Manage Sites → Settings tab → Cartridges.

ParameterTypeDescription
cartridgeDirectorystringOptional cartridge discovery root. Relative paths resolve from projectDirectory. Defaults to projectDirectory.
cartridgesarrayCartridge names to deploy; omit for all discovered cartridges.
codeVersionstringTarget version; defaults to configured, then active version.
configPathstringdw.json-format file; relative to projectDirectory.
directorystringDeprecated alias for cartridgeDirectory. cartridgeDirectory takes precedence when both are supplied.
excludearrayCartridge names to exclude after the include filter.
filesarrayFiles within selected cartridges, relative to projectDirectory. Max 64 MiB; preserves other remote files.
instanceNamestringdw.json instance name.
projectDirectorystringAbsolute project root; overrides server default.
reloadbooleanActivate/reload the target after upload, briefly toggling versions if already active. Default: false.

webdav_list

List one WebDAV directory with file metadata and pagination. Does not recurse.

ParameterTypeDescription
path *stringWebDAV Sites-relative path, e.g. Logs/jobs/run.log or Impex/src/import.xml.
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
limitinteger
offsetinteger
projectDirectorystringAbsolute project root; overrides server default.

webdav_get

Read exact WebDAV text into the conversation using HTTP byte ranges (maximum 32000 bytes per call). Use tail: true for the end of a log. To save a whole or binary file locally, use webdav_get_to_file.

ParameterTypeDescription
path *stringWebDAV Sites-relative path, e.g. Logs/jobs/run.log or Impex/src/import.xml.
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
maxBytesinteger
offsetintegerByte offset for text; continue with returned nextOffset.
projectDirectorystringAbsolute project root; overrides server default.
tailbooleanRead the last maxBytes of the file instead of from offset, e.g. recent log lines.

webdav_get_to_file

Download and save a whole WebDAV file, including binary archives such as zips, to a new local file on the MCP host. Streams any size; never overwrites.

ParameterTypeDescription
outputPath *stringNew file on the MCP host, within projectDirectory (relative to it). The parent directory must exist.
path *stringWebDAV Sites-relative path, e.g. Logs/jobs/run.log or Impex/src/import.xml.
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
projectDirectorystringAbsolute project root; overrides server default.

webdav_put

Upload one WebDAV file from text or a local file on the MCP host. Parent directory must exist. Replacement requires overwrite: true.

ParameterTypeDescription
path *stringWebDAV Sites-relative path, e.g. Logs/jobs/run.log or Impex/src/import.xml.
configPathstringdw.json-format file; relative to projectDirectory.
contentstringUTF-8 text; supply exactly one of content, sourcePath.
contentTypestring
instanceNamestringdw.json instance name.
overwriteboolean
projectDirectorystringAbsolute project root; overrides server default.
sourcePathstringFile on the MCP host, within projectDirectory (relative to it). Maximum 64 MiB.

debug_list_sessions

List debugger sessions, breakpoints, and known halted threads.

debug_start_session

Start a script debugger session and map cartridges; replaces any remote debugger client. Requires BM Basic Auth with WebDAV_Manage_Customization. Use returned session_id; end with debug_end_session. Workflow: skill://mcp/b2c-mcp-debugger/SKILL.md.

ParameterTypeDescription
cartridgeDirectorystringCartridge discovery and source-mapping root; relative to projectDirectory.
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
projectDirectorystringAbsolute project root; overrides server default.

debug_end_session

Disconnect and free the instance debugger slot. Always end sessions when finished, including after errors.

ParameterTypeDescription
session_id *string
clear_breakpointsbooleanClear breakpoints before disconnecting. Default: false.

debug_set_breakpoints

Replace all session breakpoints. verified means local source mapping, not deployed-code validation. Workflow: skill://mcp/b2c-mcp-debugger/SKILL.md.

ParameterTypeDescription
breakpoints *arrayReplacement set; empty clears all.
session_id *string

debug_wait_for_stop

Wait for a debugger thread to halt. Returns immediately if already halted; otherwise blocks until a halt or timeout.

ParameterTypeDescription
session_id *string
timeout_msintegerWait timeout in milliseconds. Default: 30000; max: 120000.

debug_inspect

Inspect a halted thread: stack and frame variables. Expand objects with object_path.

ParameterTypeDescription
session_id *string
thread_id *integer
frame_indexintegerVariable frame; ignored for stack-only reads. Default: 0.
includearrayDefault: both. Object expansion requires variables.
object_pathstringObject path, e.g. request.httpParameters; returns child members.
scopestringDefault: all scopes. Not used for object expansion.

debug_evaluate

Evaluate JavaScript in a halted thread/frame. Expressions can call functions and change remote state.

ParameterTypeDescription
expression *stringJavaScript expression.
session_id *string
thread_id *integer
frame_indexintegerDefault: 0 (top frame).

debug_control

Resume a halted thread, or step over, into, or out of the current line. Follow with debug_wait_for_stop.

ParameterTypeDescription
action *string
session_id *string
thread_id *integer

debug_capture_at_breakpoint

Debug a request: add a breakpoint, wait for a halt, and return stack, variables, and evaluations. Trigger a GET here or an external request concurrently. Capture does not resume by default. Workflow: skill://mcp/b2c-mcp-debugger/SKILL.md.

ParameterTypeDescription
file *stringLocal file path or server script path for the breakpoint.
line *integer1-based line number.
session_id *string
auto_continuebooleanResume after capture; default false leaves the request halted. Use true for snapshots.
conditionstringOptional conditional expression for the breakpoint.
expressionsarrayExpressions evaluated when halted; may change remote state.
scopesarrayVariable scopes to return. Default: ["local", "closure"]; [] omits variables.
timeout_msintegerWait timeout in milliseconds. Default: 30000; max: 120000.
trigger_urlstringGET after arming; no custom headers. May remain pending while halted.

logs_list_files

List B2C log files and prefixes available for reading or watching.

ParameterTypeDescription
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
prefixesarrayLog-prefix filter; omit for all. Paths may include subdirectories.
projectDirectorystringAbsolute project root; overrides server default.
sort_bystringSort field. Defaults to "date".
sort_orderstringSort order. Defaults to "desc".

logs_get_recent

Fetch recent B2C instance logs (errors, exceptions, warnings, custom logs). Use for quick lookups; start a log watch before actions whose entries must not be missed.

ParameterTypeDescription
configPathstringdw.json-format file; relative to projectDirectory.
countintegerMaximum entries. Default: 50.
instanceNamestringdw.json instance name.
levelarrayFilter by log level (ERROR, WARN, INFO, DEBUG, FATAL, TRACE). Case-insensitive.
maxMessageLengthintegerTruncate each message to this many characters; truncatedChars reports the remainder. Default: 2000; 0 disables.
prefixesarrayLog prefixes. Default: ["error", "customerror"]; use ["custom-"] for custom logger files; paths may be subdirs.
projectDirectorystringAbsolute project root; overrides server default.
searchstringCase-insensitive substring filter applied to entry message and raw text.
sincestringOnly entries after this time. Accepts relative ("5m", "1h", "2d") or ISO 8601.

logs_watch

Start, list, or stop B2C log watches that tail server logs. Start before the target action; read with logs_watch_poll. Stop discards unread entries; safe to repeat.

ParameterTypeDescription
action *stringstart uses configuration/filters; stop needs watch_id; list takes only action.
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
last_entriesintegerExisting entries per file to emit at startup. Default: 0.
levelarrayKeep matching levels before buffering.
poll_interval_msintegerWebDAV polling interval, in milliseconds. Default: 3000.
prefixesarrayLog prefixes. Default: ["error", "customerror"]; use ["custom-"] for custom logger files; paths may be subdirs.
projectDirectorystringAbsolute project root; overrides server default.
searchstringCase-insensitive substring filter applied as entries arrive.
watch_idstringRequired for stop only.

logs_watch_poll

Read new lines buffered by a B2C log watch; wait when empty. Repeat if truncated. Includes rotation and error events.

ParameterTypeDescription
watch_id *string
max_entriesintegerMaximum entries. Default: 200.
timeout_msintegerWait when empty, in milliseconds. Default: 5000; 0 returns immediately.

docs_read

Read a B2C Commerce (SFCC/Demandware) Script API reference, job step, developer guide, admin/merchant help article, or tooling doc by ID or fuzzy query. Use docs_search to find IDs. Cite by entry.url (sourceUrl for Markdown); never show doc IDs.

ParameterTypeDescription
query *stringExact id ("dw.catalog.ProductMgr", "sfnext/sfnext-get-started") or fuzzy query.
maxLengthintegerMaximum characters of content to return. Defaults to 12000.
offsetintegerCharacter offset to start reading from (for paging long docs). Defaults to 0.
projectDirectorystringProject to detect; no server-directory default.
sectionstringHeading ID to read one section, e.g. "scopes-by-command"; unknown IDs list the headings.
workspacestringStorefront preference; auto detects projectDirectory, all disables bias.

docs_list

List documentation IDs and titles for B2C Commerce (SFCC/Demandware) Script API, job steps, developer guides, admin/merchant help, and tooling docs. Without a filter, returns category counts. Use docs_search for questions and docs_read for content.

ParameterTypeDescription
categorystringRestrict the listing to one documentation category.
limitintegerMax entries per page. Defaults to 100.
offsetintegerNumber of entries to skip (for pagination).
projectDirectorystringProject to detect; no server-directory default.
workspacestringFilter by storefront; auto detects projectDirectory, all lists categories.

docs_schema_read

Read a bundled B2C Commerce (SFCC/Demandware) XSD schema (the XML format of an import file) by ID or fuzzy query. Use docs_schema_search to find IDs; validate_xml_schema checks XML against them.

ParameterTypeDescription
query *stringSchema name or partial match.

docs_schema_list

List bundled B2C Commerce (SFCC/Demandware) XSD schema IDs for docs_schema_read and validate_xml_schema.

validate_xml_schema

Validate B2C Commerce import/export XML (catalogs, price books, inventory, site archives, and more) against the bundled XSDs that docs_schema_read serves. The schema is chosen from each root element namespace. Checks local files on the MCP host or inline content, offline; returns line-numbered errors.

ParameterTypeDescription
contentstringAn XML document to validate.
excludearrayGlobs to skip when expanding paths.
pathsarrayXML files, directories (searched for *.xml), or globs, relative to projectDirectory. Exactly one of paths, content.
projectDirectorystringAbsolute project root; overrides server default.
schemastringBundled schema ID (docs_schema_list) to use for every document instead of namespace detection.

object_types_describe

List system object types, or one type's attribute definitions (effective IDs like c_color, value types, enum values, groups). Use before writing product.custom.* or c_ field code. Custom object types are not covered. Scope sfcc.object-definitions; enum values need .rw.

ParameterTypeDescription
configPathstringdw.json-format file; relative to projectDirectory.
idsarrayExact attribute IDs (with or without c_).
includeGroupsbooleanInclude attribute groups with their member IDs.
includeValuesbooleanInclude enum values (up to 50 per attribute).
instanceNamestringdw.json instance name.
kindstringAttribute kind. Default: all.
limitintegerAttributes per page. Default: 100.
objectTypestringSystem object type ID. Omit to list object types.
offsetintegerAttribute offset. Default: 0.
projectDirectorystringAbsolute project root; overrides server default.
searchstringText in attribute ID or display name.

project_inspect

Inspect storefront code from source (preview), along the site cartridge path. Start with the summary (counts and what each aspect returns); list endpoints, filtered by ID, cartridge, or middleware; then get one endpoint for what runs, in order, and which cartridge each step comes from. Also hooks in run order, Custom APIs, and custom job steps. Reads local files.

ParameterTypeDescription
allCartridgesbooleanAlso index cartridges not on the cartridge path, after it (as if the site ran them). Default false.
aspectstringWhat to return. Defaults to summary, which lists what each aspect returns.
cartridgestringendpoints and jobSteps: only items this cartridge defines or changes (exact name).
filterstringCase-insensitive substring of endpoint IDs, hook names, API/endpoint names, or job step type IDs.
idstringEndpoint ID (Controller-Action, case-insensitive). Required for aspect endpoint.
issuesOnlybooleanhooks, customApis, jobSteps: only items with issues.
projectDirectorystringAbsolute project root; overrides server default.
siteIdstringSite whose cartridge path to read live from the instance (overrides configured cartridges). See cartridgePathHint.
usesstringendpoints: only endpoints whose middleware contains this text, such as "userLoggedIn" or "csrf".

security_scan

Scan cartridge code and site data for B2C Commerce security problems (preview): CSRF gaps, overrides that drop security middleware, query injection, open redirects, hardcoded credentials, OCAPI demo client ID, and more. Local scan along the site cartridge path; honors suppressions, baseline, and settings. Triage with skill://b2c-cli/b2c-security/SKILL.md.

ParameterTypeDescription
allCartridgesbooleanAlso index cartridges not on the cartridge path, after it (as if the site ran them). Default false.
excludeReferenceCartridgesbooleanLeave out findings in SFRA and SiteGenesis base cartridges (reported and tagged by default).
excludeRulesarraySkip these rule IDs.
ignorearrayLeave out files matching these globs (relative to projectDirectory), e.g. "cartridges/bm_*".
includeSuppressedbooleanAlso return suppressed and baselined findings.
maxFindingsintegerFindings to return. Defaults to 50.
minSeveritystringDrop findings below this severity.
pathsarrayFiles or directories to scan, relative to projectDirectory. Defaults to the whole project.
projectDirectorystringAbsolute project root; overrides server default.
rulesarrayRun only these rule IDs.
siteIdstringSite whose cartridge path to read live from the instance (overrides configured cartridges). See cartridgePathHint.

skills_read Read B2C Skills

Read B2C skills: b2c (development), b2c-cli, b2c-ops (operations), storefront-next, mcp (setup/workflows); fallback for skill:// resources, full catalog. No args lists; query searches; collection filters; id or uri reads.

ParameterTypeDescription
collectionstringFilter by collection.
filestringRelative reference path listed by an entrypoint.
idstringExact skill ID from discovery.
limitintegerPage size: directory 20, search 5; maximum 20.
maxLengthintegerRead character limit; defaults to the full file or section.
offsetintegerEntry offset for discovery; character offset for reads. Default 0.
querystringSearch skills; returns five hits by default.
sectionstringExact heading ID returned by a read.
uristringSkill resource URI; replaces id and file.
workspacestringOptional storefront ranking preference; no project detection.

config_inspect

Show resolved B2C configuration, its sources, warnings, paths, how the instance authenticates and whether this server is up to date; usually replaces reading dw.json. Secrets are masked by default.

ParameterTypeDescription
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
projectDirectorystringAbsolute project root; overrides server default.
unmaskbooleanUnmask secrets; only when the user asks.

mrt_logs_watch

Start, list, or stop live Managed Runtime (MRT) log watches for PWA Kit or Storefront Next storefront servers. Requires project/environment to start; read with mrt_logs_watch_poll. Stop discards unread entries; safe to repeat.

ParameterTypeDescription
action *stringstart uses configuration/filters; stop needs watch_id; list takes only action.
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
levelarrayKeep matching levels before buffering (e.g. ERROR, WARN).
projectDirectorystringAbsolute project root; overrides server default.
searchstringCase-insensitive substring in message or raw text; filters before buffering.
watch_idstringRequired for stop only.

mrt_logs_watch_poll

Drain buffered MRT logs, blocking up to timeout_ms when empty. Repeat if truncated=true. stopped=true means the stream closed; inspect errors.

ParameterTypeDescription
watch_id *string
max_entriesintegerMaximum entries. Default: 200.
timeout_msintegerWait when empty, in milliseconds. Default: 5000; 0 returns immediately.

scapi_execute SCAPI Code Executor

Requires reading skill://mcp/b2c-mcp-scapi/SKILL.md first. Run any SCAPI Admin or Shopper API operation (reads, writes, searches and actions) through scapi.request() in JavaScript. Covers most developer, merchant and administrator tasks: catalogs, products, pricing, promotions, orders, customers, inventory, sites, jobs, code versions, observability, and storefront flows such as baskets. Use it whenever no more specific tool fits. Find operations with scapi_search first. Auth is automatic; Shopper calls run as a per-site guest whose basket persists. Operations are governed by Safety Mode and ma…

ParameterTypeDescription
skillRead *booleanSet true only after reading the SCAPI skill (MCP resource or skills_read({uri})).
actionstringDefaults to execute. Cancel terminates retained work; no rollback.
codestringJavaScript async arrow function. Return concise JSON. No filesystem or shell access.
configPathstringdw.json-format file; relative to projectDirectory.
executionIdstringRequired for cancel; forbidden for execute. Protocol continuation uses requestState, not this field.
inputJSON input for async (input); kept separate from saved source.
instanceNamestringdw.json instance name.
projectDirectorystringAbsolute project root; overrides server default.

scapi_snippet_save Save SCAPI Workflow

Save a completed execution as a reusable user/ snippet only when the user asks. Inspect its outcome and source first; source must take variable values through input and contain no credentials. Saves source and metadata, not input or results. Existing names are not overwritten.

ParameterTypeDescription
description *string
effect *string
executionId *string
inputSchema *objectJSON Schema for the parameterized program input.
name *string

scapi_custom_apis_get_status

List Custom SCAPI endpoint registration status per site. Supports filtering, grouping, and selected columns. Requires shortCode, tenantId, and sfcc.custom-apis scope. Use scapi_schemas_list for schemas.

ParameterTypeDescription
columnsstringComma-separated output fields; omit for defaults.
configPathstringdw.json-format file; relative to projectDirectory.
groupBystringGroup by siteId or type (Admin/Shopper).
instanceNamestringdw.json instance name.
projectDirectorystringAbsolute project root; overrides server default.
statusstringFilter by status. Omit for all.

scapi_schemas_list

List available SCAPI APIs (schema metadata) or fetch an OpenAPI schema. Fetch requires includeSchemas, apiFamily, apiName, and apiVersion. Use scapi_custom_apis_get_status for endpoint status.

ParameterTypeDescription
apiFamilystringAPI family (e.g., "checkout", "product", "custom").
apiNamestringAPI name (e.g., "shopper-baskets", "shopper-products").
apiVersionstringAPI version (e.g., "v1", "v2").
configPathstringdw.json-format file; relative to projectDirectory.
expandAllbooleanReturn full uncompressed schema. Only when includeSchemas=true. Default: false.
expandCustomPropertiesbooleanInclude tenant custom property definitions when fetching a schema.
includearraySchemas API expand sections (e.g. summaries, examples, all). Overrides expandAll/expandCustomProperties.
includeSchemasbooleanFetch full OpenAPI schema. Requires apiFamily+apiName+apiVersion. Default: false.
instanceNamestringdw.json instance name.
projectDirectorystringAbsolute project root; overrides server default.
statusstringFilter by status (list mode only). Omit to return all schemas.

site_archive_import

Read skill://mcp/b2c-mcp-site-import/SKILL.md first. Writes merchandising data that has no SCAPI write (e.g. promotion discount rules) as XML: validates every file against its schema (no separate validate_xml_schema call needed), then runs the archive job. Nothing is uploaded if a file fails. Merges into existing data.

ParameterTypeDescription
files *arrayArchive files; 10 MiB total.
skillRead *booleanSet true only after reading the site import skill (MCP resource or skills_read({uri})).
archiveNamestringArchive name on the instance. Default import-<timestamp>.
configPathstringdw.json-format file; relative to projectDirectory.
dryRunbooleanValidate only, without uploading or importing. Every call validates. Default false.
instanceNamestringdw.json instance name.
projectDirectorystringAbsolute project root; overrides server default.

metrics_get

CLOSED BETA. Retrieve B2C observability metric time series by category and time range. Defaults to the last 24 hours. Requires Metrics API access and OAuth scope sfcc.metrics. For incidents follow skill://b2c-ops/b2c-performance-triage/SKILL.md or b2c-integration-triage (external services); signal reference: skill://b2c-ops/b2c-production-triage/references/metrics-signals.md.

ParameterTypeDescription
category *stringMetrics category.
apiFamilystringFilter by SCAPI API family (scapi category only)
apiNamestringFilter by SCAPI API name (scapi category only)
configPathstringdw.json-format file; relative to projectDirectory.
fromstringStart bound: relative ("1h", "7d" ago) or ISO 8601. Alone → a 24h window forward (capped at now).
instanceNamestringdw.json instance name.
ocapiApistringFilter by OCAPI API (ocapi category only)
ocapiCategorystringFilter by OCAPI category (ocapi category only)
projectDirectorystringAbsolute project root; overrides server default.
summarizebooleanReturn per-series stats (points, sum, min, max, avg, maxAt) instead of data points.
thirdPartyServiceIdstringFilter by third-party service ID (third-party category only)
tostringEnd bound: relative ("6h" ago) or ISO 8601. Alone → a 24h window back from it.
windowstringDuration combined with from or to; alone selects the latest window. Default: 24h.

cip_discover

Find CIP analytics reports and inspect parameters/SQL offline; list live warehouse tables or inspect columns. Narrow results before querying.

ParameterTypeDescription
actionstring
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
limitintegerMaximum results; default 50 columns, 20 reports/tables.
namestringReport or table name for detail actions.
offsetinteger
paramsobjectReport parameters from discovery; string values, dates YYYY-MM-DD.
projectDirectorystringAbsolute project root; overrides server default.
querystringReport search text or SQL LIKE table-name pattern.
schemastring
stagingbooleanForce staging analytics host; otherwise infer from tenant. cipHost configuration takes precedence.

cip_query

Query CIP analytics using a curated report or SQL. Read skill://mcp/b2c-mcp-cip/SKILL.md first. Returns bounded rows; filter/group in SQL. Warehouse data is not live SCAPI state.

ParameterTypeDescription
skillRead *booleanRequired. Set true only after reading skill://mcp/b2c-mcp-cip/SKILL.md (MCP resource, or skills_read({uri})).
configPathstringdw.json-format file; relative to projectDirectory.
instanceNamestringdw.json instance name.
maxRowsinteger
paramsobjectReport parameters from discovery; string values, dates YYYY-MM-DD.
projectDirectorystringAbsolute project root; overrides server default.
reportstringCurated report name; supply report or sql.
sqlstringAnalytics SELECT query; filter dates/sites and aggregate in SQL.
stagingbooleanForce staging analytics host; otherwise infer from tenant. cipHost configuration takes precedence.
timeoutSecondsinteger