Tool values and pass them through AgentSdk::defineTool(...). Tools can include:
- JSON
parametersshown to the model inputSchema,outputSchema, andeventSchemavalidation callablestimeoutMsand anexecutecallback- boolean or callable
requireApproval onToolCalledandonResponseReceivedfor interactive worknextTurnParamsandonError: "return-to-model"
RuntimeContext::$emitProgress for preliminary results and $setContext for application context.
Tool callbacks execute synchronously in the standard PHP runtime. Concurrency and interruption therefore follow the capabilities of the PHP process hosting the SDK.