Class ToolDef

java.lang.Object
com.github.copilot.sdk.json.ToolDef

public final class ToolDef extends Object
Low-level tool definition for JSON-RPC communication.

This is an internal class representing the wire format of a tool. For registering tools with the SDK, use ToolDefinition instead.

See Also:
  • Constructor Details

    • ToolDef

      public ToolDef()
      Creates an empty tool definition.
    • ToolDef

      public ToolDef(String name, String description, Object parameters)
      Creates a tool definition with all fields.
      Parameters:
      name - the unique tool identifier
      description - the tool description
      parameters - the JSON Schema for tool parameters
  • Method Details

    • getName

      public String getName()
      Gets the tool name.
      Returns:
      the tool name
    • setName

      public void setName(String name)
      Sets the tool name.
      Parameters:
      name - the tool name
    • getDescription

      public String getDescription()
      Gets the tool description.
      Returns:
      the tool description
    • setDescription

      public void setDescription(String description)
      Sets the tool description.
      Parameters:
      description - the tool description
    • getParameters

      public Object getParameters()
      Gets the JSON Schema for tool parameters.
      Returns:
      the parameters schema
    • setParameters

      public void setParameters(Object parameters)
      Sets the JSON Schema for tool parameters.
      Parameters:
      parameters - the parameters schema