agent mcp asset replace (Developer Preview)

Replace the asset set of an MCP server in the API Catalog.

This command is available as a developer preview. The command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. Don’t implement functionality developed with these commands or tools.

Replaces the full set of assets (tools, prompts, resources) for an MCP server with the asset items you supply. Provide the assets either inline with --assets (a JSON string, or - to read from stdin) or from a file with --assets-file. The JSON must be either an array of asset items or an object of the form { "assets": [...] }. Each asset item may include id, name, label, description, active, and kind. This is a full replacement: existing assets not present in the supplied set are removed, so provide the complete desired asset set (read the current set first with agent mcp asset list or agent mcp fetch).

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑assetsN/AType: Value

The desired asset allowlist as a JSON string (or ”-” to read from stdin). Mutually exclusive with –assets-file.
‑‑assets‑fileN/AType: Value

Path to a JSON file containing the desired asset allowlist. Mutually exclusive with –assets.
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑mcp‑server‑id‑iType: Value
Required

ID of the MCP server whose assets you want to replace.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.

Replace the assets inline with a JSON string:

Replace the assets from a JSON file:

Pipe the assets from stdin: