Skip to content

Tool search configuration support#1933

Open
almaleksia wants to merge 4 commits into
github:mainfrom
almaleksia:add-tool-search-option
Open

Tool search configuration support#1933
almaleksia wants to merge 4 commits into
github:mainfrom
almaleksia:add-tool-search-option

Conversation

@almaleksia

Copy link
Copy Markdown
Contributor

Adding tool_search option to CreateSession/ResumeSession and tool_references as optional field in ToolResult.

@almaleksia almaleksia marked this pull request as ready for review July 7, 2026 14:24
@almaleksia almaleksia requested a review from a team as a code owner July 7, 2026 14:24
Copilot AI review requested due to automatic review settings July 7, 2026 14:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds cross-SDK support for configuring the runtime’s tool-search behavior on session create/resume, and extends tool results to optionally carry tool-search references returned by a tool-search tool.

Changes:

  • Add tool_search/toolSearch session option to CreateSession/ResumeSession across Rust, Python, Node, Go, Java, and .NET SDKs.
  • Add optional tool-search reference metadata to tool results (tool_references/toolReferences) across SDKs.
  • Update tests and request builders/serialization layers to carry the new fields through to the CLI/runtime wire format.
Show a summary per file
File Description
rust/tests/e2e/tool_results.rs Updates E2E test helper to include tool_references in expanded tool results.
rust/src/wire.rs Adds tool_search to create/resume wire payload structs (camelCase on the wire).
rust/src/types.rs Introduces ToolSearchConfig; threads tool_search through SessionConfig/ResumeSessionConfig; adds tool_references to ToolResultExpanded.
rust/src/tool.rs Ensures MCP tool-result conversion initializes tool_references.
rust/src/session.rs Ensures tool failure results initialize tool_references.
python/copilot/tools.py Adds tool_references to ToolResult (needs adjustment to avoid a useless string expression).
python/copilot/session.py Adds ToolSearchConfig TypedDict; forwards tool_references when responding with tool results.
python/copilot/client.py Adds tool_search parameter to create/resume and serializes it to toolSearch wire format.
python/copilot/init.py Exposes ToolSearchConfig from the package API surface.
nodejs/src/types.ts Adds ToolReferences to tool result type; introduces ToolSearchConfig and toolSearch in session config typing.
nodejs/src/index.ts Re-exports ToolSearchConfig.
nodejs/src/client.ts Forwards toolSearch in create/resume session JSON-RPC payloads.
java/src/test/java/com/github/copilot/ToolResultsTest.java Updates tests for the expanded ToolResultObject record signature.
java/src/main/java/com/github/copilot/SessionRequestBuilder.java Forwards toolSearch from config into create/resume requests.
java/src/main/java/com/github/copilot/rpc/ToolSearchConfig.java Adds new RPC model for tool-search configuration.
java/src/main/java/com/github/copilot/rpc/ToolResultObject.java Adds toolReferences field to the record and updates factory methods/docs.
java/src/main/java/com/github/copilot/rpc/SessionConfig.java Adds toolSearch to the Java session config object + clone support.
java/src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java Adds toolSearch to resume request RPC shape.
java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java Adds toolSearch to resume config + clone support.
java/src/main/java/com/github/copilot/rpc/CreateSessionRequest.java Adds toolSearch to create request RPC shape.
go/types.go Adds ToolSearchConfig, threads it through session configs and wire request structs; adds ToolReferences to tool result.
go/session.go Forwards ToolReferences when sending tool results back to the runtime.
go/client.go Forwards ToolSearch into create/resume requests.
dotnet/src/Types.cs Adds ToolReferences to tool result type; introduces ToolSearchConfig and threads it into session config base (doc typo present).
dotnet/src/Client.cs Threads ToolSearch into create/resume request records.

Review details

  • Files reviewed: 25/25 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread python/copilot/tools.py Outdated
Comment thread dotnet/src/Types.cs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants