confirms
@forge/monorepo / backend/src / confirms
Function: confirms()
confirms<
I,O>(spec):Tool<O>
Defined in: backend/src/tools/define.ts:102
A tool that writes somewhere outside this system, and therefore waits for a person.
effect, approvalPolicy and requiresIdempotencyKey are one decision, and this is the word for it. Setting
them individually is three chances to get it wrong, and the failure is silent: effect: "read" on a tool that
posts a message skips the approval gate, carries no idempotency key, and nothing in the build objects, because
read is a valid value and the compiler cannot know what the function does.
Across one package that is a code-review problem. Across the twenty-one toolkit packages docs/23 plans, some
contributed, it is a systemic one — so the safe thing is now shorter to write than the unsafe thing.
Use defineTool directly for a read, or for the rare combination this does not express.
Type Parameters
I
I = unknown
O
O = unknown
Parameters
spec
GatedToolSpec<I, O>
Returns
Tool<O>