Perforce Agentic Gateway v2026.5
Token-savings reporting for code mode, a readable answer when a server is
running but serving no tools, and richer typed results for sandbox code.
claude mcp add pag -- uvx perforce-agentic-gateway@latestNew features
- Token efficiency reporting. A new Efficiency page in the dashboard
reports how many tokens code mode kept out of the client's context, split
into Execute (arguments and results that stayed in the sandbox) and
Explore (tool schemas the model never loaded), with a per-server and
per-tool breakdown of Execute and a selectable date range. A badge on the
navigation item carries the combined total, and each server's detail panel
carries its own figure. The same report is available to agents through the
newpag__metricstool and over HTTP atGET /api/metrics. Figures are
gateway-side estimates and are labeled as such. - Discovery readiness on running servers. A server whose MCP handshake
succeeded no longer looks identical whether its capability discovery
finished, is still in flight, or failed. Each running server now reports
discovering,discovered, ordiscovery_failedonpag__status, on
GET /api/health, in the server list, and in the Tools tab empty state.
When discovery did not complete, the dashboard andpag__statussay so and
name restarting the server as the remedy, pointing at the Activity tab and
pag__server_logsfor the reason. - Output schemas and structured results in code mode.
pag__explore
catalog entries now carry each tool's declaredoutputSchema, and the array
callTool()returns now carries the downstream result'sstructuredContent
when the server sends one. Sandbox code can read the typed object directly —
r.structuredContent ?? JSON.parse(r[0].text)— instead of guessing the
return shape and re-parsing a text blob. Existing content indexing is
unchanged.
Improvements
- Downstream tool changes take effect mid-session. A server that adds,
removes, or changes a tool and sendsnotifications/tools/list_changed(or
the prompts, resources, or resource-templates equivalent) is now re-queried,
so the change reaches the model without restarting that server. - Startup failures explain themselves. A server that reaches "Running" but
never publishes a session used to produce a single unexplained "server
unavailable during discovery" line. Init-handshake failures and post-init
failures now log the concrete error.
Bug fixes
- A server that came up with no tools now recovers on its own. When a
server's capabilities were not yet published as startup discovery ran, the
one corrective re-query was discarded, so the catalog stayed empty for the
rest of the session unless the user restarted the server. - Slow-starting servers are no longer abandoned at 15 seconds. The wait for
a server's session and the capability list calls that follow it now get
separate budgets, so a server still resolving its package (for example a
uvxcold start) contributes its tools instead of coming up empty. - Servers that do not implement
logging/setLevelnow expose their tools
when the client has set a log level. Previously the server showed as Running
and reported "server unavailable" with no tools routed — reproducible under
VS Code, which always sets a level afterinitialize. - Template variables in catalog environment values are now substituted. An
environment variable combining a publisher-set value with a user-supplied
variable, such ashttps://{mcp_node}/mcp/, reached the server process with
the placeholder intact. - The built-in
ui_builderserver can no longer be deleted. The dashboard
offered a Delete button that always failed, and the underlying API had no
guard on the reserved alias. - First-run config seeding is now atomic, fixing a startup failure that
reportedversion field is requiredfor a config file that was valid by the
time anyone looked at it. - Shutdown no longer takes ten seconds. Signaling the gateway waited out a
supervisor timeout before exiting, and a closed stdin left the stdio surface
restarting itself in a loop against closed pipes. - Code mode no longer races on tool arguments.
callTool()read its
arguments off the JavaScript event loop and could hand the dispatcher a map
the sandbox program still held, crashing the process on concurrent access. - A
callTool()issued from a promise continuation is now waited for
rather than escaping the sandbox's dispatch barrier, which could also panic
the process.