You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 50f4daa
Browse filesBrowse the repository at this point in the historyBrowse files
fix(tools): relabel side-effecting reads and tighten the effect definition
`read` now means the call changes nothing outside Sim: no create, update,
delete, send, post, trigger, enqueue, consume, or mark-read; no job, run,
conversation, history item, or other resource left in an account; no
credit-funded reveal; no external delivery. Usage billing for the call itself
does not count. `write` is anything else, including input-dependent effects.
The definition is stated the same way in ToolEffect, the v2 catalog schema
(and OpenAPI), the source catalog types, check:tool-effects, the skills, and
CLAUDE.md, and no longer promises dry-run behaviour that has not shipped.
54 tools move from read to write: provider jobs and runs (Firecrawl, Bright
Data, Exa, Parallel, You.com research, Harmonic, LogRocket, Coda and Slack
List exports, CloudFormation drift, CloudTrail Lake queries, NetSuite async
batch reads), media generation and transcription that persist in the provider
account (video, image, Higgsfield, ElevenLabs TTS/STS/SFX/isolation/STT,
AssemblyAI), parse runs kept by Extend, Reducto, and Pulse, Apollo people
reveals, Wiza reveals, Icypeas records, ChatCBI conversations, Fivetran setup
tests, Slack reader DMs, Reddit mark-read, RevenueCat get-or-create, and
Upstash EXPIRE/INCR/INCRBY. The five GET tools carry `// tool-effect:`.
check:tool-effects also flags a read tool whose function-valued method can
return PUT, PATCH, or DELETE. Unregistered access ids (model providers) count
as write in the source catalog too, matching the block detail.
charges, triggers, persists, or depends on its params is `write`, and so is anything you are unsure
196
-
of. Classify from the API docs you researched in Step 1; the full rules are in `add-tools` →
193
+
Every tool declares `effect: 'read' | 'write'`. `read` means the call changes nothing outside Sim:
194
+
no create, update, delete, send, post, trigger, enqueue, consume, or mark-read; no job, run,
195
+
conversation, history item, or other resource left in an account; no credit-funded reveal; no
196
+
external delivery (usage billing for the call itself does not count). Anything else, anything that
197
+
depends on its params, and anything you are unsure of is `write`. Classify from the API docs you researched in Step 1; the full rules are in `add-tools` →
197
198
Declaring the effect, and `bun run check:tool-effects` enforces them.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Use the `test-audit` skill whenever you write, change, or review tests; mechanic
59
59
Build order **Tools** → **Block** → **Icon** → optional **Trigger**, from the service's API docs, using `/add-integration` (or `/add-tools`, `/add-block`, `/add-trigger`).
60
60
61
61
-**Tool IDs are `snake_case`** (`service_action`), registered in `tools/registry.ts`; blocks register alphabetically in `blocks/registry-maps.ts`.
62
-
-**Every tool declares `effect: 'read' | 'write'`**, public catalog metadata that dry runs and Assistant trust: `read` only when the documented operation changes nothing outside Sim, `write` for anything that creates, updates, deletes, sends, charges, triggers, persists, or depends on its params, and `write`when unsure (`check:tool-effects`; rules in `/add-tools`).
62
+
-**Every tool declares `effect: 'read' | 'write'`**: `read` only when the call changes nothing outside Sim (no write, send, trigger, or consume, and no job, run, or other resource left in an account; usage billing aside); `write`otherwise, including param-dependent effects and anything uncertain (`check:tool-effects`; rules in `/add-tools`).
63
63
-**Type coercions go in `tools.config.params`** (runs at execution), never `tools.config.tool` (runs at serialization, where `Number()` destroys `<Block.output>` references).
64
64
-**Requests made for a workspace use `outboundFetch`** (`@/lib/core/network/outbound-fetch.server`), never the global `fetch` or another imported `fetch`, so an organization with a dedicated egress gateway keeps its static IPs; `check:organization-egress` enforces this, and a request that rightly goes direct (Sim's own infrastructure, an operator-local server) takes `// egress-direct: <reason>`. AWS SDK clients signing with customer credentials take `organizationAwsRequestHandler()`: no audit catches a missing one, so reviewers check it.
65
65
- A surface listing integrations to a viewer reads `useIntegrationAccess`, never a raw catalog (`check:integration-access`).
Copy file name to clipboardExpand all lines: apps/docs/openapi-v2-resources.json
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -21950,7 +21950,7 @@
21950
21950
"effect": {
21951
21951
"type": "string",
21952
21952
"enum": ["read", "write"],
21953
-
"description": "What running the tool does outside Sim: `read` changes nothing (no create, update, delete, send, charge, or trigger), so a dry run executes it; `write` is anything else, including an effect that depends on the input."
21953
+
"description": "What running the tool does outside Sim. `read` changes nothing there: no create, update, delete, send, post, trigger, enqueue, consume, or mark-read; no job, run, conversation, history item, or other resource left in an account; no credit-funded reveal; no external delivery. Usage billing for the call itself does not count. `write` is anything else, including an effect that depends on the input."
21954
21954
},
21955
21955
"hostedApiKey": {
21956
21956
"type": "string",
@@ -22676,7 +22676,7 @@
22676
22676
"effect": {
22677
22677
"type": "string",
22678
22678
"enum": ["read", "write"],
22679
-
"description": "What running the tool does outside Sim: `read` changes nothing (no create, update, delete, send, charge, or trigger), so a dry run executes it; `write` is anything else, including an effect that depends on the input."
22679
+
"description": "What running the tool does outside Sim. `read` changes nothing there: no create, update, delete, send, post, trigger, enqueue, consume, or mark-read; no job, run, conversation, history item, or other resource left in an account; no credit-funded reveal; no external delivery. Usage billing for the call itself does not count. `write` is anything else, including an effect that depends on the input."
22680
22680
},
22681
22681
"hostedApiKey": {
22682
22682
"type": "string",
@@ -32956,7 +32956,7 @@
32956
32956
}
32957
32957
},
32958
32958
"effect": {
32959
-
"description": "`read` when every tool the block can run changes nothing outside Sim, else `write`. Absent for a block that runs no tool.",
32959
+
"description": "`read` when every tool the block can run changes nothing outside Sim, else `write`. Absent for a block with no `tools.access`.",
32960
32960
"type": "string",
32961
32961
"enum": ["read", "write"]
32962
32962
},
@@ -32969,7 +32969,7 @@
32969
32969
"additionalProperties": {
32970
32970
"type": "string",
32971
32971
"enum": ["read", "write"],
32972
-
"description": "What running the tool does outside Sim: `read` changes nothing (no create, update, delete, send, charge, or trigger), so a dry run executes it; `write` is anything else, including an effect that depends on the input."
32972
+
"description": "What running the tool does outside Sim. `read` changes nothing there: no create, update, delete, send, post, trigger, enqueue, consume, or mark-read; no job, run, conversation, history item, or other resource left in an account; no credit-funded reveal; no external delivery. Usage billing for the call itself does not count. `write` is anything else, including an effect that depends on the input."
Copy file name to clipboardExpand all lines: apps/sim/lib/api/contracts/v2/catalog.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -414,7 +414,7 @@ const v2HostedApiKeySchema = z
414
414
exportconstv2ToolEffectSchema=z
415
415
.enum(['read','write'])
416
416
.describe(
417
-
'What running the tool does outside Sim: `read` changes nothing (no create, update, delete, send, charge, or trigger), so a dry run executes it; `write` is anything else, including an effect that depends on the input.'
417
+
'What running the tool does outside Sim. `read` changes nothing there: no create, update, delete, send, post, trigger, enqueue, consume, or mark-read; no job, run, conversation, history item, or other resource left in an account; no credit-funded reveal; no external delivery. Usage billing for the call itself does not count. `write` is anything else, including an effect that depends on the input.'
0 commit comments