mcp-types-0.1.0: Core types and protocol definitions for the Model Context Protocol (MCP)
Copyright(C) 2025 DPella AB
LicenseMPL-2.0
Maintainermatti@dpella.io, lobo@dpella.io
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

MCP.Types

Description

This module defines the core types used in the Model Context Protocol (MCP), including JSON-RPC message types, client/server capabilities, resources, tools, prompts, and various request/response types.

Synopsis

Basic Types (re-exported from JSONRPC)

newtype RequestId #

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

The JSON-RPC 2.0 specification requires that each request has a unique identifier. The ID can be a string, number, or null value. Numbers SHOULD NOT contain fractional parts.

Constructors

RequestId Value 

Instances

Instances details
FromJSON RequestId 
Instance details

Defined in JSONRPC

ToJSON RequestId 
Instance details

Defined in JSONRPC

Show RequestId 
Instance details

Defined in JSONRPC

Eq RequestId 
Instance details

Defined in JSONRPC

Basic Types

data Role Source #

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

This is used to identify whether content comes from the user or the assistant in prompt messages and sampling requests.

Constructors

User 
Assistant 

Instances

Instances details
FromJSON Role Source # 
Instance details

Defined in MCP.Types

ToJSON Role Source # 
Instance details

Defined in MCP.Types

Generic Role Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep Role 
Instance details

Defined in MCP.Types

type Rep Role = D1 ('MetaData "Role" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "User" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Assistant" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: Role -> Rep Role x #

to :: Rep Role x -> Role #

Show Role Source # 
Instance details

Defined in MCP.Types

Methods

showsPrec :: Int -> Role -> ShowS #

show :: Role -> String #

showList :: [Role] -> ShowS #

Eq Role Source # 
Instance details

Defined in MCP.Types

Methods

(==) :: Role -> Role -> Bool #

(/=) :: Role -> Role -> Bool #

type Rep Role Source # 
Instance details

Defined in MCP.Types

type Rep Role = D1 ('MetaData "Role" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "User" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Assistant" 'PrefixI 'False) (U1 :: Type -> Type))

newtype Cursor Source #

An opaque token used to represent a cursor for pagination.

Used in paginated requests to indicate the starting position for the next set of results. If provided, the server should return results starting after this cursor.

Constructors

Cursor Text 

Instances

Instances details
FromJSON Cursor Source # 
Instance details

Defined in MCP.Types

ToJSON Cursor Source # 
Instance details

Defined in MCP.Types

Show Cursor Source # 
Instance details

Defined in MCP.Types

Eq Cursor Source # 
Instance details

Defined in MCP.Types

Methods

(==) :: Cursor -> Cursor -> Bool #

(/=) :: Cursor -> Cursor -> Bool #

newtype ProgressToken Source #

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

If specified in a request, the caller is requesting out-of-band progress notifications (as represented by notifications/progress). The value is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.

Constructors

ProgressToken Value 

data LoggingLevel Source #

The severity of a log message.

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

Instances

Instances details
FromJSON LoggingLevel Source # 
Instance details

Defined in MCP.Types

ToJSON LoggingLevel Source # 
Instance details

Defined in MCP.Types

Generic LoggingLevel Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep LoggingLevel 
Instance details

Defined in MCP.Types

type Rep LoggingLevel = D1 ('MetaData "LoggingLevel" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (((C1 ('MetaCons "Emergency" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Alert" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Critical" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Notice" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type))))
Show LoggingLevel Source # 
Instance details

Defined in MCP.Types

Eq LoggingLevel Source # 
Instance details

Defined in MCP.Types

Ord LoggingLevel Source # 
Instance details

Defined in MCP.Types

type Rep LoggingLevel Source # 
Instance details

Defined in MCP.Types

type Rep LoggingLevel = D1 ('MetaData "LoggingLevel" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (((C1 ('MetaCons "Emergency" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Alert" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Critical" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Notice" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type))))

Content Types

data Annotations Source #

Optional annotations for the client.

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

Constructors

Annotations 

Fields

  • audience :: Maybe [Role]

    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 :: Maybe Double

    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. Range: 0.0 to 1.0

  • lastModified :: Maybe Text

    The moment the resource was last modified, as an ISO 8601 formatted string. Should be an ISO 8601 formatted string (e.g., "2025-01-12T15:00:58Z"). Examples: last activity timestamp in an open file, timestamp when the resource was attached, etc.

Instances

Instances details
FromJSON Annotations Source # 
Instance details

Defined in MCP.Types

ToJSON Annotations Source # 
Instance details

Defined in MCP.Types

Generic Annotations Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep Annotations 
Instance details

Defined in MCP.Types

type Rep Annotations = D1 ('MetaData "Annotations" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "Annotations" 'PrefixI 'True) (S1 ('MetaSel ('Just "audience") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Role])) :*: (S1 ('MetaSel ('Just "priority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "lastModified") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))
Show Annotations Source # 
Instance details

Defined in MCP.Types

Eq Annotations Source # 
Instance details

Defined in MCP.Types

type Rep Annotations Source # 
Instance details

Defined in MCP.Types

type Rep Annotations = D1 ('MetaData "Annotations" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "Annotations" 'PrefixI 'True) (S1 ('MetaSel ('Just "audience") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Role])) :*: (S1 ('MetaSel ('Just "priority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "lastModified") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

data TextContent Source #

Text provided to or from an LLM.

This represents textual content that can be sent to or received from a language model during conversations.

Constructors

TextContent 

Fields

Instances

Instances details
FromJSON TextContent Source # 
Instance details

Defined in MCP.Types

ToJSON TextContent Source # 
Instance details

Defined in MCP.Types

Generic TextContent Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep TextContent 
Instance details

Defined in MCP.Types

Show TextContent Source # 
Instance details

Defined in MCP.Types

Eq TextContent Source # 
Instance details

Defined in MCP.Types

type Rep TextContent Source # 
Instance details

Defined in MCP.Types

data ImageContent Source #

An image provided to or from an LLM.

Represents image data that can be included in messages to language models that support multimodal input.

Constructors

ImageContent 

Fields

Instances

Instances details
FromJSON ImageContent Source # 
Instance details

Defined in MCP.Types

ToJSON ImageContent Source # 
Instance details

Defined in MCP.Types

Generic ImageContent Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ImageContent 
Instance details

Defined in MCP.Types

Show ImageContent Source # 
Instance details

Defined in MCP.Types

Eq ImageContent Source # 
Instance details

Defined in MCP.Types

type Rep ImageContent Source # 
Instance details

Defined in MCP.Types

data AudioContent Source #

Audio provided to or from an LLM.

Represents audio data that can be included in messages to language models that support audio input.

Constructors

AudioContent 

Fields

Instances

Instances details
FromJSON AudioContent Source # 
Instance details

Defined in MCP.Types

ToJSON AudioContent Source # 
Instance details

Defined in MCP.Types

Generic AudioContent Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep AudioContent 
Instance details

Defined in MCP.Types

Show AudioContent Source # 
Instance details

Defined in MCP.Types

Eq AudioContent Source # 
Instance details

Defined in MCP.Types

type Rep AudioContent Source # 
Instance details

Defined in MCP.Types

data EmbeddedResource Source #

The contents of a resource, embedded into a prompt or tool call result.

It is up to the client how best to render embedded resources for the benefit of the LLM and/or the user.

Constructors

EmbeddedResource 

Fields

Instances

Instances details
FromJSON EmbeddedResource Source # 
Instance details

Defined in MCP.Types

ToJSON EmbeddedResource Source # 
Instance details

Defined in MCP.Types

Generic EmbeddedResource Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep EmbeddedResource 
Instance details

Defined in MCP.Types

type Rep EmbeddedResource = D1 ('MetaData "EmbeddedResource" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "EmbeddedResource" 'PrefixI 'True) ((S1 ('MetaSel ('Just "resourceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "resource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ResourceContents)) :*: (S1 ('MetaSel ('Just "annotations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Annotations)) :*: S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata)))))
Show EmbeddedResource Source # 
Instance details

Defined in MCP.Types

Eq EmbeddedResource Source # 
Instance details

Defined in MCP.Types

type Rep EmbeddedResource Source # 
Instance details

Defined in MCP.Types

type Rep EmbeddedResource = D1 ('MetaData "EmbeddedResource" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "EmbeddedResource" 'PrefixI 'True) ((S1 ('MetaSel ('Just "resourceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "resource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ResourceContents)) :*: (S1 ('MetaSel ('Just "annotations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Annotations)) :*: S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata)))))

data ResourceLink Source #

A resource that the server is capable of reading, included in a prompt or tool call result.

Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.

Constructors

ResourceLink 

Fields

Instances

data Content Source #

Content that can be text, image, audio, or embedded resource.

This union type represents the different kinds of content that can be included in messages, prompts, and tool results.

Instances

Instances details
FromJSON Content Source # 
Instance details

Defined in MCP.Types

ToJSON Content Source # 
Instance details

Defined in MCP.Types

Generic Content Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep Content 
Instance details

Defined in MCP.Types

Methods

from :: Content -> Rep Content x #

to :: Rep Content x -> Content #

Show Content Source # 
Instance details

Defined in MCP.Types

Eq Content Source # 
Instance details

Defined in MCP.Types

Methods

(==) :: Content -> Content -> Bool #

(/=) :: Content -> Content -> Bool #

type Rep Content Source # 
Instance details

Defined in MCP.Types

data ContentBlock Source #

ContentBlock union type that includes ResourceLink.

This is the unified content type used in new schema version.

Instances

Instances details
FromJSON ContentBlock Source # 
Instance details

Defined in MCP.Types

ToJSON ContentBlock Source # 
Instance details

Defined in MCP.Types

Generic ContentBlock Source # 
Instance details

Defined in MCP.Types

Show ContentBlock Source # 
Instance details

Defined in MCP.Types

Eq ContentBlock Source # 
Instance details

Defined in MCP.Types

type Rep ContentBlock Source # 
Instance details

Defined in MCP.Types

Resource Types

data ResourceContents Source #

The contents of a specific resource or sub-resource.

A resource can contain either text or binary data.

Instances

Instances details
FromJSON ResourceContents Source # 
Instance details

Defined in MCP.Types

ToJSON ResourceContents Source # 
Instance details

Defined in MCP.Types

Generic ResourceContents Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ResourceContents 
Instance details

Defined in MCP.Types

type Rep ResourceContents = D1 ('MetaData "ResourceContents" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "TextResource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TextResourceContents)) :+: C1 ('MetaCons "BlobResource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlobResourceContents)))
Show ResourceContents Source # 
Instance details

Defined in MCP.Types

Eq ResourceContents Source # 
Instance details

Defined in MCP.Types

type Rep ResourceContents Source # 
Instance details

Defined in MCP.Types

type Rep ResourceContents = D1 ('MetaData "ResourceContents" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "TextResource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TextResourceContents)) :+: C1 ('MetaCons "BlobResource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlobResourceContents)))

data TextResourceContents Source #

Text resource contents.

Represents the contents of a resource that can be represented as text (not binary data).

Constructors

TextResourceContents 

Fields

  • uri :: Text

    The URI of this resource.

  • text :: Text

    The text of the item. This must only be set if the item can actually be represented as text (not binary data).

  • mimeType :: Maybe Text

    The MIME type of this resource, if known.

  • _meta :: Maybe Metadata

    Optional metadata field.

Instances

Instances details
FromJSON TextResourceContents Source # 
Instance details

Defined in MCP.Types

ToJSON TextResourceContents Source # 
Instance details

Defined in MCP.Types

Generic TextResourceContents Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep TextResourceContents 
Instance details

Defined in MCP.Types

type Rep TextResourceContents = D1 ('MetaData "TextResourceContents" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "TextResourceContents" 'PrefixI 'True) ((S1 ('MetaSel ('Just "uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "mimeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata)))))
Show TextResourceContents Source # 
Instance details

Defined in MCP.Types

Eq TextResourceContents Source # 
Instance details

Defined in MCP.Types

type Rep TextResourceContents Source # 
Instance details

Defined in MCP.Types

type Rep TextResourceContents = D1 ('MetaData "TextResourceContents" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "TextResourceContents" 'PrefixI 'True) ((S1 ('MetaSel ('Just "uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "mimeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata)))))

data BlobResourceContents Source #

Blob resource contents.

Represents the contents of a resource as binary data, encoded in base64.

Constructors

BlobResourceContents 

Fields

Instances

Instances details
FromJSON BlobResourceContents Source # 
Instance details

Defined in MCP.Types

ToJSON BlobResourceContents Source # 
Instance details

Defined in MCP.Types

Generic BlobResourceContents Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep BlobResourceContents 
Instance details

Defined in MCP.Types

type Rep BlobResourceContents = D1 ('MetaData "BlobResourceContents" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "BlobResourceContents" 'PrefixI 'True) ((S1 ('MetaSel ('Just "uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "blob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "mimeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata)))))
Show BlobResourceContents Source # 
Instance details

Defined in MCP.Types

Eq BlobResourceContents Source # 
Instance details

Defined in MCP.Types

type Rep BlobResourceContents Source # 
Instance details

Defined in MCP.Types

type Rep BlobResourceContents = D1 ('MetaData "BlobResourceContents" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "BlobResourceContents" 'PrefixI 'True) ((S1 ('MetaSel ('Just "uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "blob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "mimeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata)))))

data Resource Source #

A known resource that the server is capable of reading.

Resources represent files, documents, or other data sources that the server can provide to clients.

Constructors

Resource 

Fields

  • uri :: Text

    The URI of this resource.

  • name :: Text

    A human-readable name for this resource. This can be used by clients to populate UI elements.

  • title :: Maybe Text

    Optional title for display purposes.

  • description :: Maybe Text

    A description of what this resource represents. This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.

  • mimeType :: Maybe Text

    The MIME type of this resource, if known.

  • size :: Maybe Int

    The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known. This can be used by Hosts to display file sizes and estimate context window usage.

  • annotations :: Maybe Annotations

    Optional annotations for the client.

  • _meta :: Maybe Metadata

    Optional metadata field.

Instances

Instances details
FromJSON Resource Source # 
Instance details

Defined in MCP.Types

ToJSON Resource Source # 
Instance details

Defined in MCP.Types

Generic Resource Source # 
Instance details

Defined in MCP.Types

Methods

from :: Resource -> Rep Resource x #

to :: Rep Resource x -> Resource #

Show Resource Source # 
Instance details

Defined in MCP.Types

Eq Resource Source # 
Instance details

Defined in MCP.Types

type Rep Resource Source # 
Instance details

Defined in MCP.Types

data ResourceTemplate Source #

A template description for resources available on the server.

Resource templates allow servers to describe parameterized resources that can be instantiated with specific values.

Constructors

ResourceTemplate 

Fields

  • name :: Text

    A human-readable name for the type of resource this template refers to. This can be used by clients to populate UI elements.

  • title :: Maybe Text

    Optional title for display purposes.

  • uriTemplate :: Text

    A URI template (according to RFC 6570) that can be used to construct resource URIs.

  • description :: Maybe Text

    A description of what this template is for. This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.

  • mimeType :: Maybe Text

    The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.

  • annotations :: Maybe Annotations

    Optional annotations for the client.

  • _meta :: Maybe Metadata

    Optional metadata field.

Instances

Instances details
FromJSON ResourceTemplate Source # 
Instance details

Defined in MCP.Types

ToJSON ResourceTemplate Source # 
Instance details

Defined in MCP.Types

Generic ResourceTemplate Source # 
Instance details

Defined in MCP.Types

Show ResourceTemplate Source # 
Instance details

Defined in MCP.Types

Eq ResourceTemplate Source # 
Instance details

Defined in MCP.Types

type Rep ResourceTemplate Source # 
Instance details

Defined in MCP.Types

data ResourceReference Source #

A reference to a resource or resource template definition.

Used in completion requests and other contexts where a resource needs to be referenced.

Constructors

ResourceReference 

Fields

Instances

Instances details
FromJSON ResourceReference Source # 
Instance details

Defined in MCP.Types

ToJSON ResourceReference Source # 
Instance details

Defined in MCP.Types

Generic ResourceReference Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ResourceReference 
Instance details

Defined in MCP.Types

type Rep ResourceReference = D1 ('MetaData "ResourceReference" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ResourceReference" 'PrefixI 'True) (S1 ('MetaSel ('Just "refType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Show ResourceReference Source # 
Instance details

Defined in MCP.Types

Eq ResourceReference Source # 
Instance details

Defined in MCP.Types

type Rep ResourceReference Source # 
Instance details

Defined in MCP.Types

type Rep ResourceReference = D1 ('MetaData "ResourceReference" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ResourceReference" 'PrefixI 'True) (S1 ('MetaSel ('Just "refType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

type ResourceTemplateReference = ResourceReference Source #

A reference to a resource template definition.

This is an alias for ResourceReference in the new schema.

Tool Types

data ToolAnnotations Source #

Additional properties describing a Tool to clients.

NOTE: all properties in ToolAnnotations are **hints**. They are not guaranteed to provide a faithful description of tool behavior (including descriptive properties like title).

Clients should never make tool use decisions based on ToolAnnotations received from untrusted servers.

Constructors

ToolAnnotations 

Fields

  • title :: Maybe Text

    A human-readable title for the tool.

  • readOnlyHint :: Maybe Bool

    If true, the tool does not modify its environment. Default: false

  • destructiveHint :: Maybe Bool

    If true, the tool may perform destructive updates to its environment. If false, the tool performs only additive updates. (This property is meaningful only when `readOnlyHint == false`) Default: true

  • idempotentHint :: Maybe Bool

    If true, calling the tool repeatedly with the same arguments will have no additional effect on its environment. (This property is meaningful only when `readOnlyHint == false`) Default: false

  • openWorldHint :: Maybe Bool

    If true, this tool may interact with an "open world" of external entities. If false, the tool's domain of interaction is closed. For example, the world of a web search tool is open, whereas that of a memory tool is not. Default: true

Instances

Instances details
FromJSON ToolAnnotations Source # 
Instance details

Defined in MCP.Types

ToJSON ToolAnnotations Source # 
Instance details

Defined in MCP.Types

Generic ToolAnnotations Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ToolAnnotations 
Instance details

Defined in MCP.Types

type Rep ToolAnnotations = D1 ('MetaData "ToolAnnotations" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ToolAnnotations" 'PrefixI 'True) ((S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "readOnlyHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "destructiveHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "idempotentHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "openWorldHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))))
Show ToolAnnotations Source # 
Instance details

Defined in MCP.Types

Eq ToolAnnotations Source # 
Instance details

Defined in MCP.Types

type Rep ToolAnnotations Source # 
Instance details

Defined in MCP.Types

type Rep ToolAnnotations = D1 ('MetaData "ToolAnnotations" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ToolAnnotations" 'PrefixI 'True) ((S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "readOnlyHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "destructiveHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "idempotentHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "openWorldHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))))

data Tool Source #

Definition for a tool the client can call.

Tools are functions that the MCP server exposes to clients, allowing the client to perform specific actions or retrieve information.

Constructors

Tool 

Fields

  • name :: Text

    The name of the tool.

  • title :: Maybe Text

    Optional title for display purposes.

  • description :: Maybe Text

    A human-readable description of the tool. This can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a "hint" to the model.

  • inputSchema :: InputSchema

    A JSON Schema object defining the expected parameters for the tool.

  • outputSchema :: Maybe InputSchema

    An optional JSON Schema object defining the structure of the tool's output returned in the structuredContent field of a CallToolResult.

  • annotations :: Maybe ToolAnnotations

    Optional additional tool information. Display name precedence order is: title, annotations.title, then name.

  • _meta :: Maybe Metadata

    Optional metadata field.

Instances

Instances details
FromJSON Tool Source # 
Instance details

Defined in MCP.Types

ToJSON Tool Source # 
Instance details

Defined in MCP.Types

Generic Tool Source # 
Instance details

Defined in MCP.Types

Methods

from :: Tool -> Rep Tool x #

to :: Rep Tool x -> Tool #

Show Tool Source # 
Instance details

Defined in MCP.Types

Methods

showsPrec :: Int -> Tool -> ShowS #

show :: Tool -> String #

showList :: [Tool] -> ShowS #

Eq Tool Source # 
Instance details

Defined in MCP.Types

Methods

(==) :: Tool -> Tool -> Bool #

(/=) :: Tool -> Tool -> Bool #

type Rep Tool Source # 
Instance details

Defined in MCP.Types

data InputSchema Source #

Input schema for a tool.

A JSON Schema object defining the expected parameters for the tool.

Constructors

InputSchema 

Instances

Instances details
FromJSON InputSchema Source # 
Instance details

Defined in MCP.Types

ToJSON InputSchema Source # 
Instance details

Defined in MCP.Types

Generic InputSchema Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep InputSchema 
Instance details

Defined in MCP.Types

type Rep InputSchema = D1 ('MetaData "InputSchema" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "InputSchema" 'PrefixI 'True) (S1 ('MetaSel ('Just "schemaType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "properties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Value))) :*: S1 ('MetaSel ('Just "required") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Text])))))
Show InputSchema Source # 
Instance details

Defined in MCP.Types

Eq InputSchema Source # 
Instance details

Defined in MCP.Types

type Rep InputSchema Source # 
Instance details

Defined in MCP.Types

type Rep InputSchema = D1 ('MetaData "InputSchema" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "InputSchema" 'PrefixI 'True) (S1 ('MetaSel ('Just "schemaType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "properties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Value))) :*: S1 ('MetaSel ('Just "required") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Text])))))

Prompt Types

data PromptArgument Source #

Describes an argument that a prompt can accept.

Prompt arguments allow prompts to be parameterized with user-provided values.

Constructors

PromptArgument 

Fields

Instances

Instances details
FromJSON PromptArgument Source # 
Instance details

Defined in MCP.Types

ToJSON PromptArgument Source # 
Instance details

Defined in MCP.Types

Generic PromptArgument Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep PromptArgument 
Instance details

Defined in MCP.Types

type Rep PromptArgument = D1 ('MetaData "PromptArgument" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "PromptArgument" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "required") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))
Show PromptArgument Source # 
Instance details

Defined in MCP.Types

Eq PromptArgument Source # 
Instance details

Defined in MCP.Types

type Rep PromptArgument Source # 
Instance details

Defined in MCP.Types

type Rep PromptArgument = D1 ('MetaData "PromptArgument" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "PromptArgument" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "required") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))

data Prompt Source #

A prompt or prompt template that the server offers.

Prompts are reusable message templates that can be parameterized with arguments to generate specific conversations.

Constructors

Prompt 

Fields

Instances

Instances details
FromJSON Prompt Source # 
Instance details

Defined in MCP.Types

ToJSON Prompt Source # 
Instance details

Defined in MCP.Types

Generic Prompt Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep Prompt 
Instance details

Defined in MCP.Types

Methods

from :: Prompt -> Rep Prompt x #

to :: Rep Prompt x -> Prompt #

Show Prompt Source # 
Instance details

Defined in MCP.Types

Eq Prompt Source # 
Instance details

Defined in MCP.Types

Methods

(==) :: Prompt -> Prompt -> Bool #

(/=) :: Prompt -> Prompt -> Bool #

type Rep Prompt Source # 
Instance details

Defined in MCP.Types

data PromptMessage Source #

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.

Constructors

PromptMessage 

Fields

Instances

Instances details
FromJSON PromptMessage Source # 
Instance details

Defined in MCP.Types

ToJSON PromptMessage Source # 
Instance details

Defined in MCP.Types

Generic PromptMessage Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep PromptMessage 
Instance details

Defined in MCP.Types

type Rep PromptMessage = D1 ('MetaData "PromptMessage" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "PromptMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "role") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Role) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContentBlock)))
Show PromptMessage Source # 
Instance details

Defined in MCP.Types

Eq PromptMessage Source # 
Instance details

Defined in MCP.Types

type Rep PromptMessage Source # 
Instance details

Defined in MCP.Types

type Rep PromptMessage = D1 ('MetaData "PromptMessage" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "PromptMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "role") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Role) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContentBlock)))

data PromptReference Source #

Identifies a prompt.

Used in completion requests and other contexts where a prompt needs to be referenced.

Constructors

PromptReference 

Fields

Instances

Instances details
FromJSON PromptReference Source # 
Instance details

Defined in MCP.Types

ToJSON PromptReference Source # 
Instance details

Defined in MCP.Types

Generic PromptReference Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep PromptReference 
Instance details

Defined in MCP.Types

type Rep PromptReference = D1 ('MetaData "PromptReference" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "PromptReference" 'PrefixI 'True) (S1 ('MetaSel ('Just "refType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))
Show PromptReference Source # 
Instance details

Defined in MCP.Types

Eq PromptReference Source # 
Instance details

Defined in MCP.Types

type Rep PromptReference Source # 
Instance details

Defined in MCP.Types

type Rep PromptReference = D1 ('MetaData "PromptReference" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "PromptReference" 'PrefixI 'True) (S1 ('MetaSel ('Just "refType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

Model Types

data ModelHint where Source #

Hints to use for model selection.

Keys not declared here are currently left unspecified by the spec and are up to the client to interpret.

Constructors

ModelHint 

Fields

  • :: { name :: Maybe Text

    A hint for a model name. The client SHOULD treat this as a substring of a model name; for example: - `claude-3-5-sonnet` should match `claude-3-5-sonnet-20241022` - sonnet should match `claude-3-5-sonnet-20241022`, `claude-3-sonnet-20240229`, etc. - claude should match any Claude model The client MAY also map the string to a different provider's model name or a different model family, as long as it fills a similar niche.

  •    } -> ModelHint
     

Instances

Instances details
FromJSON ModelHint Source # 
Instance details

Defined in MCP.Types

ToJSON ModelHint Source # 
Instance details

Defined in MCP.Types

Generic ModelHint Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ModelHint 
Instance details

Defined in MCP.Types

type Rep ModelHint = D1 ('MetaData "ModelHint" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ModelHint" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))
Show ModelHint Source # 
Instance details

Defined in MCP.Types

Eq ModelHint Source # 
Instance details

Defined in MCP.Types

type Rep ModelHint Source # 
Instance details

Defined in MCP.Types

type Rep ModelHint = D1 ('MetaData "ModelHint" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ModelHint" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))

data ModelPreferences Source #

The server's preferences for model selection, requested of the client during sampling.

Because LLMs can vary along multiple dimensions, choosing the "best" model is rarely straightforward. Different models excel in different areas—some are faster but less capable, others are more capable but more expensive, and so on. This interface allows servers to express their priorities across multiple dimensions to help clients make an appropriate selection for their use case.

These preferences are always advisory. The client MAY ignore them. It is also up to the client to decide how to interpret these preferences and how to balance them against other considerations.

Constructors

ModelPreferences 

Fields

  • hints :: Maybe [ModelHint]

    Optional hints to use for model selection. If multiple hints are specified, the client MUST evaluate them in order (such that the first match is taken). The client SHOULD prioritize these hints over the numeric priorities, but MAY still use the priorities to select from ambiguous matches.

  • costPriority :: Maybe Double

    How much to prioritize cost when selecting a model. A value of 0 means cost is not important, while a value of 1 means cost is the most important factor. Range: 0.0 to 1.0

  • speedPriority :: Maybe Double

    How much to prioritize sampling speed (latency) when selecting a model. A value of 0 means speed is not important, while a value of 1 means speed is the most important factor. Range: 0.0 to 1.0

  • intelligencePriority :: Maybe Double

    How much to prioritize intelligence and capabilities when selecting a model. A value of 0 means intelligence is not important, while a value of 1 means intelligence is the most important factor. Range: 0.0 to 1.0

Instances

Instances details
FromJSON ModelPreferences Source # 
Instance details

Defined in MCP.Types

ToJSON ModelPreferences Source # 
Instance details

Defined in MCP.Types

Generic ModelPreferences Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ModelPreferences 
Instance details

Defined in MCP.Types

type Rep ModelPreferences = D1 ('MetaData "ModelPreferences" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ModelPreferences" 'PrefixI 'True) ((S1 ('MetaSel ('Just "hints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [ModelHint])) :*: S1 ('MetaSel ('Just "costPriority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double))) :*: (S1 ('MetaSel ('Just "speedPriority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "intelligencePriority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)))))
Show ModelPreferences Source # 
Instance details

Defined in MCP.Types

Eq ModelPreferences Source # 
Instance details

Defined in MCP.Types

type Rep ModelPreferences Source # 
Instance details

Defined in MCP.Types

type Rep ModelPreferences = D1 ('MetaData "ModelPreferences" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ModelPreferences" 'PrefixI 'True) ((S1 ('MetaSel ('Just "hints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [ModelHint])) :*: S1 ('MetaSel ('Just "costPriority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double))) :*: (S1 ('MetaSel ('Just "speedPriority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "intelligencePriority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)))))

data IncludeContext Source #

Include context options for sampling.

A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.

Constructors

AllServers 
None 
ThisServer 

Instances

Instances details
FromJSON IncludeContext Source # 
Instance details

Defined in MCP.Types

ToJSON IncludeContext Source # 
Instance details

Defined in MCP.Types

Generic IncludeContext Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep IncludeContext 
Instance details

Defined in MCP.Types

type Rep IncludeContext = D1 ('MetaData "IncludeContext" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "AllServers" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "None" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ThisServer" 'PrefixI 'False) (U1 :: Type -> Type)))
Show IncludeContext Source # 
Instance details

Defined in MCP.Types

Eq IncludeContext Source # 
Instance details

Defined in MCP.Types

type Rep IncludeContext Source # 
Instance details

Defined in MCP.Types

type Rep IncludeContext = D1 ('MetaData "IncludeContext" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "AllServers" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "None" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ThisServer" 'PrefixI 'False) (U1 :: Type -> Type)))

data SamplingMessage Source #

Describes a message issued to or received from an LLM API.

Used in sampling requests to represent the conversation history that should be sent to the language model.

Constructors

SamplingMessage 

Fields

Instances

Instances details
FromJSON SamplingMessage Source # 
Instance details

Defined in MCP.Types

ToJSON SamplingMessage Source # 
Instance details

Defined in MCP.Types

Generic SamplingMessage Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep SamplingMessage 
Instance details

Defined in MCP.Types

type Rep SamplingMessage = D1 ('MetaData "SamplingMessage" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "SamplingMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "role") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Role) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Content)))
Show SamplingMessage Source # 
Instance details

Defined in MCP.Types

Eq SamplingMessage Source # 
Instance details

Defined in MCP.Types

type Rep SamplingMessage Source # 
Instance details

Defined in MCP.Types

type Rep SamplingMessage = D1 ('MetaData "SamplingMessage" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "SamplingMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "role") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Role) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Content)))

Capability Types

data ClientCapabilities Source #

Capabilities a client may support.

Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.

Constructors

ClientCapabilities 

Fields

Instances

Instances details
FromJSON ClientCapabilities Source # 
Instance details

Defined in MCP.Types

ToJSON ClientCapabilities Source # 
Instance details

Defined in MCP.Types

Generic ClientCapabilities Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ClientCapabilities 
Instance details

Defined in MCP.Types

Show ClientCapabilities Source # 
Instance details

Defined in MCP.Types

Eq ClientCapabilities Source # 
Instance details

Defined in MCP.Types

type Rep ClientCapabilities Source # 
Instance details

Defined in MCP.Types

data ServerCapabilities Source #

Capabilities that a server may support.

Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.

Constructors

ServerCapabilities 

Fields

Instances

Instances details
FromJSON ServerCapabilities Source # 
Instance details

Defined in MCP.Types

ToJSON ServerCapabilities Source # 
Instance details

Defined in MCP.Types

Generic ServerCapabilities Source # 
Instance details

Defined in MCP.Types

Show ServerCapabilities Source # 
Instance details

Defined in MCP.Types

Eq ServerCapabilities Source # 
Instance details

Defined in MCP.Types

type Rep ServerCapabilities Source # 
Instance details

Defined in MCP.Types

data RootsCapability where Source #

Client capability for root directory management.

Present if the client supports listing roots (directories or files that the server can operate on).

Constructors

RootsCapability 

Fields

Instances

Instances details
FromJSON RootsCapability Source # 
Instance details

Defined in MCP.Types

ToJSON RootsCapability Source # 
Instance details

Defined in MCP.Types

Generic RootsCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep RootsCapability 
Instance details

Defined in MCP.Types

type Rep RootsCapability = D1 ('MetaData "RootsCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "RootsCapability" 'PrefixI 'True) (S1 ('MetaSel ('Just "listChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))
Show RootsCapability Source # 
Instance details

Defined in MCP.Types

Eq RootsCapability Source # 
Instance details

Defined in MCP.Types

type Rep RootsCapability Source # 
Instance details

Defined in MCP.Types

type Rep RootsCapability = D1 ('MetaData "RootsCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "RootsCapability" 'PrefixI 'True) (S1 ('MetaSel ('Just "listChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))

data PromptsCapability where Source #

Server capability for prompt management.

Present if the server offers any prompt templates.

Constructors

PromptsCapability 

Fields

Instances

Instances details
FromJSON PromptsCapability Source # 
Instance details

Defined in MCP.Types

ToJSON PromptsCapability Source # 
Instance details

Defined in MCP.Types

Generic PromptsCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep PromptsCapability 
Instance details

Defined in MCP.Types

type Rep PromptsCapability = D1 ('MetaData "PromptsCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "PromptsCapability" 'PrefixI 'True) (S1 ('MetaSel ('Just "listChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))
Show PromptsCapability Source # 
Instance details

Defined in MCP.Types

Eq PromptsCapability Source # 
Instance details

Defined in MCP.Types

type Rep PromptsCapability Source # 
Instance details

Defined in MCP.Types

type Rep PromptsCapability = D1 ('MetaData "PromptsCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "PromptsCapability" 'PrefixI 'True) (S1 ('MetaSel ('Just "listChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))

data ResourcesCapability Source #

Server capability for resource management.

Present if the server offers any resources to read.

Constructors

ResourcesCapability 

Fields

Instances

Instances details
FromJSON ResourcesCapability Source # 
Instance details

Defined in MCP.Types

ToJSON ResourcesCapability Source # 
Instance details

Defined in MCP.Types

Generic ResourcesCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ResourcesCapability 
Instance details

Defined in MCP.Types

type Rep ResourcesCapability = D1 ('MetaData "ResourcesCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ResourcesCapability" 'PrefixI 'True) (S1 ('MetaSel ('Just "listChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "subscribe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))
Show ResourcesCapability Source # 
Instance details

Defined in MCP.Types

Eq ResourcesCapability Source # 
Instance details

Defined in MCP.Types

type Rep ResourcesCapability Source # 
Instance details

Defined in MCP.Types

type Rep ResourcesCapability = D1 ('MetaData "ResourcesCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ResourcesCapability" 'PrefixI 'True) (S1 ('MetaSel ('Just "listChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "subscribe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))

data ToolsCapability where Source #

Server capability for tool management.

Present if the server offers any tools to call.

Constructors

ToolsCapability 

Fields

Instances

Instances details
FromJSON ToolsCapability Source # 
Instance details

Defined in MCP.Types

ToJSON ToolsCapability Source # 
Instance details

Defined in MCP.Types

Generic ToolsCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ToolsCapability 
Instance details

Defined in MCP.Types

type Rep ToolsCapability = D1 ('MetaData "ToolsCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ToolsCapability" 'PrefixI 'True) (S1 ('MetaSel ('Just "listChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))
Show ToolsCapability Source # 
Instance details

Defined in MCP.Types

Eq ToolsCapability Source # 
Instance details

Defined in MCP.Types

type Rep ToolsCapability Source # 
Instance details

Defined in MCP.Types

type Rep ToolsCapability = D1 ('MetaData "ToolsCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ToolsCapability" 'PrefixI 'True) (S1 ('MetaSel ('Just "listChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))

data CompletionsCapability Source #

Server capability for argument autocompletion.

Present if the server supports argument autocompletion suggestions.

Constructors

CompletionsCapability 

Instances

Instances details
FromJSON CompletionsCapability Source # 
Instance details

Defined in MCP.Types

ToJSON CompletionsCapability Source # 
Instance details

Defined in MCP.Types

Generic CompletionsCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep CompletionsCapability 
Instance details

Defined in MCP.Types

type Rep CompletionsCapability = D1 ('MetaData "CompletionsCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "CompletionsCapability" 'PrefixI 'False) (U1 :: Type -> Type))
Show CompletionsCapability Source # 
Instance details

Defined in MCP.Types

Eq CompletionsCapability Source # 
Instance details

Defined in MCP.Types

type Rep CompletionsCapability Source # 
Instance details

Defined in MCP.Types

type Rep CompletionsCapability = D1 ('MetaData "CompletionsCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "CompletionsCapability" 'PrefixI 'False) (U1 :: Type -> Type))

data LoggingCapability Source #

Server capability for logging.

Present if the server supports sending log messages to the client.

Constructors

LoggingCapability 

Instances

Instances details
FromJSON LoggingCapability Source # 
Instance details

Defined in MCP.Types

ToJSON LoggingCapability Source # 
Instance details

Defined in MCP.Types

Generic LoggingCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep LoggingCapability 
Instance details

Defined in MCP.Types

type Rep LoggingCapability = D1 ('MetaData "LoggingCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "LoggingCapability" 'PrefixI 'False) (U1 :: Type -> Type))
Show LoggingCapability Source # 
Instance details

Defined in MCP.Types

Eq LoggingCapability Source # 
Instance details

Defined in MCP.Types

type Rep LoggingCapability Source # 
Instance details

Defined in MCP.Types

type Rep LoggingCapability = D1 ('MetaData "LoggingCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "LoggingCapability" 'PrefixI 'False) (U1 :: Type -> Type))

data SamplingCapability Source #

Client capability for LLM sampling.

Present if the client supports sampling from an LLM.

Constructors

SamplingCapability 

Instances

Instances details
FromJSON SamplingCapability Source # 
Instance details

Defined in MCP.Types

ToJSON SamplingCapability Source # 
Instance details

Defined in MCP.Types

Generic SamplingCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep SamplingCapability 
Instance details

Defined in MCP.Types

type Rep SamplingCapability = D1 ('MetaData "SamplingCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "SamplingCapability" 'PrefixI 'False) (U1 :: Type -> Type))
Show SamplingCapability Source # 
Instance details

Defined in MCP.Types

Eq SamplingCapability Source # 
Instance details

Defined in MCP.Types

type Rep SamplingCapability Source # 
Instance details

Defined in MCP.Types

type Rep SamplingCapability = D1 ('MetaData "SamplingCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "SamplingCapability" 'PrefixI 'False) (U1 :: Type -> Type))

data ElicitationCapability Source #

Client capability for elicitation.

Present if the client supports elicitation from the server.

Constructors

ElicitationCapability 

Instances

Instances details
FromJSON ElicitationCapability Source # 
Instance details

Defined in MCP.Types

ToJSON ElicitationCapability Source # 
Instance details

Defined in MCP.Types

Generic ElicitationCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ElicitationCapability 
Instance details

Defined in MCP.Types

type Rep ElicitationCapability = D1 ('MetaData "ElicitationCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ElicitationCapability" 'PrefixI 'False) (U1 :: Type -> Type))
Show ElicitationCapability Source # 
Instance details

Defined in MCP.Types

Eq ElicitationCapability Source # 
Instance details

Defined in MCP.Types

type Rep ElicitationCapability Source # 
Instance details

Defined in MCP.Types

type Rep ElicitationCapability = D1 ('MetaData "ElicitationCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "ElicitationCapability" 'PrefixI 'False) (U1 :: Type -> Type))

newtype ExperimentalCapability Source #

Experimental, non-standard capabilities.

Experimental capabilities that the client or server supports. This is not a closed set: any client or server can define its own, additional capabilities.

Instances

Instances details
FromJSON ExperimentalCapability Source # 
Instance details

Defined in MCP.Types

ToJSON ExperimentalCapability Source # 
Instance details

Defined in MCP.Types

Generic ExperimentalCapability Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep ExperimentalCapability 
Instance details

Defined in MCP.Types

type Rep ExperimentalCapability = D1 ('MetaData "ExperimentalCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'True) (C1 ('MetaCons "ExperimentalCapability" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Value))))
Show ExperimentalCapability Source # 
Instance details

Defined in MCP.Types

Eq ExperimentalCapability Source # 
Instance details

Defined in MCP.Types

type Rep ExperimentalCapability Source # 
Instance details

Defined in MCP.Types

type Rep ExperimentalCapability = D1 ('MetaData "ExperimentalCapability" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'True) (C1 ('MetaCons "ExperimentalCapability" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Value))))

Implementation Info

data BaseMetadata Source #

Base interface for metadata with name (identifier) and title (display name) properties.

This is the base type for various entities that need both programmatic identifiers and human-readable names.

Constructors

BaseMetadata 

Fields

  • name :: Text

    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

  • title :: Maybe Text

    Intended for UI and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool, where `annotations.title` should be given precedence over using name, if present).

Instances

Instances details
FromJSON BaseMetadata Source # 
Instance details

Defined in MCP.Types

ToJSON BaseMetadata Source # 
Instance details

Defined in MCP.Types

Generic BaseMetadata Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep BaseMetadata 
Instance details

Defined in MCP.Types

type Rep BaseMetadata = D1 ('MetaData "BaseMetadata" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "BaseMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))
Show BaseMetadata Source # 
Instance details

Defined in MCP.Types

Eq BaseMetadata Source # 
Instance details

Defined in MCP.Types

type Rep BaseMetadata Source # 
Instance details

Defined in MCP.Types

type Rep BaseMetadata = D1 ('MetaData "BaseMetadata" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "BaseMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))

data Implementation Source #

Describes the name and version of an MCP implementation.

Used to identify the client or server software in initialization.

Constructors

Implementation 

Fields

Instances

Instances details
FromJSON Implementation Source # 
Instance details

Defined in MCP.Types

ToJSON Implementation Source # 
Instance details

Defined in MCP.Types

Generic Implementation Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep Implementation 
Instance details

Defined in MCP.Types

type Rep Implementation = D1 ('MetaData "Implementation" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "Implementation" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))
Show Implementation Source # 
Instance details

Defined in MCP.Types

Eq Implementation Source # 
Instance details

Defined in MCP.Types

type Rep Implementation Source # 
Instance details

Defined in MCP.Types

type Rep Implementation = D1 ('MetaData "Implementation" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "Implementation" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

Roots

data Root Source #

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

Roots allow servers to ask for specific directories or files to operate on. A common example for roots is providing a set of repositories or directories a server should operate on.

Constructors

Root 

Fields

  • uri :: Text

    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.

  • name :: Maybe Text

    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.

  • _meta :: Maybe Metadata

    Optional metadata field.

Instances

Instances details
FromJSON Root Source # 
Instance details

Defined in MCP.Types

ToJSON Root Source # 
Instance details

Defined in MCP.Types

Generic Root Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep Root 
Instance details

Defined in MCP.Types

type Rep Root = D1 ('MetaData "Root" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "Root" 'PrefixI 'True) (S1 ('MetaSel ('Just "uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata)))))

Methods

from :: Root -> Rep Root x #

to :: Rep Root x -> Root #

Show Root Source # 
Instance details

Defined in MCP.Types

Methods

showsPrec :: Int -> Root -> ShowS #

show :: Root -> String #

showList :: [Root] -> ShowS #

Eq Root Source # 
Instance details

Defined in MCP.Types

Methods

(==) :: Root -> Root -> Bool #

(/=) :: Root -> Root -> Bool #

type Rep Root Source # 
Instance details

Defined in MCP.Types

type Rep Root = D1 ('MetaData "Root" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "Root" 'PrefixI 'True) (S1 ('MetaSel ('Just "uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata)))))

Result Types

data Result where Source #

Base result type.

All MCP result types include optional metadata that can be used to attach additional information to responses.

Constructors

Result 

Fields

  • :: { _meta :: Maybe Metadata

    This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.

  •    } -> Result
     

Instances

Instances details
FromJSON Result Source # 
Instance details

Defined in MCP.Types

ToJSON Result Source # 
Instance details

Defined in MCP.Types

Generic Result Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep Result 
Instance details

Defined in MCP.Types

type Rep Result = D1 ('MetaData "Result" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "Result" 'PrefixI 'True) (S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata))))

Methods

from :: Result -> Rep Result x #

to :: Rep Result x -> Result #

Show Result Source # 
Instance details

Defined in MCP.Types

Eq Result Source # 
Instance details

Defined in MCP.Types

Methods

(==) :: Result -> Result -> Bool #

(/=) :: Result -> Result -> Bool #

type Rep Result Source # 
Instance details

Defined in MCP.Types

type Rep Result = D1 ('MetaData "Result" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'False) (C1 ('MetaCons "Result" 'PrefixI 'True) (S1 ('MetaSel ('Just "_meta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Metadata))))

newtype Metadata Source #

Metadata for results.

This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.

Constructors

Metadata (Map Text Value) 

Instances

Instances details
FromJSON Metadata Source # 
Instance details

Defined in MCP.Types

ToJSON Metadata Source # 
Instance details

Defined in MCP.Types

Generic Metadata Source # 
Instance details

Defined in MCP.Types

Associated Types

type Rep Metadata 
Instance details

Defined in MCP.Types

type Rep Metadata = D1 ('MetaData "Metadata" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'True) (C1 ('MetaCons "Metadata" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Value))))

Methods

from :: Metadata -> Rep Metadata x #

to :: Rep Metadata x -> Metadata #

Show Metadata Source # 
Instance details

Defined in MCP.Types

Eq Metadata Source # 
Instance details

Defined in MCP.Types

type Rep Metadata Source # 
Instance details

Defined in MCP.Types

type Rep Metadata = D1 ('MetaData "Metadata" "MCP.Types" "mcp-types-0.1.0-Bdcv0EdKlpI6CJWrAQ8a5X" 'True) (C1 ('MetaCons "Metadata" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Value))))