Tool वैल्यू बनाएँ और उन्हें AgentSdk::defineTool(...) के ज़रिए दें। टूल में ये शामिल हो सकते हैं:
- मॉडल को दिखाए जाने वाले JSON
parameters inputSchema,outputSchemaऔरeventSchemavalidation callbacktimeoutMsऔरexecutecallback- boolean या callback के रूप में
requireApproval - interactive काम के लिए
onToolCalledऔरonResponseReceived nextTurnParamsऔरonError: "return-to-model"
RuntimeContext::$emitProgress और ऐप context के लिए $setContext उपयोग करें।
मानक PHP runtime में tool callback synchronous चलते हैं। इसलिए concurrency और interruption उस PHP process की क्षमताओं पर निर्भर करते हैं जिसमें SDK चलता है।