Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- addContent(ContentBlock) - Method in interface org.mcpjava.server.tools.ToolResponse.Builder
-
Add some unstructured content to the response
- addContents(ResourceContents) - Method in interface org.mcpjava.server.resources.ResourceResponse.Builder
-
Add a content object to the response.
- addMessage(Role, ContentBlock) - Method in interface org.mcpjava.server.prompts.PromptResponse.Builder
-
Add a message to the result
- addSize(int, int) - Method in interface org.mcpjava.server.Icon.Builder
-
Adds a size that this icon can be displayed at.
- addTextContent(String) - Method in interface org.mcpjava.server.tools.ToolResponse.Builder
-
Create a text content block from a string and add it to the response
- addValue(String) - Method in interface org.mcpjava.server.completion.CompletionResult.Builder
-
Adds a value to the list of completion suggestions.
- addValues(Collection<String>) - Method in interface org.mcpjava.server.completion.CompletionResult.Builder
-
Adds a collection of values to the list of completion suggestions.
- advance(BigDecimal) - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Advances the progress by the specified value and sends a notification asynchronously.
- advanceAndForget() - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Advances the progress by the default step and sends a notification without waiting.
- advanceAndForget(double) - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Advances the progress by the specified value and sends a notification without waiting.
- advanceAndForget(long) - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Advances the progress by the specified value and sends a notification without waiting.
- advanceAndForget(BigDecimal) - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Advances the progress by the specified value and sends a notification without waiting.
- annotations() - Method in interface org.mcpjava.server.content.AudioContent
-
Optional annotations for the client
- annotations() - Method in interface org.mcpjava.server.content.EmbeddedResource
-
Optional annotations for the client
- annotations() - Method in interface org.mcpjava.server.content.ImageContent
-
Optional annotations for the client
- annotations() - Method in interface org.mcpjava.server.content.ResourceLink
-
Optional annotations for the client
- annotations() - Method in interface org.mcpjava.server.content.TextContent
-
Optional annotations for the client
- annotations() - Element in annotation interface org.mcpjava.server.resources.Resource
-
Optional annotations for the client.
- annotations() - Element in annotation interface org.mcpjava.server.resources.ResourceTemplate
-
Optional annotations for the client.
- annotations() - Element in annotation interface org.mcpjava.server.tools.Tool
-
Behavioral hints and annotations for this tool.
- Annotations - Interface in org.mcpjava.server.content
-
Annotations for content and resources to provide additional information
- Annotations.Builder - Interface in org.mcpjava.server.content
-
Builder for resource annotations
- annotationsBuilder() - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new builder for an
Annotations - asInteger() - Method in interface org.mcpjava.server.progress.ProgressToken
-
Gets the token value as a number.
- ASSISTANT - Enum constant in enum class org.mcpjava.server.Role
- asString() - Method in interface org.mcpjava.server.progress.ProgressToken
-
Gets the token value as a string.
- audience() - Method in interface org.mcpjava.server.content.Annotations
-
The intended audience for the data or object
- audience() - Element in annotation interface org.mcpjava.server.resources.Resource.Annotations
-
The intended audience for this resource.
- AudioContent - Interface in org.mcpjava.server.content
-
Audio data content
- AudioContent.Builder - Interface in org.mcpjava.server.content
-
Builder for creating audio contents
- audioContentBuilder(byte[], String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new builder for an
AudioContent
B
- blob() - Method in interface org.mcpjava.server.resources.BlobResourceContents
-
The binary data of the resource.
- blobEmbeddedResourceBuilder(byte[], String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new builder for an
EmbeddedResourcewithBlobResourceContents - BlobResourceContents - Interface in org.mcpjava.server.resources
-
The content of a resource which contains binary data.
- BlobResourceContents.Builder - Interface in org.mcpjava.server.resources
-
Builder for creating binary resource contents.
- blobResourceContentsBuilder(String, byte[]) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a builder for a
BlobResourceContents - BOOLEAN - Enum constant in enum class org.mcpjava.server.MetaField.Type
-
Boolean value.
- build() - Method in interface org.mcpjava.server.completion.CompletionResult.Builder
-
Builds the new completion result.
- build() - Method in interface org.mcpjava.server.content.Annotations.Builder
-
Builds the resource annotations
- build() - Method in interface org.mcpjava.server.content.AudioContent.Builder
-
Builds the audio content
- build() - Method in interface org.mcpjava.server.content.EmbeddedResource.Builder
-
Builds the embedded resource content
- build() - Method in interface org.mcpjava.server.content.ImageContent.Builder
-
Builds the image content
- build() - Method in interface org.mcpjava.server.content.ResourceLink.Builder
-
Builds the resource link content
- build() - Method in interface org.mcpjava.server.content.TextContent.Builder
-
Builds the text content
- build() - Method in interface org.mcpjava.server.Icon.Builder
-
Builds the icon
- build() - Method in interface org.mcpjava.server.progress.ProgressNotification.Builder
-
Builds the progress notification.
- build() - Method in interface org.mcpjava.server.progress.ProgressTracker.Builder
-
Builds the progress tracker.
- build() - Method in interface org.mcpjava.server.prompts.PromptResponse.Builder
-
Builds the prompt response
- build() - Method in interface org.mcpjava.server.resources.BlobResourceContents.Builder
-
Builds the resource content object.
- build() - Method in interface org.mcpjava.server.resources.ResourceResponse.Builder
-
Builds the resource read response
- build() - Method in interface org.mcpjava.server.resources.TextResourceContents.Builder
-
Builds the resource content object.
- build() - Method in interface org.mcpjava.server.tools.ToolResponse.Builder
-
Builds the tool response
- builder() - Static method in interface org.mcpjava.server.completion.CompletionResult
-
Create a new builder for a
CompletionResult. - builder() - Static method in interface org.mcpjava.server.content.Annotations
-
Creates a new builder for
Annotations - builder() - Static method in interface org.mcpjava.server.prompts.PromptResponse
-
Create a builder for a new
PromptResponse - builder() - Static method in interface org.mcpjava.server.resources.ResourceResponse
-
Create a builder for a
ResourceResponse - builder() - Static method in interface org.mcpjava.server.tools.ToolResponse
-
Create a builder for a new
ToolResponse - builder(byte[], String) - Static method in interface org.mcpjava.server.content.AudioContent
-
Creates a new builder for an
AudioContent - builder(byte[], String) - Static method in interface org.mcpjava.server.content.EmbeddedResource
-
Creates a new builder for an
EmbeddedResourcewithBlobResourceContents - builder(byte[], String) - Static method in interface org.mcpjava.server.content.ImageContent
-
Creates a new builder for an
ImageContent - builder(String) - Static method in interface org.mcpjava.server.content.TextContent
-
Creates a new builder for a
TextContent - builder(String) - Static method in interface org.mcpjava.server.Icon
-
Creates a builder for an
Icon. - builder(String, byte[]) - Static method in interface org.mcpjava.server.resources.BlobResourceContents
-
Creates a builder for a
BlobResourceContents - builder(String, String) - Static method in interface org.mcpjava.server.content.EmbeddedResource
-
Creates a new builder for an
EmbeddedResourcewithTextResourceContents - builder(String, String) - Static method in interface org.mcpjava.server.content.ResourceLink
-
Creates a new builder for a
ResourceLink - builder(String, String) - Static method in interface org.mcpjava.server.resources.TextResourceContents
-
Creates a builder for a
TextResourceContents
C
- Cancellation - Interface in org.mcpjava.server
-
Interface for determining if an MCP client requested cancellation of an in-progress request.
- Cancellation.OperationCancelledException - Exception Class in org.mcpjava.server
-
Exception indicating that an MCP request cannot be completed because it was cancelled by the client.
- Cancellation.Result - Interface in org.mcpjava.server
-
Result of a cancellation check.
- check() - Method in interface org.mcpjava.server.Cancellation
-
Perform the cancellation check.
- clientInfo() - Method in interface org.mcpjava.server.McpRequest
-
Gets the description of the client, as sent by the client itself
- Common APIs - Search tag in Overview
- Section
- CompleteArg - Annotation Interface in org.mcpjava.server.completion
-
Customizes the name of a completed argument in a completion method.
- CompletePrompt - Annotation Interface in org.mcpjava.server.completion
-
Marks a method as providing completion suggestions for a prompt argument.
- CompleteResourceTemplate - Annotation Interface in org.mcpjava.server.completion
-
Marks a method as providing completion suggestions for a resource template URI expression.
- completeResultBuilder() - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Create a new builder for a
CompletionResult. - CompletionContext - Interface in org.mcpjava.server.completion
-
Provides access to values for other arguments that the user has already completed
- CompletionResult - Interface in org.mcpjava.server.completion
-
The result of a completion request, listing the possible completion values for a variable.
- CompletionResult.Builder - Interface in org.mcpjava.server.completion
-
Builder for creation completion responses.
- content() - Method in interface org.mcpjava.server.prompts.PromptMessage
-
The message content
- content() - Method in interface org.mcpjava.server.tools.ToolResponse
-
The unstructured result data.
- ContentBlock - Interface in org.mcpjava.server.content
-
Data included in a resource, prompt response, or tool response.
- ContentEncoder<T> - Interface in org.mcpjava.server
-
Encodes an object into MCP content.
D
- DARK - Enum constant in enum class org.mcpjava.server.Icon.Theme
-
Indicates this icon is appropriate for use with a dark background
- data() - Method in interface org.mcpjava.server.content.AudioContent
-
Returns the audio data
- data() - Method in interface org.mcpjava.server.content.ImageContent
-
Returns the image data
- DEFAULT - Static variable in annotation interface org.mcpjava.server.McpServer
-
Constant value for the name of the default server.
- defaultValue() - Element in annotation interface org.mcpjava.server.prompts.PromptArg
-
Default value for this argument when not provided.
- defaultValue() - Element in annotation interface org.mcpjava.server.tools.ToolArg
-
Default value for this parameter when not provided by the client.
- Defining server features - Search tag in Overview
- Section
- description() - Method in interface org.mcpjava.server.content.ResourceLink
-
A description of the linked resource.
- description() - Method in interface org.mcpjava.server.ImplementationInfo
-
Returns a human readable description of the implementation
- description() - Element in annotation interface org.mcpjava.server.prompts.Prompt
-
A human-readable description of what this prompt does.
- description() - Element in annotation interface org.mcpjava.server.prompts.PromptArg
-
A human-readable description of the argument.
- description() - Method in interface org.mcpjava.server.prompts.PromptResponse
-
A description of the prompt
- description() - Element in annotation interface org.mcpjava.server.resources.Resource
-
A description of what this resource represents.
- description() - Element in annotation interface org.mcpjava.server.resources.ResourceTemplate
-
A description of what this resource template represents.
- description() - Element in annotation interface org.mcpjava.server.tools.Tool
-
A human-readable description of what the tool does.
- description() - Element in annotation interface org.mcpjava.server.tools.ToolArg
-
A human-readable description of the parameter.
- destructiveHint() - Element in annotation interface org.mcpjava.server.tools.Tool.Annotations
-
If true, this tool may perform destructive updates to its environment.
E
- ELEMENT_NAME - Static variable in annotation interface org.mcpjava.server.completion.CompleteArg
-
Constant value for
CompleteArg.name()indicating that the annotated element's name should be used as-is. - ELEMENT_NAME - Static variable in annotation interface org.mcpjava.server.prompts.Prompt
-
Constant value for
Prompt.name()indicating that the annotated element's name should be used as-is. - ELEMENT_NAME - Static variable in annotation interface org.mcpjava.server.prompts.PromptArg
-
Constant value for
PromptArg.name()indicating that the annotated element's name should be used as-is. - ELEMENT_NAME - Static variable in annotation interface org.mcpjava.server.resources.Resource
-
Constant value for
Resource.name()indicating that the annotated element's name should be used as-is. - ELEMENT_NAME - Static variable in annotation interface org.mcpjava.server.resources.ResourceTemplate
-
Constant value for
ResourceTemplate.name()indicating that the annotated element's name should be used as-is. - ELEMENT_NAME - Static variable in annotation interface org.mcpjava.server.resources.ResourceTemplateArg
-
Constant value for
ResourceTemplateArg.name()indicating that the annotated element's name should be used as-is. - ELEMENT_NAME - Static variable in annotation interface org.mcpjava.server.tools.Tool
-
Constant value for
Tool.name()indicating that the annotated element's name should be used as-is. - ELEMENT_NAME - Static variable in annotation interface org.mcpjava.server.tools.ToolArg
-
Constant value for
ToolArg.name()indicating that the annotated element's name should be used as-is. - EmbeddedResource - Interface in org.mcpjava.server.content
-
Embedded resource content.
- EmbeddedResource.Builder - Interface in org.mcpjava.server.content
-
Builder for an embedded resource
- encode(T) - Method in interface org.mcpjava.server.ContentEncoder
-
Encode the given object into MCP content.
- Example - Search tag in interface org.mcpjava.server.completion.CompletionContext
- Section
F
- FeatureType - Enum Class in org.mcpjava.server
-
The types of features that an MCP server implemented with this API can provide.
- Framework-Agnostic Design - Search tag in Overview
- Section
G
- getArgument(String) - Method in interface org.mcpjava.server.completion.CompletionContext
-
Returns the value assigned to the named argument, if the user has provided it.
- getContents() - Method in interface org.mcpjava.server.resources.ResourceResponse
-
The resource contents.
- getIcons(FeatureType, String) - Method in interface org.mcpjava.server.IconProvider
-
Returns a list of icons for an MCP server feature.
- getSPI() - Static method in class org.mcpjava.server.spi.McpServerSPILoader
-
Returns
McpServerSPI, loading it if necessary. - getType() - Method in interface org.mcpjava.server.ContentEncoder
-
Returns the type this encoder handles.
H
- hasMore() - Method in interface org.mcpjava.server.completion.CompletionResult
-
Returns whether or not there are more suggestions than are included in
CompletionResult.values(), if known.
I
- Icon - Interface in org.mcpjava.server
-
Represents an icon that can be associated with tools, resources, or prompts.
- Icon.Builder - Interface in org.mcpjava.server
-
Builder for creating icons.
- Icon.Theme - Enum Class in org.mcpjava.server
-
The theme for an icon
- iconBuilder(String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a builder for a new
Icon - iconProvider() - Element in annotation interface org.mcpjava.server.Icons
-
The icon provider to use to retrieve icons for the annotated element
- IconProvider - Interface in org.mcpjava.server
-
Provides icons for a prompt, resource, or tool.
- icons() - Method in interface org.mcpjava.server.ImplementationInfo
-
Returns a list of icons for this implementation, may be empty
- Icons - Annotation Interface in org.mcpjava.server
-
Indicates an
IconProviderwhich can provide icons for the annotated Tool, Resource, Resource Template or Prompt. - id() - Method in interface org.mcpjava.server.McpRequest
- idempotentHint() - Element in annotation interface org.mcpjava.server.tools.Tool.Annotations
-
If true, calling the tool repeatedly with the same arguments will have no additional effect on its environment (safe to retry).
- ImageContent - Interface in org.mcpjava.server.content
-
Image data content
- ImageContent.Builder - Interface in org.mcpjava.server.content
-
Builder for creating image contents
- imageContentBuilder(byte[], String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new builder for an
ImageContent - ImplementationInfo - Interface in org.mcpjava.server
-
Provides information about a client or server MCP implementation
- INT - Enum constant in enum class org.mcpjava.server.MetaField.Type
-
Integer value.
- INTEGER - Enum constant in enum class org.mcpjava.server.progress.ProgressToken.Type
-
Integer/numeric token.
- isError() - Method in interface org.mcpjava.server.tools.ToolResponse
-
Whether or not the tool call resulted in an error.
- isRequested() - Method in interface org.mcpjava.server.Cancellation.Result
-
Gets whether the client wants to cancel an in-progress request
J
- JSON - Enum constant in enum class org.mcpjava.server.MetaField.Type
-
JSON value (complex structure).
L
- lastModified() - Method in interface org.mcpjava.server.content.Annotations
-
When the data or object was last modified
- lastModified() - Element in annotation interface org.mcpjava.server.resources.Resource.Annotations
-
The last modification timestamp in ISO 8601 format.
- LIGHT - Enum constant in enum class org.mcpjava.server.Icon.Theme
-
Indicates this icon is appropriate for use with a light background
M
- McpException - Exception Class in org.mcpjava.server
-
Base exception for MCP-related errors.
- McpException() - Constructor for exception class org.mcpjava.server.McpException
-
Creates a new exception with no detail message.
- McpException(String) - Constructor for exception class org.mcpjava.server.McpException
-
Creates a new exception with the given detail message.
- McpException(String, Throwable) - Constructor for exception class org.mcpjava.server.McpException
-
Creates a new exception with the given detail message and cause.
- McpException(Throwable) - Constructor for exception class org.mcpjava.server.McpException
-
Creates a new exception with the given cause.
- McpRequest - Interface in org.mcpjava.server
-
Provides information about the current request, including the request ID and the metadata fields.
- McpServer - Annotation Interface in org.mcpjava.server
-
Binds features (tools, prompts, resources) to a named MCP server configuration.
- McpServer.McpServers - Annotation Interface in org.mcpjava.server
-
Container annotation for
McpServer - McpServerSPI - Interface in org.mcpjava.server.spi
-
Factory interface for data objects and builders in the API.
- McpServerSPILoader - Class in org.mcpjava.server.spi
-
Provides access to the
McpServerSPIimplementation. - message() - Method in interface org.mcpjava.server.progress.ProgressNotification
-
Gets the progress message.
- messages() - Method in interface org.mcpjava.server.prompts.PromptResponse
-
The prompt messages
- MetaCarrier - Interface in org.mcpjava.server
-
Super-interface for API types which include data in a
_metafield. - MetaCarrier.Builder<THIS> - Interface in org.mcpjava.server
-
Super-interface for builders which can include data in a
_metafield. - metadata() - Method in interface org.mcpjava.server.MetaCarrier
-
Gets the contents of
_meta. - MetaField - Annotation Interface in org.mcpjava.server
-
Adds custom metadata fields to the
_metaobject in MCP definitions. - MetaField.MetaFields - Annotation Interface in org.mcpjava.server
-
Container annotation for multiple
MetaFieldannotations. - MetaField.Type - Enum Class in org.mcpjava.server
-
The type of metadata value.
- mimeType() - Method in interface org.mcpjava.server.content.AudioContent
-
Returns the MIME type of the audio data
- mimeType() - Method in interface org.mcpjava.server.content.ImageContent
-
Returns the MIME type of the image data
- mimeType() - Method in interface org.mcpjava.server.content.ResourceLink
-
The MIME type of the linked resource
- mimeType() - Method in interface org.mcpjava.server.Icon
-
Gets the MIME type
- mimeType() - Element in annotation interface org.mcpjava.server.resources.Resource
-
The MIME type of this resource, if known.
- mimeType() - Method in interface org.mcpjava.server.resources.ResourceContents
-
Returns the MIME type of this resource.
- mimeType() - Element in annotation interface org.mcpjava.server.resources.ResourceTemplate
-
The MIME type of this resource template.
N
- name() - Element in annotation interface org.mcpjava.server.completion.CompleteArg
-
The name of the completed argument.
- name() - Method in interface org.mcpjava.server.content.ResourceLink
-
Returns the name of the resource
- name() - Method in interface org.mcpjava.server.ImplementationInfo
-
Returns the implementation name
- name() - Element in annotation interface org.mcpjava.server.MetaField
-
The name of the metadata field.
- name() - Element in annotation interface org.mcpjava.server.prompts.Prompt
-
The unique name of the prompt.
- name() - Element in annotation interface org.mcpjava.server.prompts.PromptArg
-
The name of the argument.
- name() - Element in annotation interface org.mcpjava.server.resources.Resource
-
The unique name of the resource.
- name() - Element in annotation interface org.mcpjava.server.resources.ResourceTemplate
-
The unique name of the resource template.
- name() - Element in annotation interface org.mcpjava.server.resources.ResourceTemplateArg
-
The name of the URI template variable.
- name() - Element in annotation interface org.mcpjava.server.tools.Tool
-
The unique name of the tool.
- name() - Element in annotation interface org.mcpjava.server.tools.ToolArg
-
The name of the parameter as it appears in the tool's JSON Schema.
- newAudioContent(byte[], String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
AudioContent - newBlobResourceContent(String, byte[]) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
BlobResourceContentswith a URI and data. - newCompleteResult(List<String>) - Static method in interface org.mcpjava.server.completion.CompletionResult
-
Creates a new
CompletionResultwith a list of suggestions that is the complete set of available suggestions. - newCompleteResult(List<String>) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
CompletionResultwith a list of suggestions that is the complete set of available suggestions. - newErrorToolResponse(String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new error
ToolResponsewith a single text content block containing the error message. - newIcon(String, String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
Icon - newImageContent(byte[], String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
ImageContent - newIncompleteResult(List<String>) - Static method in interface org.mcpjava.server.completion.CompletionResult
-
Creates a new
CompletionResultwith a list of suggestions that is not the complete set of available suggestions. - newIncompleteResult(List<String>) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
CompletionResultwith a list of suggestions that is not the complete set of available suggestions. - newPromptResponse(Role, ContentBlock) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Create a new
PromptResponsewith a single message - newResult(List<String>, int) - Static method in interface org.mcpjava.server.completion.CompletionResult
-
Creates a new
CompletionResultwhich includes a list of suggestions and the total number of available suggestions. - newResult(List<String>, int) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
CompletionResultwhich includes a list of suggestions and the total number of available suggestions. - newStructuredToolResponse(Object) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new successful
ToolResponsewith structured content. - newTextContent(String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
TextContent - newTextResourceContents(String, String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
TextResourceContentswith a URI and text. - newTextToolResponse(String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new successful
ToolResponsewith a single text content block. - notificationBuilder() - Method in interface org.mcpjava.server.progress.Progress
-
Creates a builder for a progress notification.
O
- of(byte[], String) - Static method in interface org.mcpjava.server.content.AudioContent
-
Creates a new
AudioContent - of(byte[], String) - Static method in interface org.mcpjava.server.content.ImageContent
-
Creates a new
ImageContent - of(String) - Static method in interface org.mcpjava.server.content.TextContent
-
Creates a new
TextContent - of(String, byte[]) - Static method in interface org.mcpjava.server.resources.BlobResourceContents
-
Creates a new
BlobResourceContentswith a URI and data. - of(String, byte[]) - Static method in interface org.mcpjava.server.resources.ResourceResponse
-
Creates a new
ResourceResponsewith binary content and no MIME type - of(String, byte[], String) - Static method in interface org.mcpjava.server.resources.ResourceResponse
-
Creates a new
ResourceResponsewith binary content and MIME type - of(String, String) - Static method in interface org.mcpjava.server.Icon
-
Creates a new
Icon. - of(String, String) - Static method in interface org.mcpjava.server.resources.ResourceResponse
-
Creates a new
ResourceResponsewith text content and no MIME type - of(String, String) - Static method in interface org.mcpjava.server.resources.TextResourceContents
-
Creates a new
TextResourceContentswith a URI and text. - of(String, String, String) - Static method in interface org.mcpjava.server.resources.ResourceResponse
-
Creates a new
ResourceResponsewith text content and MIME type - of(Role, ContentBlock) - Static method in interface org.mcpjava.server.prompts.PromptResponse
-
Create a new
PromptResponsewith a single message - ofError(String) - Static method in interface org.mcpjava.server.tools.ToolResponse
-
Creates a new error
ToolResponsewith a single text content block containing the error message. - ofStructured(Object) - Static method in interface org.mcpjava.server.tools.ToolResponse
-
Creates a new successful
ToolResponsewith structured content. - ofText(String) - Static method in interface org.mcpjava.server.tools.ToolResponse
-
Creates a new successful
ToolResponsewith a single text content block. - openWorldHint() - Element in annotation interface org.mcpjava.server.tools.Tool.Annotations
-
If true, this tool may interact with an "open world" of external entities.
- OperationCancelledException() - Constructor for exception class org.mcpjava.server.Cancellation.OperationCancelledException
-
Creates a new exception with no detail message.
- OperationCancelledException(String) - Constructor for exception class org.mcpjava.server.Cancellation.OperationCancelledException
-
Creates a new exception with the given detail message.
- org.mcpjava.server - package org.mcpjava.server
-
Core annotations and APIs for building Model Context Protocol (MCP) servers.
- org.mcpjava.server.completion - package org.mcpjava.server.completion
-
Provide auto-completion functionality to the client.
- org.mcpjava.server.content - package org.mcpjava.server.content
-
Content blocks, for inclusion in resources and tool call responses.
- org.mcpjava.server.progress - package org.mcpjava.server.progress
-
Report progress for long-running operations.
- org.mcpjava.server.prompts - package org.mcpjava.server.prompts
-
Define MCP prompts.
- org.mcpjava.server.resources - package org.mcpjava.server.resources
-
Define MCP resources and resource templates.
- org.mcpjava.server.spi - package org.mcpjava.server.spi
-
Mechanism for providing the implementation of the API.
- org.mcpjava.server.tools - package org.mcpjava.server.tools
-
Define MCP tools.
- outputSchemaFrom() - Element in annotation interface org.mcpjava.server.tools.Tool
-
The class to use to generate the output schema for structured content.
P
- Parameters - Search tag in annotation interface org.mcpjava.server.completion.CompletePrompt
- Section
- Parameters - Search tag in annotation interface org.mcpjava.server.completion.CompleteResourceTemplate
- Section
- Parameters - Search tag in annotation interface org.mcpjava.server.prompts.Prompt
- Section
- Parameters - Search tag in annotation interface org.mcpjava.server.resources.Resource
- Section
- Parameters - Search tag in annotation interface org.mcpjava.server.resources.ResourceTemplate
- Section
- Parameters - Search tag in annotation interface org.mcpjava.server.tools.Tool
- Section
- prefix() - Element in annotation interface org.mcpjava.server.MetaField
-
Optional prefix for the metadata key.
- priority() - Method in interface org.mcpjava.server.content.Annotations
-
How important the data is.
- priority() - Element in annotation interface org.mcpjava.server.resources.Resource.Annotations
-
The priority of this resource.
- progress() - Method in interface org.mcpjava.server.progress.ProgressNotification
-
Gets the current progress value.
- progress() - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Gets the current progress value.
- Progress - Interface in org.mcpjava.server.progress
-
Provides access to progress reporting capabilities for MCP requests.
- ProgressNotification - Interface in org.mcpjava.server.progress
-
Represents a
notifications/progressmessage to send to the client. - ProgressNotification.Builder - Interface in org.mcpjava.server.progress
-
Builder for creating progress notifications.
- ProgressToken - Interface in org.mcpjava.server.progress
-
The progress token sent by the client in a request.
- ProgressToken.Type - Enum Class in org.mcpjava.server.progress
-
The type of progress token.
- ProgressTracker - Interface in org.mcpjava.server.progress
-
Tracks progress updates and sends notifications to the client.
- ProgressTracker.Builder - Interface in org.mcpjava.server.progress
-
Builder for creating progress trackers.
- Prompt - Annotation Interface in org.mcpjava.server.prompts
-
Marks a method as providing an MCP prompt template.
- PROMPT - Enum constant in enum class org.mcpjava.server.FeatureType
-
A
Prompt - PromptArg - Annotation Interface in org.mcpjava.server.prompts
-
Configures a parameter of a
Promptmethod. - PromptMessage - Interface in org.mcpjava.server.prompts
-
A single message within a prompt.
- PromptResponse - Interface in org.mcpjava.server.prompts
-
Represents the result of a
prompts/getcall. - PromptResponse.Builder - Interface in org.mcpjava.server.prompts
-
Builder for creating a prompt response
- promptResponseBuilder() - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Create a builder for a new
PromptResponse - protocolVersion() - Method in interface org.mcpjava.server.McpRequest
-
Gets the MCP protocol version in use for this request
- putMetadata(String, Object) - Method in interface org.mcpjava.server.MetaCarrier.Builder
-
Adds a key value pair to the
_metaentry of the object created by this builder. - putResourceMeta(String, Object) - Method in interface org.mcpjava.server.content.EmbeddedResource.Builder
-
Adds a key value pair to the
_metaentry of theresource contents
R
- rawClientCapabilities() - Method in interface org.mcpjava.server.McpRequest
-
Gets the map of capabilities that the client supports
- readOnlyHint() - Element in annotation interface org.mcpjava.server.tools.Tool.Annotations
-
If true, this tool only reads data and does not modify its environment.
- reason() - Method in interface org.mcpjava.server.Cancellation.Result
-
Gets the cancellation reason
- required() - Element in annotation interface org.mcpjava.server.prompts.PromptArg
-
Whether this parameter is required.
- required() - Element in annotation interface org.mcpjava.server.tools.ToolArg
-
Whether this parameter is required.
- resource() - Method in interface org.mcpjava.server.content.EmbeddedResource
-
Returns the resource contents, which may be either
TextResourceContentsorBlobResourceContents - Resource - Annotation Interface in org.mcpjava.server.resources
-
Marks a method as providing an MCP resource.
- RESOURCE - Enum constant in enum class org.mcpjava.server.FeatureType
-
A
Resource - RESOURCE_TEMPLATE - Enum constant in enum class org.mcpjava.server.FeatureType
- Resource.Annotations - Annotation Interface in org.mcpjava.server.resources
-
Nested annotation for resource metadata annotations.
- resourceBlobResponse(String, byte[]) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
ResourceResponsewith binary content and no MIME type - resourceBlobResponse(String, byte[], String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
ResourceResponsewith binary content and the given MIME type - ResourceContents - Interface in org.mcpjava.server.resources
- ResourceContents.Builder<THIS> - Interface in org.mcpjava.server.resources
-
Builder for creating resource contents.
- ResourceLink - Interface in org.mcpjava.server.content
-
Content which links to a resource.
- ResourceLink.Builder - Interface in org.mcpjava.server.content
-
A builder for creating resource link contents
- resourceLinkBuilder(String, String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new builder for a
ResourceLink - ResourceResponse - Interface in org.mcpjava.server.resources
-
The result of a
resources/readrequest. - ResourceResponse.Builder - Interface in org.mcpjava.server.resources
-
Builder for creating resource read responses.
- resourceResponseBuilder() - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Create a builder for a
ResourceResponse - ResourceTemplate - Annotation Interface in org.mcpjava.server.resources
-
Marks a method as providing dynamic MCP resources via URI templates.
- ResourceTemplateArg - Annotation Interface in org.mcpjava.server.resources
-
Configures a parameter of a
ResourceTemplatemethod. - resourceTextResponse(String, String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
ResourceResponsewith text content and no MIME type - resourceTextResponse(String, String, String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new
ResourceResponsewith text content and the given MIME type - Return Type Handling - Search tag in annotation interface org.mcpjava.server.completion.CompletePrompt
- Section
- Return Type Handling - Search tag in annotation interface org.mcpjava.server.completion.CompleteResourceTemplate
- Section
- Return Type Handling - Search tag in annotation interface org.mcpjava.server.prompts.Prompt
- Section
- Return Type Handling - Search tag in annotation interface org.mcpjava.server.resources.Resource
- Section
- Return Type Handling - Search tag in annotation interface org.mcpjava.server.resources.ResourceTemplate
- Section
- Return Type Handling - Search tag in annotation interface org.mcpjava.server.tools.Tool
- Section
- role() - Method in interface org.mcpjava.server.prompts.PromptMessage
-
The message sender
- Role - Enum Class in org.mcpjava.server
-
Indicates the sender or receiver of a message for prompting and sampling, or the audience for a resource
S
- send() - Method in interface org.mcpjava.server.progress.ProgressNotification
-
Sends the progress notification to the client asynchronously.
- sendAndForget() - Method in interface org.mcpjava.server.progress.ProgressNotification
-
Sends the progress notification to the client without waiting for acknowledgment.
- sessionId() - Method in interface org.mcpjava.server.McpRequest
-
Gets the session ID, if the request is part of a session
- setAnnotations(Annotations) - Method in interface org.mcpjava.server.content.AudioContent.Builder
-
Sets the annotations for the content
- setAnnotations(Annotations) - Method in interface org.mcpjava.server.content.EmbeddedResource.Builder
-
Sets the annotations for the content
- setAnnotations(Annotations) - Method in interface org.mcpjava.server.content.ImageContent.Builder
-
Sets the annotations for the content
- setAnnotations(Annotations) - Method in interface org.mcpjava.server.content.ResourceLink.Builder
-
Sets the annotations for the content
- setAnnotations(Annotations) - Method in interface org.mcpjava.server.content.TextContent.Builder
-
Sets the annotations for the content
- setAnySize() - Method in interface org.mcpjava.server.Icon.Builder
-
Sets that the icon may be used at any size.
- setAudience(Set<Role>) - Method in interface org.mcpjava.server.content.Annotations.Builder
-
Sets the intended audience for the content
- setAudience(Role...) - Method in interface org.mcpjava.server.content.Annotations.Builder
-
Sets the intended audience for the content
- setDefaultStep(double) - Method in interface org.mcpjava.server.progress.ProgressTracker.Builder
-
Sets the default step value.
- setDefaultStep(long) - Method in interface org.mcpjava.server.progress.ProgressTracker.Builder
-
Sets the default step value.
- setDescription(String) - Method in interface org.mcpjava.server.content.ResourceLink.Builder
-
Sets the description of this resource
- setDescription(String) - Method in interface org.mcpjava.server.prompts.PromptResponse.Builder
-
Set a description for the prompt
- setError(boolean) - Method in interface org.mcpjava.server.tools.ToolResponse.Builder
-
Sets whether or not the response represents an error
- setHasMore(Boolean) - Method in interface org.mcpjava.server.completion.CompletionResult.Builder
-
Sets whether there are more suggestions available than are added using
CompletionResult.Builder.addValue(String)orCompletionResult.Builder.addValues(Collection). - setLastModified(Instant) - Method in interface org.mcpjava.server.content.Annotations.Builder
-
Sets when the content was last modified.
- setMessage(String) - Method in interface org.mcpjava.server.progress.ProgressNotification.Builder
-
Sets the progress message.
- setMessageBuilder(Function<BigDecimal, String>) - Method in interface org.mcpjava.server.progress.ProgressTracker.Builder
-
Sets a message builder function.
- setMetadata(Map<String, Object>) - Method in interface org.mcpjava.server.MetaCarrier.Builder
-
Sets the metadata, replacing any previously added metadata entries.
- setMimeType(String) - Method in interface org.mcpjava.server.content.EmbeddedResource.Builder
-
Sets the MIME type of the embedded resource
- setMimeType(String) - Method in interface org.mcpjava.server.content.ResourceLink.Builder
-
Sets the MIME type of this resource, if known
- setMimeType(String) - Method in interface org.mcpjava.server.Icon.Builder
-
Sets the MIME type of the icon
- setMimeType(String) - Method in interface org.mcpjava.server.resources.ResourceContents.Builder
-
Sets the MIME type of the resource
- setPriority(double) - Method in interface org.mcpjava.server.content.Annotations.Builder
-
Sets the priority of the content to indicate its importance.
- setProgress(double) - Method in interface org.mcpjava.server.progress.ProgressNotification.Builder
-
Sets the current progress value.
- setProgress(long) - Method in interface org.mcpjava.server.progress.ProgressNotification.Builder
-
Sets the current progress value.
- setSize(long) - Method in interface org.mcpjava.server.content.ResourceLink.Builder
-
Sets the size of the resource content
- setStructuredContent(Object) - Method in interface org.mcpjava.server.tools.ToolResponse.Builder
-
Sets the structured content of the response
- setTheme(Icon.Theme) - Method in interface org.mcpjava.server.Icon.Builder
-
Sets the theme that this icon is designed for.
- setTitle(String) - Method in interface org.mcpjava.server.content.ResourceLink.Builder
-
Sets the human-friendly name for this resource
- setTotal(double) - Method in interface org.mcpjava.server.progress.ProgressNotification.Builder
-
Sets the total expected value.
- setTotal(double) - Method in interface org.mcpjava.server.progress.ProgressTracker.Builder
-
Sets the expected total value.
- setTotal(int) - Method in interface org.mcpjava.server.completion.CompletionResult.Builder
-
Sets the total number of suggestions available.
- setTotal(long) - Method in interface org.mcpjava.server.progress.ProgressNotification.Builder
-
Sets the total expected value.
- setTotal(long) - Method in interface org.mcpjava.server.progress.ProgressTracker.Builder
-
Sets the expected total value.
- size() - Method in interface org.mcpjava.server.content.ResourceLink
-
The size of the resource content, if known
- size() - Element in annotation interface org.mcpjava.server.resources.Resource
-
The size of the raw resource content, in bytes (before base64 encoding or any tokenization), if known.
- sizes() - Method in interface org.mcpjava.server.Icon
-
Gets the sizes available for this icon
- skipProcessingIfCancelled() - Method in interface org.mcpjava.server.Cancellation
-
Perform the check and if cancellation is requested then skip the processing.
- src() - Method in interface org.mcpjava.server.Icon
-
Gets the source URI
- step() - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Gets the default step value used by
ProgressTracker.advanceAndForget(). - STRING - Enum constant in enum class org.mcpjava.server.MetaField.Type
-
String value.
- STRING - Enum constant in enum class org.mcpjava.server.progress.ProgressToken.Type
-
String token.
- structuredContent() - Element in annotation interface org.mcpjava.server.tools.Tool
-
If set to
true, the method return value is converted to JSON and used as structured content in the result. - structuredContent() - Method in interface org.mcpjava.server.tools.ToolResponse
-
The structured response data.
T
- text() - Method in interface org.mcpjava.server.content.TextContent
-
Returns the text
- text() - Method in interface org.mcpjava.server.resources.TextResourceContents
-
The text data in the resource.
- TextContent - Interface in org.mcpjava.server.content
-
Text content
- TextContent.Builder - Interface in org.mcpjava.server.content
-
Builder for creating text contents
- textContentBuilder(String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new builder for a
TextContent - textEmbeddedResourceBuilder(String, String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a new builder for an
EmbeddedResourcewithTextResourceContents - TextResourceContents - Interface in org.mcpjava.server.resources
-
The content of a resource which contains text data.
- TextResourceContents.Builder - Interface in org.mcpjava.server.resources
-
Builder for creating text resource contents.
- textResourceContentsBuilder(String, String) - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Creates a builder for a
TextResourceContents - theme() - Method in interface org.mcpjava.server.Icon
-
The theme for this icon
- title() - Method in interface org.mcpjava.server.content.ResourceLink
-
Returns a human-friendly name for the resource.
- title() - Method in interface org.mcpjava.server.ImplementationInfo
-
Returns a human-readable name for the implementation
- title() - Element in annotation interface org.mcpjava.server.prompts.Prompt
-
A human-readable title for the prompt.
- title() - Element in annotation interface org.mcpjava.server.prompts.PromptArg
-
A human-readable title for the argument.
- title() - Element in annotation interface org.mcpjava.server.resources.Resource
-
A human-readable title for the resource.
- title() - Element in annotation interface org.mcpjava.server.resources.ResourceTemplate
-
A human-readable title for the resource template.
- title() - Element in annotation interface org.mcpjava.server.tools.Tool.Annotations
-
A human-readable title for the tool.
- title() - Element in annotation interface org.mcpjava.server.tools.Tool
-
A human-readable title for the tool.
- token() - Method in interface org.mcpjava.server.progress.Progress
-
Gets the progress token if present in the request.
- token() - Method in interface org.mcpjava.server.progress.ProgressNotification
-
Gets the original progress token from the request.
- token() - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Gets the original progress token from the request.
- Tool - Annotation Interface in org.mcpjava.server.tools
-
Marks a method as an MCP tool that can be invoked by clients.
- TOOL - Enum constant in enum class org.mcpjava.server.FeatureType
-
A
Tool - Tool.Annotations - Annotation Interface in org.mcpjava.server.tools
-
Nested annotation for tool behavioral hints.
- ToolArg - Annotation Interface in org.mcpjava.server.tools
-
Configures a parameter of a
Toolmethod. - ToolResponse - Interface in org.mcpjava.server.tools
-
The response to a tool call
- ToolResponse.Builder - Interface in org.mcpjava.server.tools
-
Builder for creating tool responses
- toolResponseBuilder() - Method in interface org.mcpjava.server.spi.McpServerSPI
-
Create a builder for a new
ToolResponse - total() - Method in interface org.mcpjava.server.completion.CompletionResult
-
Returns the total number of suggestions available, if known.
- total() - Method in interface org.mcpjava.server.progress.ProgressNotification
-
Gets the total expected value for the operation.
- total() - Method in interface org.mcpjava.server.progress.ProgressTracker
-
Gets the expected total value.
- trackerBuilder() - Method in interface org.mcpjava.server.progress.Progress
-
Creates a builder for a progress tracker.
- type() - Element in annotation interface org.mcpjava.server.MetaField
-
The type of the metadata value.
- type() - Method in interface org.mcpjava.server.progress.ProgressToken
-
Gets the type of this progress token.
U
- uri() - Method in interface org.mcpjava.server.content.ResourceLink
-
The URI of the resource
- uri() - Element in annotation interface org.mcpjava.server.resources.Resource
-
The URI of this resource.
- uri() - Method in interface org.mcpjava.server.resources.ResourceContents
-
Returns the URI of this resource.
- uriTemplate() - Element in annotation interface org.mcpjava.server.resources.ResourceTemplate
-
The Level 1 URI template that can be used to construct resource URIs.
- USER - Enum constant in enum class org.mcpjava.server.Role
V
- value() - Element in annotation interface org.mcpjava.server.completion.CompletePrompt
-
The name of the prompt this completion method is for.
- value() - Element in annotation interface org.mcpjava.server.completion.CompleteResourceTemplate
-
The name of the resource template this completion method is for.
- value() - Element in annotation interface org.mcpjava.server.McpServer.McpServers
- value() - Element in annotation interface org.mcpjava.server.McpServer
-
The name of the server configuration the annotated features are bound to.
- value() - Element in annotation interface org.mcpjava.server.MetaField.MetaFields
-
The metadata fields.
- value() - Element in annotation interface org.mcpjava.server.MetaField
-
The value of the metadata field as a string.
- valueOf(String) - Static method in enum class org.mcpjava.server.FeatureType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.mcpjava.server.Icon.Theme
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.mcpjava.server.MetaField.Type
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.mcpjava.server.progress.ProgressToken.Type
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.mcpjava.server.Role
-
Returns the enum constant of this class with the specified name.
- values() - Method in interface org.mcpjava.server.completion.CompletionResult
-
Returns the list of suggestions (max 100).
- values() - Static method in enum class org.mcpjava.server.FeatureType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.mcpjava.server.Icon.Theme
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.mcpjava.server.MetaField.Type
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.mcpjava.server.progress.ProgressToken.Type
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.mcpjava.server.Role
-
Returns an array containing the constants of this enum class, in the order they are declared.
- version() - Method in interface org.mcpjava.server.ImplementationInfo
-
Returns the implementation version
W
- websiteUrl() - Method in interface org.mcpjava.server.ImplementationInfo
-
Returns the URL of the implementation's website
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form