Tools
Built-in Copilot CLI tools are enabled by default. The settings here apply to custom tools.Basic usage
Set tool definitions inSessionConfig.tools.
Tool::define() is a helper equivalent to defineTool in other language SDKs.
For parameters, you can use Laravel’s JSON Schema implementation (also used by Laravel MCP), or pass an array directly.
skipPermission
When you set skipPermission: true, the tool runs without a permission prompt.
$invocation
The second argument of the tool handler, $invocation, includes:
Protocol details
In Protocol v3 (current default), tool calls are broadcast as session events (external_tool.requested) instead of JSON-RPC requests. The SDK handles this internally and responds with the session.tools.handlePendingToolCall RPC.
You do not need to change how you use SessionConfig. Pass definitions in tools, and the SDK handles protocol differences.
Converting MCP CallToolResult
To convert an MCP server tool result (CallToolResult) into Copilot SDK ToolResultObject, use McpCallToolResult::convert().
MCP results contain content blocks such as text, image, and resource, but Copilot SDK expects ToolResultObject.
For the latest updates, see the GitHub repository.