Interface ToolDescriptor
- All Superinterfaces:
HasMeta,ServerFeature.Descriptor
Descriptor for a server-provided tool.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable ToolAnnotationsOptional behavioral annotations (e.g. read-only, destructive) for this tool.static ToolDescriptor.Builderbuilder()Creates a new builder forToolDescriptor.default voidcheck()Validates the tool descriptor's name.@Nullable StringOptional description of this tool.@Nullable StringOptional identifier of the extension that owns this tool.icons()Optional icons for this tool.@Nullable JsonSchemaOptional JSON schema describing the tool's input arguments.meta()Optional protocol extension metadata.name()The tool name, unique within the server.static ToolDescriptorCreates a tool descriptor with just a name.static ToolDescriptorCreates a tool descriptor with a name and description.@Nullable JsonSchemaOptional JSON schema describing the tool's output.@Nullable TaskSupportOptional declaration of this tool's support for long-running tasks.@Nullable Stringtitle()Optional human-readable title.
-
Method Details
-
name
String name()The tool name, unique within the server.- Specified by:
namein interfaceServerFeature.Descriptor
-
title
@Nullable String title()Optional human-readable title. -
description
@Nullable String description()Optional description of this tool. -
inputSchema
@Nullable JsonSchema inputSchema()Optional JSON schema describing the tool's input arguments. -
outputSchema
@Nullable JsonSchema outputSchema()Optional JSON schema describing the tool's output. -
taskSupport
@Nullable TaskSupport taskSupport()Optional declaration of this tool's support for long-running tasks. -
annotations
@Nullable ToolAnnotations annotations()Optional behavioral annotations (e.g. read-only, destructive) for this tool. -
icons
Optional icons for this tool. -
extensionId
@Nullable String extensionId()Optional identifier of the extension that owns this tool. -
meta
Optional protocol extension metadata. -
check
@Check default void check()Validates the tool descriptor's name.- Throws:
IllegalArgumentException- if the name is blank
-
builder
Creates a new builder forToolDescriptor. -
of
Creates a tool descriptor with just a name. -
of
Creates a tool descriptor with a name and description.
-