mcp.schema

package mcp.schema

Members list

Type members

Classlikes

sealed trait Annotated

Base for objects that include optional annotations for the client. The client can use annotations to inform how objects are used or displayed

Base for objects that include optional annotations for the client. The client can use annotations to inform how objects are used or displayed

Attributes

Source
package.scala
Supertypes
class Object
trait Matchable
class Any
final case class Annotations(audience: List[Role], priority: Option[Double])

Optional annotations for the client. The client can use annotations to inform how objects are used or displayed.

Optional annotations for the client. The client can use annotations to inform how objects are used or displayed.

Value parameters

audience

Describes who the intended customer of this object or data is. It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]).

priority

Describes how important this data is for operating the server. A value of 1 means "most important," and indicates that the data is effectively required, while 0 means "least important," and indicates that the data is entirely optional. It is a number between 0 and 1.

Attributes

Companion
object
Source
package.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Annotations

Attributes

Companion
class
Source
package.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ClientCapabilities(experimental: Option[Map[String, Json]], roots: Option[RootCapabilities], sampling: Option[Sampling])

Clients can implement additional features to enrich connected MCP servers with additional capabilities. These capabilities can be used to extend the functionality of the server, or to provide additional information to the server about the client's capabilities.

Clients can implement additional features to enrich connected MCP servers with additional capabilities. These capabilities can be used to extend the functionality of the server, or to provide additional information to the server about the client's capabilities.

Value parameters

experimental

WIP

roots

define the boundaries of where servers can operate within the filesystem, allowing them to understand which directories and files they have access to.

sampling

Provides a standardized way for servers to request LLM sampling (“completions” or “generations”) from language models via clients.

Attributes

Companion
object
Source
ClientCapabilities.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ClientCapabilities.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CompleteArgument(name: String, value: String)

Attributes

Companion
object
Source
CompleteArgument.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
CompleteArgument.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Content

Attributes

Companion
object
Source
Content.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Embedded
class Image
class Text
object Content

Attributes

Companion
trait
Source
Content.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Content.type

Attributes

Companion
object
Source
package.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
enum
Source
package.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object Cursor

Attributes

Source
package.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Cursor.type
case class Description(name: String) extends StaticAnnotation

Attributes

Source
JsonSchema.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Annotation
class Object
trait Matchable
class Any
Show all
object ErrorCodes

Standard error codes used in MCP JSON-RPC responses.

Standard error codes used in MCP JSON-RPC responses.

Attributes

Source
package.scala
Supertypes
class Object
trait Matchable
class Any
Self type
ErrorCodes.type
final case class Implementation(name: String, version: String)

Attributes

Companion
object
Source
Implementation.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
Implementation.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class JSONRPCBatch(requests: List[JSONRPCMessage]) extends JSONRPCMessage

A JSON-RPC batch, as described in https://www.jsonrpc.org/specification#batch.

A JSON-RPC batch, as described in https://www.jsonrpc.org/specification#batch.

Attributes

Companion
object
Source
JSONRPCBatch.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object JSONRPCBatch

Attributes

Companion
class
Source
JSONRPCBatch.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.

Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.

Attributes

Companion
object
Source
JSONRPCMessage.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class JSONRPCBatch
class Error
class Success
Show all

Attributes

Companion
trait
Source
JSONRPCMessage.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class JSONRPCNotification(jsonrpc: String, method: Method, params: Option[Json]) extends JSONRPCMessage

A notification that does not expect a response.

A notification that does not expect a response.

Attributes

Companion
object
Source
JSONRPCNotification.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
JSONRPCNotification.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class JSONRPCRequest(jsonrpc: String, method: Method, id: RequestId, params: Option[Json]) extends JSONRPCMessage, Request

A request that expects a response.

A request that expects a response.

Attributes

Companion
object
Source
JSONRPCRequest.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Request
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
JSONRPCRequest.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

A successful or error response to a request.

A successful or error response to a request.

Attributes

Companion
object
Source
JSONRPCResponse.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Error
class Success

Attributes

Companion
trait
Source
JSONRPCResponse.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait JsonSchema[A]

Attributes

Companion
object
Source
JsonSchema.scala
Supertypes
class Object
trait Matchable
class Any
object JsonSchema

Attributes

Companion
trait
Source
JsonSchema.scala
Supertypes
class Object
trait Matchable
class Any
Self type
JsonSchema.type
enum LoggingLevel(val code: Int, val name: String)

The severity of a log message.

The severity of a log message.

These map to syslog message severities, as specified in RFC-5424: https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1

Attributes

Companion
object
Source
package.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object LoggingLevel

Attributes

Companion
enum
Source
package.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
class McpError(message: String) extends RuntimeException

Represents a Model Control Protocol (MCP) error. This class is used to represent errors that occur during an MCP session.

Represents a Model Control Protocol (MCP) error. This class is used to represent errors that occur during an MCP session.

Value parameters

message

error message

Attributes

See also
Companion
object
Source
McpError.scala
Supertypes
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object McpError

Attributes

Companion
class
Source
McpError.scala
Supertypes
class Object
trait Matchable
class Any
Self type
McpError.type
trait McpResource

Attributes

Companion
object
Source
McpResource.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Static
class Template
object McpResource

Attributes

Companion
trait
Source
McpResource.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object Method

Attributes

Source
package.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Method.type
final case class ModelHint(name: String)

Attributes

Companion
object
Source
package.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ModelHint

Attributes

Companion
class
Source
package.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
ModelHint.type
final case class ModelPreferences(hints: List[ModelHint], costPriority: Double, speedPriority: Double, intelligencePriority: Double)

Attributes

Companion
object
Source
package.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
package.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

A progress token, used to associate progress notifications with the original request.

A progress token, used to associate progress notifications with the original request.

Attributes

Companion
object
Source
package.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ProgressToken

Attributes

Companion
enum
Source
package.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Prompt(name: String, description: String, arguments: List[PromptArgument])

A prompt or prompt template that the server offers.

A prompt or prompt template that the server offers.

Value parameters

arguments

A list of arguments to use for templating the prompt.

description

An optional description of what this prompt provides.

name

The name of the prompt or prompt template.

Attributes

Companion
object
Source
package.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Prompt

Attributes

Companion
class
Source
package.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Prompt.type
final case class PromptArgument(name: String, description: String, required: Boolean)

Describes an argument that a prompt can accept.

Describes an argument that a prompt can accept.

Value parameters

description

A human-readable description of the argument.

name

The name of the argument.

required

Whether this argument must be provided.

Attributes

Companion
object
Source
PromptArgument.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
PromptArgument.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class PromptMessage(role: Role, content: Content)

Describes a message returned as part of a prompt.

Describes a message returned as part of a prompt.

This is similar to SamplingMessage, but also supports the embedding of resources from the MCP server.

Value parameters

content

The content of the message of type Content.

role

The sender or recipient of messages and data in a conversation.

Attributes

Companion
object
Source
PromptMessage.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PromptMessage

Attributes

Companion
class
Source
PromptMessage.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Source
PromptOrResourceReference.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Source
PromptOrResourceReference.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
enum RequestId

A uniquely identifying ID for a request in JSON-RPC.

A uniquely identifying ID for a request in JSON-RPC.

Attributes

Companion
object
Source
package.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object RequestId

Attributes

Companion
enum
Source
package.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
RequestId.type
sealed trait ResourceContents

Attributes

Companion
object
Source
ResourceContents.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Blob
class Text

Attributes

Companion
trait
Source
ResourceContents.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
enum Role

Attributes

Companion
object
Source
package.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Role

Attributes

Companion
enum
Source
package.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Role.type
final case class Root(uri: String, name: Option[String])

Represents a root directory or file that the server can operate on.

Represents a root directory or file that the server can operate on.

Value parameters

name

An optional name for the root. This can be used to provide a human-readable identifier for the root, which may be useful for display purposes or for referencing the root in other parts of the application.

uri

The URI identifying the root. This must start with file:// for now. This restriction may be relaxed in future versions of the protocol to allow other URI schemes.

Attributes

Companion
object
Source
Root.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Root

Attributes

Companion
class
Source
Root.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Root.type
final case class RootCapabilities(listChanged: Boolean)

Roots define the boundaries of where servers can operate within the filesystem, allowing them to understand which directories and files they have access to. Servers can request the list of roots from supporting clients and receive notifications when that list changes.

Roots define the boundaries of where servers can operate within the filesystem, allowing them to understand which directories and files they have access to. Servers can request the list of roots from supporting clients and receive notifications when that list changes.

Value parameters

listChanged

Whether the client would send notification about roots has changed since the last time the server checked.

Attributes

Companion
object
Source
RootCapabilities.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
RootCapabilities.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Sampling()

Provides a standardized way for servers to request LLM sampling ("completions" or "generations") from language models via clients. This flow allows clients to maintain control over model access, selection, and permissions while enabling servers to leverage AI capabilities—with no server API keys necessary. Servers can request text or image-based interactions and optionally include context from MCP servers in their prompts.

Provides a standardized way for servers to request LLM sampling ("completions" or "generations") from language models via clients. This flow allows clients to maintain control over model access, selection, and permissions while enabling servers to leverage AI capabilities—with no server API keys necessary. Servers can request text or image-based interactions and optionally include context from MCP servers in their prompts.

Attributes

Companion
object
Source
package.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Sampling

Attributes

Companion
class
Source
package.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Sampling.type
sealed trait SchemaType[A](`type`: String)

Attributes

Companion
object
Source
SchemaType.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Entity[A]
class SArray[T, S]
class SBinary[A]
class SBoolean[A]
class SDate[A]
class SDateTime[A]
class SInteger[A]
class SNumber[A]
class SOption[T, S]
class SString[A]
Show all
object SchemaType

Attributes

Companion
trait
Source
SchemaType.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
SchemaType.type
final case class ServerCapabilities(experimental: Option[Map[String, Json]], logging: Option[Json], completions: Option[Json], promptsListChanged: Option[Boolean], resourcesSubscribe: Option[Boolean], resourcesListChanged: Option[Boolean], toolsListChanged: Option[Boolean])

Attributes

Companion
object
Source
ServerCapabilities.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ServerCapabilities.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
enum StopReason

Attributes

Companion
object
Source
package.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object StopReason

Attributes

Companion
enum
Source
package.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
StopReason.type
sealed trait Tool[F[_], T] extends ToolSchema

Represents a tool that the server provides. Tools enable servers to expose executable functionality to the system. Through these tools, you can interact with external systems, perform computations, and take actions in the real world.

Represents a tool that the server provides. Tools enable servers to expose executable functionality to the system. Through these tools, you can interact with external systems, perform computations, and take actions in the real world.

Attributes

Companion
object
Source
Tool.scala
Supertypes
trait ToolSchema
class Object
trait Matchable
class Any
object Tool

Attributes

Companion
trait
Source
Tool.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Tool.type
sealed trait ToolSchema

Attributes

Companion
object
Source
Tool.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Tool[F, T]
object ToolSchema

Attributes

Companion
trait
Source
Tool.scala
Supertypes
class Object
trait Matchable
class Any
Self type
ToolSchema.type

Types

opaque type Cursor

An opaque token used to represent a cursor for pagination.

An opaque token used to represent a cursor for pagination.

Attributes

Source
package.scala
opaque type Method

Attributes

Source
package.scala

Value members

Concrete fields

Attributes

Source
package.scala