[Feature]: Preserve the new tool listing fields (title, icons, _meta, defer_loading, execution)
Problem / motivation
The 2026 protocol added fields to tool listings that go beyond annotations, and the pinned mcp-go already parses them: top-level title, icons, _meta, defer_loading and execution (mcp/tools.go, mcp-go v1.0.0).
Discovery keeps none of them. Each tool is reduced to description, schemas and the five annotation hints (client.go#L515-L549, client.go#L559-L565), and ToolMetadata has nowhere to store the rest (config.go#L1523-L1541). Since everything downstream re-renders from those records, the fields never reach a client: not on the direct surface (mcp_routing.go#L386-L392), not in describe_tool, not in the REST tool maps (server.go#L4331-L4346).
Two of the losses bite directly: title is the display name clients prefer before falling back to annotations.title, and defer_loading is how a server tells a client to load a tool lazily. Swallowing those removes information the client was meant to act on.
Proposed solution
Capture the fields at discovery, add them to ToolMetadata, and re-emit them wherever tool listings are built today. The UI already renders annotation pieces (AnnotationBadges.vue), so surfacing titles and icons there is a natural follow-on.
Two decisions worth making explicitly:
- whether a changed
titleor icon set should register as a contract delta for review, since today only description and schema changes do - whether captured
defer_loadingshould influence mcpproxy's own tool search against servers that use it
Capturing execution.taskSupport also matters for any future tasks-extension support.
Alternatives considered
Fetching fresh upstream listings on demand instead of storing the fields. Rejected: review, quarantine and search all read from the stored records.
Which edition?
Both / not sure
Pre-submission checklist
- [x] I searched existing issues and discussions for a similar request
Thanks for the detailed write-up. The spec is up as https://github.com/smart-mcp-proxy/mcpproxy-go/pull/2062 (specs/137-tool-listing-fields/). It is docs only and still in review.
Decisions:
- Stored: all five fields, after validation and caps. Titles are at most 256 characters with no control or bidi characters. Icons must be
httpsor an imagedata:URI, at most 8, 32 KiB each, and the proxy never fetches them._metais capped at 16 KiB. The per-server budget is 2 MiB. - Titles (top-level and
annotations.title) are text an agent reads, so they are reviewed, but a title change never holds the tool. An unapproved title is withheld from every agent-facing surface until approved:scanmode approves it after a title-only TPA scan with no findings;manualmode needs a reviewer;automode, or quarantine off, adopts it. This also closes today's gap, whereannotations.titlereaches agents without being hashed or scanned.
- Icons,
_meta,defer_loading,executionare never hashed and never hold a tool. - Rug-pull hash: unchanged, so no tool changes status on upgrade. The review fingerprint moves to
rv3to cover titles. Only a review-bound approval with an explicit per-toolapprove_titlesintent can approve a title. No title is grandfathered at upgrade. - Where each field is re-emitted:
- The direct surface gets everything except
execution. retrieve_tools(full mode) anddescribe_toolgettitle.describe_toolalso getsdefer_loadingandtask_support.- REST gets everything.
_metaand pending titles are shown to admins only. - The Web UI shows titles and icons, and loads remote icons only on request.
- The direct surface gets everything except
defer_loadinghas no effect onretrieve_tools, because every upstream tool is already deferred behind it. It is forwarded unchanged on the direct surface.execution.taskSupportis captured and shown, and not forwarded until #2043.
Delivery: PR-1 capture and store; PR-2 title review and withholding on every surface; PR-3 re-emitting the new fields; PR-4 Web UI.
The spec for this is now merged (#2062): specs/137-tool-listing-fields.
The decisions are as listed in my earlier comment. The later review rounds tightened implementation details without changing any of them: dry-run scans never feed approval decisions, admission is tied to the exact contracts that were scanned, and a title is approved in the same transaction as its contract.
Next, implementation in four PRs: capture and store; title review and withholding; re-emitting the fields; Web UI. Thanks again @felipecrs for the detailed report.
Spec 137 PR-1 is up: #2096. Auto-merge is armed and waits for CI.
In this PR
- Discovery captures
title,icons,_meta,defer_loadingandexecution.taskSupport. Validation and caps live in the new packageinternal/toollisting: FR-002, FR-003, FR-004, FR-004a and FR-005. - The fields are stored in
ToolMetadata.Listing, along withListingDigest. - Administrators see them on the REST API. Agent tokens see none of them.
- Invalid
annotations.titlevalues are cleared. - The identity hash and the approval hash are unchanged.
Remaining
- PR-2: title review and the approved title.
- PR-3: re-emission on MCP surfaces, plus extras on the index fallback.
- PR-4: Web UI.
- The controller fallback
Server.GetServerToolsgets no listing yet (FR-020a scanner input). - Spec gap to settle: FR-020 says icons,
defer_loadingandtask_supportgo to everyone, but Delivery says PR-1 makes no agent-facing change. PR-1 keeps every new field admin-only.
Spec 137 PR-2a is up: #2138. Auto-merge is armed and waits for CI.
In this PR
- Titles (the top-level
titleandannotations.title) are shown to agents only once approved. A title never holds its tool: an unapproved title is withheld, and the tool stays callable. scanmode adopts a title after a title-only scan comes back clean.manualwaits for a reviewer.auto, or quarantine off, adopts it.- The approval record is the only title source. StateView and the search index carry no titles. The direct surfaces check every title again when they build a response.
- Approving a title needs a review-bound approval that names it:
approve_titlesontools/approve, ormcpproxy review approve <server> --approve-titles. The review fingerprint is nowrv3. - Agents and scoped callers see only approved titles and a
title_pendingflag. The pending text is shown to administrators only. - The approval hash, the identity hash and every approval status are unchanged.
Remaining
- PR-2b: earlier stored copies of tool metadata (tool-call history, activity bodies, timelines,
read_cache). - PR-2c: scanner output provenance.
- PR-2d: scan-job hardening, title re-checks on config, scan and bundle events, and title approval in the server approval.
- PR-2e: follow-up
list_changedafter a withheld title is served again. - PR-3: re-emission of the new fields.
- PR-4: Web UI.
- Still open from PR-1: FR-020 vs the Delivery section on who receives icons,
defer_loadingandtask_support. That belongs to PR-3.