mcp.schema.result

Members list

Type members

Classlikes

final case class CallToolResult(content: List[Content], isError: Option[Boolean]) extends Result

The server's response to a tool call.

The server's response to a tool call.

Any errors that originate from the tool SHOULD be reported inside the result object, with isError set to true, not as an MCP protocol-level error response. Otherwise, the LLM would not be able to see that an error occurred and self-correct.

However, any errors in finding the tool, an error indicating that the server does not support tool calls, or any other exceptional conditions, should be reported as an MCP error response.

Attributes

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

Attributes

Companion
class
Source
CallToolResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CompleteResult(values: List[String], total: Option[Int], hasMore: Option[Boolean]) extends Result

The server's response to a completion/complete request

The server's response to a completion/complete request

Attributes

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

Attributes

Companion
class
Source
CompleteResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CreateMessageResult(model: String, stopReason: Option[StopReason], role: Role, content: Content) extends Result, SamplingMessage

The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.

The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.

Attributes

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

Attributes

Companion
class
Source
CreateMessageResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class GetPromptResult(description: Option[String], messages: List[PromptMessage]) extends Result

The server's response to a prompts/get request from the client.

The server's response to a prompts/get request from the client.

Attributes

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

Attributes

Companion
class
Source
GetPromptResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class InitializeResult(protocolVersion: String, capabilities: ServerCapabilities, serverInfo: Implementation, instructions: Option[String]) extends Result

After receiving an initialize request from the client, the server sends this response.

After receiving an initialize request from the client, the server sends this response.

Attributes

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

Attributes

Companion
class
Source
InitializeResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ListPromptsResult(prompts: List[Prompt], nextCursor: Option[Cursor]) extends PaginatedResult

The server's response to a prompts/list request from the client.

The server's response to a prompts/list request from the client.

Attributes

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

Attributes

Companion
class
Source
ListPromptsResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ListResourceTemplatesResult(resourceTemplates: List[McpResource], nextCursor: Option[Cursor]) extends PaginatedResult

Attributes

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

Attributes

Companion
class
Source
ListResourceTemplatesResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ListResourcesResult(resources: List[McpResource], nextCursor: Option[Cursor]) extends PaginatedResult

Attributes

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

Attributes

Companion
class
Source
ListResourcesResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ListRootsResult(roots: List[Root]) extends Result

The client's response to a roots/list request from the server. This result contains an array of Root objects, each representing a root directory or file that the server can operate on.

The client's response to a roots/list request from the server. This result contains an array of Root objects, each representing a root directory or file that the server can operate on.

Attributes

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

Attributes

Companion
class
Source
ListRootsResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ListToolsResult(tools: List[ToolSchema], nextCursor: Option[Cursor]) extends PaginatedResult

The server's response to a tools/list request from the client.

The server's response to a tools/list request from the client.

Attributes

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

Attributes

Companion
class
Source
ListToolsResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait PaginatedResult extends Result

Attributes

Source
package.scala
Supertypes
trait Result
class Object
trait Matchable
class Any
Known subtypes
final case class ReadResourceResult(contents: List[ResourceContents]) extends Result

The server's response to a resources/read request from the client.

The server's response to a resources/read request from the client.

Attributes

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

Attributes

Companion
class
Source
ReadResourceResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object Result

Attributes

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

Attributes

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

Attributes

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

Attributes

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