Skip to content

feat: add securityWarning to McpFetchedAsset - #322

Merged
setu4993 merged 1 commit into
forcedotcom:mainfrom
Christian-Vallejos:t/api-catalog/mcp-fetch-security-warning
Jul 27, 2026
Merged

feat: add securityWarning to McpFetchedAsset#322
setu4993 merged 1 commit into
forcedotcom:mainfrom
Christian-Vallejos:t/api-catalog/mcp-fetch-security-warning

Conversation

@Christian-Vallejos

@Christian-Vallejos Christian-Vallejos commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

The MCP server fetch/introspection endpoint (POST /mcp-servers/{id}/fetch) returns a per-tool securityWarning string when a tool's definition changed since it was last approved. This adds securityWarning?: string to McpFetchedAsset so consumers (e.g. sf agent mcp fetch in plugin-agent) can surface it and let a user review it before re-approving a tool.

  • Only the live /fetch response populates this field; create and asset responses do not, so it is optional.
  • fetchMcpServer deserializes the response directly, so no client-side mapping change was needed — the field flows through automatically.

Test plan

  • tsc + eslint clean
  • mocha test/apiCatalog.test.ts — 11/11 passing

@W-23572634@

Christian-Vallejos added a commit to Christian-Vallejos/plugin-agent that referenced this pull request Jul 24, 2026
@W-23572634@

The Connect API already returns descriptions, labels, auth type and (on
fetch) a per-tool security warning, but the human-readable tables dropped
them. This brings `sf agent mcp` output to parity with the API so a user
can review a tool before approving it, without needing --json.

- fetch / asset list / asset replace / create: add Label + Description
  columns (create now prints the discovered-asset table instead of just
  a count).
- fetch: add a Security Warning column (only /fetch populates it).
- list / get: add Auth Type + Description.

--json output is unchanged (it always carried the full object).

Requires @salesforce/agents with the securityWarning field
(forcedotcom/agents#322); schemas regenerated for fetch + create.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Christian-Vallejos
Christian-Vallejos force-pushed the t/api-catalog/mcp-fetch-security-warning branch from ddd0dc2 to 1528fb3 Compare July 24, 2026 17:09
@Christian-Vallejos Christian-Vallejos changed the title @W-22860636 feat: add securityWarning to McpFetchedAsset feat: add securityWarning to McpFetchedAsset Jul 24, 2026
Christian-Vallejos added a commit to Christian-Vallejos/plugin-agent that referenced this pull request Jul 25, 2026
@W-23572634@

The Connect API already returns descriptions, labels, auth type and (on
fetch) a per-tool security warning, but the human-readable tables dropped
them. This brings `sf agent mcp` output to parity with the API so a user
can review a tool before approving it, without needing --json.

- fetch / asset list / asset replace / create: add Label + Description
  columns (create now prints the discovered-asset table instead of just
  a count).
- fetch: add a Security Warning column (only /fetch populates it).
- list / get: add Auth Type + Description.

--json output is unchanged (it always carried the full object).

Requires @salesforce/agents with the securityWarning field
(forcedotcom/agents#322); schemas regenerated for fetch + create.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@W-23572634@

The MCP server fetch/introspection endpoint (POST /mcp-servers/{id}/fetch)
returns a per-tool `securityWarning` string when a tool's definition changed
since it was last approved. Surface it on the fetched-asset type so consumers
(e.g. `sf agent mcp fetch`) can show it before a user re-approves a tool.

Only the live /fetch response populates this field; create/asset responses
do not, so it stays optional.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Christian-Vallejos
Christian-Vallejos force-pushed the t/api-catalog/mcp-fetch-security-warning branch from 1528fb3 to 5553c7e Compare July 25, 2026 18:50
@setu4993
setu4993 merged commit c2e58ba into forcedotcom:main Jul 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants