{"at":"2026-11-22T23:38:06.906Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:38:07.291Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"pag","version":"2026.6"}},"cacheScope":"public","capabilities":{"completions":{},"logging":{},"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"resultType":"complete","supportedVersions":["2026-07-28","2025-11-25","2025-06-18","2025-03-26","2024-11-05"],"ttlMs":0}}}
{"at":"2026-11-22T23:38:07.291Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:38:07.292Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"pag","version":"2026.6"}},"cacheScope":"public","resultType":"complete","tools":[{"description":"Add an MCP server here — never edit MCP config files by hand; PAG writes the config and starts the server. For a stdio server give alias, command and args, e.g. {\"alias\": \"time\", \"command\": \"uvx\", \"args\": [\"mcp-server-time\"]} for a PyPI package or {\"alias\": \"time\", \"command\": \"npx\", \"args\": [\"-y\", \"<npm-package>\"]} for npm; url for a remote HTTP server; image for a container. Use this for servers not in a registry — for registry servers use pag__enable_server.","inputSchema":{"properties":{"alias":{"description":"Config alias for the server","type":"string"},"args":{"description":"Command-line arguments, e.g. [\"mcp-server-time\"] when command is uvx","items":{"type":"string"},"type":"array"},"command":{"description":"Command to run (stdio server), e.g. \"uvx\" for a PyPI package or \"npx\" for npm","type":"string"},"enabled_tools":{"description":"Tool names to force-enable regardless of default","items":{"type":"string"},"type":"array"},"env":{"description":"Environment variables","type":"object"},"image":{"description":"Docker/OCI image (container server)","type":"string"},"json_config":{"description":"Server config object in standard MCP client format (command, url, image, args, env, headers)","type":"object"},"tools_default":{"description":"Default tool visibility for this server (enabled or disabled)","enum":["enabled","disabled"],"type":"string"},"url":{"description":"Endpoint URL (remote HTTP server)","type":"string"}},"required":["alias"],"type":"object"},"name":"pag__add_server"},{"description":"Update inputs, environment variables, arguments, tool filtering, or the pinned version for a server. Deep-merge semantics on the nested inputs tree: omitted keys are left unchanged, null values delete keys. To apply an available update, pass version with the new value. Changes that affect execution trigger a server restart.","inputSchema":{"properties":{"args":{"description":"Full replacement for command-line arguments (custom servers only)","items":{"type":"string"},"type":"array"},"env":{"description":"Merge-patch for environment variables: provided keys are set, null deletes","type":"object"},"inputs":{"description":"Deep merge-patch for [servers.<alias>.inputs] — nested per-input value / variables structure","type":"object"},"name":{"description":"Server alias","type":"string"},"remote":{"description":"Deep merge-patch for [servers.<alias>.remote] — carries variables for remote-transport templating","type":"object"},"tools":{"description":"Full replacement for tool visibility config (default ∈ {enabled,disabled}, enabled and disabled override arrays). Set to null to clear.","type":["object","null"]},"version":{"description":"Re-pin a registry-sourced server to a new version (an exact pin like \"1.2.0\" or a semver range like \"^1.2.0\"). Use the version reported in pag__status update_available to apply an advertised update. Triggers a restart onto the new version. Registry-sourced servers only.","type":"string"}},"required":["name"],"type":"object"},"name":"pag__configure_server"},{"description":"Disable a server for this project. The server stops but its configuration is retained.","inputSchema":{"properties":{"name":{"description":"Server alias","type":"string"}},"required":["name"],"type":"object"},"name":"pag__disable_server"},{"description":"Scan the project directory for technology signals and get recommendations for MCP servers to enable. Call when the user asks what servers would help this project, or when a task needs a capability no enabled server provides.","inputSchema":{"type":"object"},"name":"pag__discover"},{"description":"Enable an MCP server from the registry for this project. Before calling, use pag__search_catalog to learn the server's inputs. Collect non-secret input values (and per-variable overrides for templated inputs) from the user and pass them under the inputs parameter. Writes to project config and starts the server. Blocks until the server reaches a stable state (running or failed). If secrets are missing, returns pag_missing_secrets with a browser URL for secret entry.","inputSchema":{"properties":{"alias":{"description":"Config alias (default: last path component of source)","type":"string"},"env":{"description":"Pre-configure ad-hoc environment variables (not registry-declared) at enable time","type":"object"},"inputs":{"description":"Nested object matching [servers.<alias>.inputs] — per-input value (for non-templated inputs) or variables map (for templated inputs). See RFC 008 §Inputs.","type":"object"},"remote":{"description":"Nested object matching [servers.<alias>.remote] — carries variables for remote-transport templating.","type":"object"},"source":{"description":"Fully-qualified registry name (e.g., com.perforce/blazemeter)","type":"string"}},"required":["source"],"type":"object"},"name":"pag__enable_server"},{"description":"Execute a JavaScript program (the code parameter) that calls\ndownstream MCP tools and returns structured results.\nUse pag__explore first to find tool names and schemas — calls with\nguessed arguments fail. Compose calls in one complete program per goal.\n\nExample — call a tool, return its result:\n  const r = await callTool(\"klocwork__get_issues\", { project: \"myapp\" });\n  const text = r[0].text;\n  return r.structuredContent ?? (text.startsWith(\"{\") || text.startsWith(\"[\") ? JSON.parse(text) : text);\n\ncallTool(qualifiedName, args) is async and returns content items —\nmost tools' result is r[0].text; when the tool declares an\noutputSchema, the pre-parsed typed object is attached as\nr.structuredContent. Prefer it, and return it explicitly:\nreturning the array directly does not carry the property\n(JSON.stringify ignores array properties).\n\nNot every tool replies in JSON. Some — PAG's own ui_builder and\nmanagement tools among them — reply in prose meant to be shown to the\nuser, and r[0].text is then the whole result: read it and return it as\nthe string it is. JSON.parse throws on prose, and an uncaught\nexception loses the whole program including the tool call that\nproduced it; parse only when the text starts with '{' or '['.\n\nOn failure callTool throws an Error whose .message is prefixed with\nthe qualified tool (e.g. \"klocwork__get_issues: <reason>\"); .server\nand .tool carry the alias and qualified name. Use try/catch.\n\nconsole.log() writes debug output, returned under \"logs\".\n\nReturn a value to send results back (JSON-serialized). Async/await\nis supported. Constraints: plain JavaScript only. No TypeScript,\nno imports.\n\nNot available in this sandbox:\n  require, setTimeout, setInterval, eval, globalThis, process, fetch,\n  URL, TextEncoder, btoa, atob, crypto, performance, console.error,\n  console.warn.","inputSchema":{"properties":{"code":{"description":"JavaScript code to execute in the sandbox. Has access to callTool(qualifiedName, args) (async, calls a downstream tool) and console.log(). Use pag__explore first to discover available tools and their qualifiedNames, then compose calls into a program here. Return a value to send structured results back.","type":"string"}},"required":["code"],"type":"object"},"name":"pag__execute"},{"description":"Query the catalog map (alias to tools) via the code parameter\n(JavaScript); read-only — no callTool here. Tool definitions stay\nserver-side until your code returns part of them. Find tools and\ntheir schemas before calling them through pag__execute.\n\nExample — find tools by keyword, return what you need:\n  const tools = Object.values(catalog).flatMap(s => s.tools);\n  const hits = fuzzy(\"issues\", tools, \"description\");\n  return hits.map(h => ({\n    qualifiedName: h.item.qualifiedName,\n    description: h.item.description,\n    inputSchema: h.item.inputSchema\n  }));\n\nCatalog shape (TypeScript notation) — catalog is a map of server\nalias to { tools: [...] }; each tool has\n  const catalog: Record<string, { tools: Array<{\n    name: string;\n    qualifiedName: string;\n    description: string;\n    inputSchema: object;\n    outputSchema?: object;\n  }> }>\nname is unprefixed; qualifiedName is the \"alias__toolname\" form\ncallTool takes in pag__execute.\noutputSchema, when present, describes what callTool returns: the\nstructuredContent object and the JSON in content[0].text.\nAbsent means undeclared.\n\nAlso available:\n  function fuzzy(query: string, items: any[], key?: string):\n    Array<{item: any; score: number}>\n  approximate matching, sorted by score; key picks the property to\n  match when items are objects.\n  function console.log(...args: unknown[]): void — debug output,\n  returned under \"logs\".\n\nReturn a value to send results back, and return only the entries you\nneed — the whole catalog can be large.\n\nNot available in this sandbox:\n  require, setTimeout, setInterval, eval, globalThis, process, fetch,\n  URL, TextEncoder, btoa, atob, crypto, performance, console.error,\n  console.warn, callTool.","inputSchema":{"properties":{"code":{"description":"JavaScript to run. catalog is a map: catalog[alias] = { tools: [{ name, qualifiedName, description, inputSchema, outputSchema }] } — iterate with Object.values(catalog).flatMap(s => s.tools). Also available: fuzzy(query, items, key?) for approximate matching, and console.log(). Return a value to send results back, and return only the entries you need — the whole catalog can be large. Read-only — no callTool here.","type":"string"}},"required":["code"],"type":"object"},"name":"pag__explore"},{"description":"Report PAG's own token savings — how many tokens code mode kept out of this client's context. Use it when the user asks about PAG's savings or token counts. The figures are PAG's gateway accounting of pag__execute processing and progressive disclosure: execute savings break down with group_by, disclosure savings are aggregate-only. Returns percent reduction and absolute token counts; pct is signed, and negative means code mode added more context than it kept out. status no_activity means no code-mode activity in the range yet. An execute figure's basis is measured, or apportioned when its net was split proportionally across the entities a call touched.","inputSchema":{"properties":{"group_by":{"description":"Break results down by one or more dimensions. group_by=tool also needs group_by=server; server under scope=all also needs group_by=project; group_by=outcome also needs metric=savings or metric=savings.execute.","items":{"enum":["project","server","tool","kind","outcome"],"type":"string"},"type":"array"},"kind":{"description":"Restrict to gross or net. Omit for both. A restricted response reports token counts with no percent — only one side of the ratio is in scope.","enum":["gross","net"],"type":"string"},"metric":{"default":"savings","description":"Metric family: savings (default — both contributors), savings.execute (in-sandbox processing), or savings.disclosure (progressive disclosure).","enum":["savings","savings.execute","savings.disclosure"],"type":"string"},"outcome":{"description":"Restrict to ok or error — the result of the pag__execute call, not of the downstream tool calls it dispatched. Omit for both. outcome also needs metric=savings or metric=savings.execute: disclosure carries no outcome.","enum":["ok","error"],"type":"string"},"scope":{"default":"this","description":"Project scope: this (default — the project this process serves) or all (every project on the machine).","enum":["this","all"],"type":"string"},"server":{"description":"Restrict to one server alias — counts PAG's code-mode calls to that server. Omit for all servers.","type":"string"},"since":{"description":"Start of the range of PAG's own code-mode activity to report, inclusive: an RFC 3339 timestamp, or a relative duration like 24h meaning that long ago. Default: all retained history.","type":"string"},"source":{"description":"Restrict to one registry source, such as com.example/widgetco — counts PAG's code-mode calls to servers from that source. Omit for all sources.","type":"string"},"until":{"description":"End of the range of PAG's own code-mode activity, exclusive: an RFC 3339 timestamp, or a relative duration like 24h meaning that long ago. Default: now. Counts are kept by the hour, so the read is every hour the range touches, whole. A bound part-way through an hour therefore reads all of that hour. An until exactly on an hour boundary excludes the hour starting there. An until equal to since touches no hour and reads nothing. range.effective states the hours actually read, and its end sent back here reads the same window again.","type":"string"}},"type":"object"},"name":"pag__metrics"},{"description":"Restart a server, regardless of its current state. Use when the user requests a restart or when the server is in a stopped/error state.","inputSchema":{"properties":{"name":{"description":"Server alias","type":"string"}},"required":["name"],"type":"object"},"name":"pag__restart_server"},{"description":"Search configured MCP registries for servers. Omit query to list all available servers. Returns server metadata, required inputs, and whether each server is already enabled.","inputSchema":{"properties":{"limit":{"description":"Max results (default 10)","type":"integer"},"query":{"description":"Search terms (name, description). When omitted or empty, returns all servers up to limit.","type":"string"},"refresh":{"description":"Bypass cache and fetch fresh data (default: false)","type":"boolean"},"registry":{"description":"Registry URL to search (default: all)","type":"string"}},"required":[],"type":"object"},"name":"pag__search_catalog"},{"description":"Retrieve recent stderr output from a server process. Use to diagnose why a server failed to start or is misbehaving.","inputSchema":{"properties":{"lines":{"description":"Number of lines to return (default 20, max 100)","type":"integer"},"server":{"description":"Server alias","type":"string"}},"required":["server"],"type":"object"},"name":"pag__server_logs"},{"description":"Show server health status. With no arguments, returns a summary of all servers. With a server name, returns detailed status including configuration and recent history.","inputSchema":{"properties":{"server":{"description":"Server alias for detailed view","type":"string"}},"type":"object"},"name":"pag__status"}],"ttlMs":0}}}
{"at":"2026-11-22T23:38:10.418Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-22T23:38:10.649Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"completions":{},"logging":{},"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"PAG is a gateway proxying multiple MCP servers. Add and manage servers with PAG's own tools — pag__add_server, pag__enable_server, pag__configure_server, pag__disable_server, pag__restart_server — never by editing MCP config files.\n\nDownstream tools are reached through pag__execute, a sandbox that runs JavaScript with callTool() bound to the proxied tools. Use pag__explore first to search the tool catalog; tool definitions stay server-side and do not enter your context until you choose to return them. Check health with pag__status; a stopped server's real error is usually in pag__server_logs.\n\nDashboard: http://localhost:51550\n\nEnabled servers:\n- ui_builder: ui_builder (12 tools)\n\nWhen the user's task needs a capability no enabled server provides, call pag__discover for recommendations.\n\nNever accept secret values (API keys, tokens, passwords) in chat. Direct users to the dashboard for secret entry.\n\nUI Builder: tools prefixed ui_builder__. Dashboards are React\ncomponents — write .jsx files, no HTML. No CSS frameworks\n(Tailwind, Bootstrap, etc.) — use pag- classes and styles.css.\n\nWorkflow: ui_builder__create_dashboard (requirements: the server\nnames it will call) → ui_builder__get_design_system\n→ write .jsx files to the dashboard directory →\nui_builder__validate_dashboard → open the returned URL. Change the\nserver list, or rebind a name to a different configured server,\nlater: ui_builder__update_dashboard.\n\nSharing a dashboard with another project: ui_builder__export_dashboard.\nReceiving one: ui_builder__import_dashboard — stage, review with the\nuser, then publish. A dashboard with no schema_version predates the\nrequirements manifest and must be upgraded first:\nui_builder__update_dashboard with requirements.\n\nReusable components: .pag/ui-components/. Call\nui_builder__list_components before creating new ones. A dashboard's\nown components/ dir wins over the pool for that dashboard — write a\nfile there to override a shared component.","protocolVersion":"2025-11-25","serverInfo":{"name":"pag","version":"2026.6"}}}}
{"at":"2026-11-22T23:38:10.649Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-22T23:38:10.649Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-22T23:38:10.653Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"cacheScope":"public","tools":[{"description":"Add an MCP server here — never edit MCP config files by hand; PAG writes the config and starts the server. For a stdio server give alias, command and args, e.g. {\"alias\": \"time\", \"command\": \"uvx\", \"args\": [\"mcp-server-time\"]} for a PyPI package or {\"alias\": \"time\", \"command\": \"npx\", \"args\": [\"-y\", \"<npm-package>\"]} for npm; url for a remote HTTP server; image for a container. Use this for servers not in a registry — for registry servers use pag__enable_server.","inputSchema":{"properties":{"alias":{"description":"Config alias for the server","type":"string"},"args":{"description":"Command-line arguments, e.g. [\"mcp-server-time\"] when command is uvx","items":{"type":"string"},"type":"array"},"command":{"description":"Command to run (stdio server), e.g. \"uvx\" for a PyPI package or \"npx\" for npm","type":"string"},"enabled_tools":{"description":"Tool names to force-enable regardless of default","items":{"type":"string"},"type":"array"},"env":{"description":"Environment variables","type":"object"},"image":{"description":"Docker/OCI image (container server)","type":"string"},"json_config":{"description":"Server config object in standard MCP client format (command, url, image, args, env, headers)","type":"object"},"tools_default":{"description":"Default tool visibility for this server (enabled or disabled)","enum":["enabled","disabled"],"type":"string"},"url":{"description":"Endpoint URL (remote HTTP server)","type":"string"}},"required":["alias"],"type":"object"},"name":"pag__add_server"},{"description":"Update inputs, environment variables, arguments, tool filtering, or the pinned version for a server. Deep-merge semantics on the nested inputs tree: omitted keys are left unchanged, null values delete keys. To apply an available update, pass version with the new value. Changes that affect execution trigger a server restart.","inputSchema":{"properties":{"args":{"description":"Full replacement for command-line arguments (custom servers only)","items":{"type":"string"},"type":"array"},"env":{"description":"Merge-patch for environment variables: provided keys are set, null deletes","type":"object"},"inputs":{"description":"Deep merge-patch for [servers.<alias>.inputs] — nested per-input value / variables structure","type":"object"},"name":{"description":"Server alias","type":"string"},"remote":{"description":"Deep merge-patch for [servers.<alias>.remote] — carries variables for remote-transport templating","type":"object"},"tools":{"description":"Full replacement for tool visibility config (default ∈ {enabled,disabled}, enabled and disabled override arrays). Set to null to clear.","type":["object","null"]},"version":{"description":"Re-pin a registry-sourced server to a new version (an exact pin like \"1.2.0\" or a semver range like \"^1.2.0\"). Use the version reported in pag__status update_available to apply an advertised update. Triggers a restart onto the new version. Registry-sourced servers only.","type":"string"}},"required":["name"],"type":"object"},"name":"pag__configure_server"},{"description":"Disable a server for this project. The server stops but its configuration is retained.","inputSchema":{"properties":{"name":{"description":"Server alias","type":"string"}},"required":["name"],"type":"object"},"name":"pag__disable_server"},{"description":"Scan the project directory for technology signals and get recommendations for MCP servers to enable. Call when the user asks what servers would help this project, or when a task needs a capability no enabled server provides.","inputSchema":{"type":"object"},"name":"pag__discover"},{"description":"Enable an MCP server from the registry for this project. Before calling, use pag__search_catalog to learn the server's inputs. Collect non-secret input values (and per-variable overrides for templated inputs) from the user and pass them under the inputs parameter. Writes to project config and starts the server. Blocks until the server reaches a stable state (running or failed). If secrets are missing, returns pag_missing_secrets with a browser URL for secret entry.","inputSchema":{"properties":{"alias":{"description":"Config alias (default: last path component of source)","type":"string"},"env":{"description":"Pre-configure ad-hoc environment variables (not registry-declared) at enable time","type":"object"},"inputs":{"description":"Nested object matching [servers.<alias>.inputs] — per-input value (for non-templated inputs) or variables map (for templated inputs). See RFC 008 §Inputs.","type":"object"},"remote":{"description":"Nested object matching [servers.<alias>.remote] — carries variables for remote-transport templating.","type":"object"},"source":{"description":"Fully-qualified registry name (e.g., com.perforce/blazemeter)","type":"string"}},"required":["source"],"type":"object"},"name":"pag__enable_server"},{"description":"Execute a JavaScript program (the code parameter) that calls\ndownstream MCP tools and returns structured results.\nUse pag__explore first to find tool names and schemas — calls with\nguessed arguments fail. Compose calls in one complete program per goal.\n\nExample — call a tool, return its result:\n  const r = await callTool(\"klocwork__get_issues\", { project: \"myapp\" });\n  const text = r[0].text;\n  return r.structuredContent ?? (text.startsWith(\"{\") || text.startsWith(\"[\") ? JSON.parse(text) : text);\n\ncallTool(qualifiedName, args) is async and returns content items —\nmost tools' result is r[0].text; when the tool declares an\noutputSchema, the pre-parsed typed object is attached as\nr.structuredContent. Prefer it, and return it explicitly:\nreturning the array directly does not carry the property\n(JSON.stringify ignores array properties).\n\nNot every tool replies in JSON. Some — PAG's own ui_builder and\nmanagement tools among them — reply in prose meant to be shown to the\nuser, and r[0].text is then the whole result: read it and return it as\nthe string it is. JSON.parse throws on prose, and an uncaught\nexception loses the whole program including the tool call that\nproduced it; parse only when the text starts with '{' or '['.\n\nOn failure callTool throws an Error whose .message is prefixed with\nthe qualified tool (e.g. \"klocwork__get_issues: <reason>\"); .server\nand .tool carry the alias and qualified name. Use try/catch.\n\nconsole.log() writes debug output, returned under \"logs\".\n\nReturn a value to send results back (JSON-serialized). Async/await\nis supported. Constraints: plain JavaScript only. No TypeScript,\nno imports.\n\nNot available in this sandbox:\n  require, setTimeout, setInterval, eval, globalThis, process, fetch,\n  URL, TextEncoder, btoa, atob, crypto, performance, console.error,\n  console.warn.","inputSchema":{"properties":{"code":{"description":"JavaScript code to execute in the sandbox. Has access to callTool(qualifiedName, args) (async, calls a downstream tool) and console.log(). Use pag__explore first to discover available tools and their qualifiedNames, then compose calls into a program here. Return a value to send structured results back.","type":"string"}},"required":["code"],"type":"object"},"name":"pag__execute"},{"description":"Query the catalog map (alias to tools) via the code parameter\n(JavaScript); read-only — no callTool here. Tool definitions stay\nserver-side until your code returns part of them. Find tools and\ntheir schemas before calling them through pag__execute.\n\nExample — find tools by keyword, return what you need:\n  const tools = Object.values(catalog).flatMap(s => s.tools);\n  const hits = fuzzy(\"issues\", tools, \"description\");\n  return hits.map(h => ({\n    qualifiedName: h.item.qualifiedName,\n    description: h.item.description,\n    inputSchema: h.item.inputSchema\n  }));\n\nCatalog shape (TypeScript notation) — catalog is a map of server\nalias to { tools: [...] }; each tool has\n  const catalog: Record<string, { tools: Array<{\n    name: string;\n    qualifiedName: string;\n    description: string;\n    inputSchema: object;\n    outputSchema?: object;\n  }> }>\nname is unprefixed; qualifiedName is the \"alias__toolname\" form\ncallTool takes in pag__execute.\noutputSchema, when present, describes what callTool returns: the\nstructuredContent object and the JSON in content[0].text.\nAbsent means undeclared.\n\nAlso available:\n  function fuzzy(query: string, items: any[], key?: string):\n    Array<{item: any; score: number}>\n  approximate matching, sorted by score; key picks the property to\n  match when items are objects.\n  function console.log(...args: unknown[]): void — debug output,\n  returned under \"logs\".\n\nReturn a value to send results back, and return only the entries you\nneed — the whole catalog can be large.\n\nNot available in this sandbox:\n  require, setTimeout, setInterval, eval, globalThis, process, fetch,\n  URL, TextEncoder, btoa, atob, crypto, performance, console.error,\n  console.warn, callTool.","inputSchema":{"properties":{"code":{"description":"JavaScript to run. catalog is a map: catalog[alias] = { tools: [{ name, qualifiedName, description, inputSchema, outputSchema }] } — iterate with Object.values(catalog).flatMap(s => s.tools). Also available: fuzzy(query, items, key?) for approximate matching, and console.log(). Return a value to send results back, and return only the entries you need — the whole catalog can be large. Read-only — no callTool here.","type":"string"}},"required":["code"],"type":"object"},"name":"pag__explore"},{"description":"Report PAG's own token savings — how many tokens code mode kept out of this client's context. Use it when the user asks about PAG's savings or token counts. The figures are PAG's gateway accounting of pag__execute processing and progressive disclosure: execute savings break down with group_by, disclosure savings are aggregate-only. Returns percent reduction and absolute token counts; pct is signed, and negative means code mode added more context than it kept out. status no_activity means no code-mode activity in the range yet. An execute figure's basis is measured, or apportioned when its net was split proportionally across the entities a call touched.","inputSchema":{"properties":{"group_by":{"description":"Break results down by one or more dimensions. group_by=tool also needs group_by=server; server under scope=all also needs group_by=project; group_by=outcome also needs metric=savings or metric=savings.execute.","items":{"enum":["project","server","tool","kind","outcome"],"type":"string"},"type":"array"},"kind":{"description":"Restrict to gross or net. Omit for both. A restricted response reports token counts with no percent — only one side of the ratio is in scope.","enum":["gross","net"],"type":"string"},"metric":{"default":"savings","description":"Metric family: savings (default — both contributors), savings.execute (in-sandbox processing), or savings.disclosure (progressive disclosure).","enum":["savings","savings.execute","savings.disclosure"],"type":"string"},"outcome":{"description":"Restrict to ok or error — the result of the pag__execute call, not of the downstream tool calls it dispatched. Omit for both. outcome also needs metric=savings or metric=savings.execute: disclosure carries no outcome.","enum":["ok","error"],"type":"string"},"scope":{"default":"this","description":"Project scope: this (default — the project this process serves) or all (every project on the machine).","enum":["this","all"],"type":"string"},"server":{"description":"Restrict to one server alias — counts PAG's code-mode calls to that server. Omit for all servers.","type":"string"},"since":{"description":"Start of the range of PAG's own code-mode activity to report, inclusive: an RFC 3339 timestamp, or a relative duration like 24h meaning that long ago. Default: all retained history.","type":"string"},"source":{"description":"Restrict to one registry source, such as com.example/widgetco — counts PAG's code-mode calls to servers from that source. Omit for all sources.","type":"string"},"until":{"description":"End of the range of PAG's own code-mode activity, exclusive: an RFC 3339 timestamp, or a relative duration like 24h meaning that long ago. Default: now. Counts are kept by the hour, so the read is every hour the range touches, whole. A bound part-way through an hour therefore reads all of that hour. An until exactly on an hour boundary excludes the hour starting there. An until equal to since touches no hour and reads nothing. range.effective states the hours actually read, and its end sent back here reads the same window again.","type":"string"}},"type":"object"},"name":"pag__metrics"},{"description":"Restart a server, regardless of its current state. Use when the user requests a restart or when the server is in a stopped/error state.","inputSchema":{"properties":{"name":{"description":"Server alias","type":"string"}},"required":["name"],"type":"object"},"name":"pag__restart_server"},{"description":"Search configured MCP registries for servers. Omit query to list all available servers. Returns server metadata, required inputs, and whether each server is already enabled.","inputSchema":{"properties":{"limit":{"description":"Max results (default 10)","type":"integer"},"query":{"description":"Search terms (name, description). When omitted or empty, returns all servers up to limit.","type":"string"},"refresh":{"description":"Bypass cache and fetch fresh data (default: false)","type":"boolean"},"registry":{"description":"Registry URL to search (default: all)","type":"string"}},"required":[],"type":"object"},"name":"pag__search_catalog"},{"description":"Retrieve recent stderr output from a server process. Use to diagnose why a server failed to start or is misbehaving.","inputSchema":{"properties":{"lines":{"description":"Number of lines to return (default 20, max 100)","type":"integer"},"server":{"description":"Server alias","type":"string"}},"required":["server"],"type":"object"},"name":"pag__server_logs"},{"description":"Show server health status. With no arguments, returns a summary of all servers. With a server name, returns detailed status including configuration and recent history.","inputSchema":{"properties":{"server":{"description":"Server alias for detailed view","type":"string"}},"type":"object"},"name":"pag__status"}],"ttlMs":0}}}
