Interface PromptDescriptor
- All Superinterfaces:
HasMeta,ServerFeature.Descriptor
Descriptor for a server-provided prompt template.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable List<PromptArgument> Optional arguments accepted by this prompt.static PromptDescriptor.Builderbuilder()Creates a new builder forPromptDescriptor.default voidcheck()Validates the prompt descriptor's name.@Nullable StringOptional description of this prompt.@Nullable StringOptional identifier of the extension that owns this prompt.icons()Optional icons for this prompt.@Nullable JsonSchemaOptional JSON schema describing the prompt's arguments.meta()Optional protocol extension metadata.name()The prompt name, unique within the server.static PromptDescriptorof(String name, @Nullable String description, @Nullable String title, @Nullable List<PromptArgument> arguments, @Nullable JsonSchema inputSchema) Creates a prompt descriptor with the given fields.static PromptDescriptorof(String name, @Nullable String description, @Nullable String title, @Nullable List<PromptArgument> arguments, @Nullable JsonSchema inputSchema, @Nullable List<Icon> icons) Creates a prompt descriptor with the given fields, including icons.static PromptDescriptorCreates a prompt descriptor with just a name and description.@Nullable Stringtitle()Optional human-readable title.
-
Method Details
-
name
String name()The prompt 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 prompt. -
arguments
@Nullable List<PromptArgument> arguments()Optional arguments accepted by this prompt. -
inputSchema
@Nullable JsonSchema inputSchema()Optional JSON schema describing the prompt's arguments. -
icons
Optional icons for this prompt. -
extensionId
@Nullable String extensionId()Optional identifier of the extension that owns this prompt. -
meta
Optional protocol extension metadata. -
check
@Check default void check()Validates the prompt descriptor's name.- Throws:
IllegalArgumentException- if the name is blank
-
builder
Creates a new builder forPromptDescriptor. -
of
static PromptDescriptor of(String name, @Nullable String description, @Nullable String title, @Nullable List<PromptArgument> arguments, @Nullable JsonSchema inputSchema) Creates a prompt descriptor with the given fields. -
of
static PromptDescriptor of(String name, @Nullable String description, @Nullable String title, @Nullable List<PromptArgument> arguments, @Nullable JsonSchema inputSchema, @Nullable List<Icon> icons) Creates a prompt descriptor with the given fields, including icons. -
of
Creates a prompt descriptor with just a name and description.
-