Class Tool
-
- All Implemented Interfaces:
public final class Tool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTool.BuilderA builder for Tool.
public final classTool.InputSchemaJSON schema for this tool's input.
This defines the shape of the
inputthat your tool accepts and that the model will produce.
-
Method Summary
Modifier and Type Method Description final Tool.InputSchemainputSchema()JSON schema for this tool's input. final Stringname()Name of the tool. final Optional<CacheControlEphemeral>cacheControl()final Optional<String>description()Description of what this tool does. final JsonField<Tool.InputSchema>_inputSchema()JSON schema for this tool's input. final JsonField<String>_name()Name of the tool. final JsonField<CacheControlEphemeral>_cacheControl()final JsonField<String>_description()Description of what this tool does. final Map<String, JsonValue>_additionalProperties()final Toolvalidate()final Tool.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Tool.Builderbuilder()-
-
Method Detail
-
inputSchema
final Tool.InputSchema inputSchema()
JSON schema for this tool's input.
This defines the shape of the
inputthat your tool accepts and that the model will produce.
-
name
final String name()
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
-
cacheControl
final Optional<CacheControlEphemeral> cacheControl()
-
description
final Optional<String> description()
Description of what this tool does.
Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.
-
_inputSchema
final JsonField<Tool.InputSchema> _inputSchema()
JSON schema for this tool's input.
This defines the shape of the
inputthat your tool accepts and that the model will produce.
-
_name
final JsonField<String> _name()
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
-
_cacheControl
final JsonField<CacheControlEphemeral> _cacheControl()
-
_description
final JsonField<String> _description()
Description of what this tool does.
Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final Tool.Builder toBuilder()
-
builder
final static Tool.Builder builder()
-
-
-
-