From bdfda1642f314017934256e1cfac89a91ddc39e4 Mon Sep 17 00:00:00 2001 From: masnwilliams <43387599+masnwilliams@users.noreply.github.com> Date: Fri, 20 Nov 2026 23:05:45 +0000 Subject: [PATCH 1/2] Keep API defaults for opt-in request parameters in MCP tools --- AGENTS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 031c2f55..c18add9a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -85,6 +85,12 @@ Prettier formats the following file types: `*.ts`, `*.js`, `*.json`, `*.md` Model-facing JSON (tool results and resources) is compact: use `jsonResponse` or `JSON.stringify(value)` without indentation. +### Request parameter defaults + +Tools and resources keep the API's defaults for optional request parameters. When the API defaults a parameter off, usually because it adds work or latency (for example `include_cost` on browser get), the tool also defaults it off. Send the parameter only when the caller passes it, and describe the default as off in its `.describe()` text. Resources take no caller parameters, so they never request opt-in data such as cost. + +If existing code turns on a parameter the API defaults off, change it to match the API default and update its description and tests. + ## Project Structure - `src/` - Source code directory From d5fab4e3f65a6db5f3b464a57e8febb5fd1a086f Mon Sep 17 00:00:00 2001 From: masnwilliams <43387599+masnwilliams@users.noreply.github.com> Date: Sun, 22 Nov 2026 20:41:42 +0000 Subject: [PATCH 2/2] Limit the default-off rule to newly added opt-in parameters --- AGENTS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index c18add9a..ac077ce1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -85,11 +85,11 @@ Prettier formats the following file types: `*.ts`, `*.js`, `*.json`, `*.md` Model-facing JSON (tool results and resources) is compact: use `jsonResponse` or `JSON.stringify(value)` without indentation. -### Request parameter defaults +### Opt-in request parameters -Tools and resources keep the API's defaults for optional request parameters. When the API defaults a parameter off, usually because it adds work or latency (for example `include_cost` on browser get), the tool also defaults it off. Send the parameter only when the caller passes it, and describe the default as off in its `.describe()` text. Resources take no caller parameters, so they never request opt-in data such as cost. +When the SDK adds a request parameter that the API defaults off because it adds work or latency (for example `include_cost` on browser get), the tool defaults it off too. Send it only when the caller passes it, and say the default is off in its `.describe()` text. Resources take no caller parameters, so they never send it. This also covers such a parameter that an unmerged coverage update already turned on. -If existing code turns on a parameter the API defaults off, change it to match the API default and update its description and tests. +Keep existing intentional MCP defaults, such as the 24-hour expiry on control live-view URLs. ## Project Structure