Uses of Record Class
com.github.copilot.rpc.ToolDefinition
Packages that use ToolDefinition
Package
Description
Configuration classes and data transfer objects for the Copilot SDK.
-
Uses of ToolDefinition in com.github.copilot.rpc
Methods in com.github.copilot.rpc that return ToolDefinitionModifier and TypeMethodDescriptionstatic ToolDefinitionToolDefinition.create(String name, String description, Map<String, Object> schema, ToolHandler handler) Creates a tool definition with a JSON schema for parameters.static ToolDefinitionToolDefinition.createOverride(String name, String description, Map<String, Object> schema, ToolHandler handler) Creates a tool definition that overrides a built-in CLI tool.static ToolDefinitionToolDefinition.createSkipPermission(String name, String description, Map<String, Object> schema, ToolHandler handler) Creates a tool definition that skips the permission request.static ToolDefinitionToolDefinition.createWithDefer(String name, String description, Map<String, Object> schema, ToolHandler handler, ToolDefer defer) Creates a tool definition with an explicit deferral mode.Returns a copy with thedefermode set.static <T1,T2, R> ToolDefinition ToolDefinition.from(String name, String description, Param<T1> p1, Param<T2> p2, BiFunction<T1, T2, R> handler) Creates a tool definition with a two-argument synchronous handler.static <T1,R> ToolDefinition Creates a tool definition with a one-argument synchronous handler.static <R> ToolDefinitionCreates a tool definition with a zero-argument synchronous handler.static <T1,T2, R> ToolDefinition ToolDefinition.fromAsync(String name, String description, Param<T1> p1, Param<T2> p2, BiFunction<T1, T2, CompletableFuture<R>> handler) Creates a tool definition with a two-argument asynchronous handler.static <T1,R> ToolDefinition ToolDefinition.fromAsync(String name, String description, Param<T1> p1, Function<T1, CompletableFuture<R>> handler) Creates a tool definition with a one-argument asynchronous handler.static <R> ToolDefinitionToolDefinition.fromAsync(String name, String description, Supplier<CompletableFuture<R>> handler) Creates a tool definition with a zero-argument asynchronous handler.static <T1,R> ToolDefinition ToolDefinition.fromAsyncWithToolInvocation(String name, String description, Param<T1> p1, BiFunction<T1, ToolInvocation, CompletableFuture<R>> handler) Creates a tool definition with a one-argument asynchronous handler that also receives theToolInvocationcontext.static <R> ToolDefinitionToolDefinition.fromAsyncWithToolInvocation(String name, String description, Function<ToolInvocation, CompletableFuture<R>> handler) Creates a tool definition with a zero-argument asynchronous handler that receives theToolInvocationcontext.static <T1,R> ToolDefinition ToolDefinition.fromWithToolInvocation(String name, String description, Param<T1> p1, BiFunction<T1, ToolInvocation, R> handler) Creates a tool definition with a one-argument synchronous handler that also receives theToolInvocationcontext.static <R> ToolDefinitionToolDefinition.fromWithToolInvocation(String name, String description, Function<ToolInvocation, R> handler) Creates a tool definition with a zero-argument synchronous handler that receives theToolInvocationcontext.ToolDefinition.overridesBuiltInTool(boolean value) Returns a copy with theoverridesBuiltInToolflag set.ToolDefinition.skipPermission(boolean value) Returns a copy with theskipPermissionflag set.Methods in com.github.copilot.rpc that return types with arguments of type ToolDefinitionModifier and TypeMethodDescriptionstatic List<ToolDefinition> Discovers tool definitions from a class with static@CopilotTool-annotated methods.static List<ToolDefinition> ToolDefinition.fromObject(Object instance) Discovers tool definitions from an object whose methods are annotated with@CopilotTool.CreateSessionRequest.getTools()Gets the tools.ResumeSessionConfig.getTools()Gets the custom tools for this session.ResumeSessionRequest.getTools()Gets the tools.SessionConfig.getTools()Gets the custom tools for this session.Method parameters in com.github.copilot.rpc with type arguments of type ToolDefinitionModifier and TypeMethodDescriptionvoidCreateSessionRequest.setTools(List<ToolDefinition> tools) Sets the tools.ResumeSessionConfig.setTools(List<ToolDefinition> tools) Sets custom tools that the assistant can invoke during the session.voidResumeSessionRequest.setTools(List<ToolDefinition> tools) Sets the tools.SessionConfig.setTools(List<ToolDefinition> tools) Sets custom tools that the assistant can invoke during the session. -
Uses of ToolDefinition in com.github.copilot.tool
Methods in com.github.copilot.tool that return types with arguments of type ToolDefinitionModifier and TypeMethodDescriptionCopilotToolMetadataProvider.definitions(T instance, com.fasterxml.jackson.databind.ObjectMapper mapper) Returns tool definitions for the given instance.