or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

auth.mdindex.mdjsonrpc.mdmcp-capabilities.mdmcp-client.mdmcp-content.mdmcp-protocol.mdmcp-server.mdmcp-transports.mdoauthex.md
tile.json

mcp-protocol.mddocs/

MCP Protocol

Complete protocol types for all MCP requests, responses, parameters, and results.

Initialization Protocol

Initialize Request and Result

type InitializeParams struct {
	Meta            `json:"_meta,omitempty"`
	Capabilities    *ClientCapabilities `json:"capabilities"`
	ClientInfo      *Implementation     `json:"clientInfo"`
	ProtocolVersion string              `json:"protocolVersion"`
}

Parameters sent by client to initialize the connection.

Methods:

func (p *InitializeParams) GetProgressToken() any
func (p *InitializeParams) SetProgressToken(t any)
type InitializeResult struct {
	Meta            `json:"_meta,omitempty"`
	Capabilities    *ServerCapabilities `json:"capabilities"`
	Instructions    string              `json:"instructions,omitempty"`
	ProtocolVersion string              `json:"protocolVersion"`
	ServerInfo      *Implementation     `json:"serverInfo"`
}

Server's response to initialization.

Fields:

  • Capabilities: Features the server supports
  • Instructions: Human-readable instructions for using the server
  • ProtocolVersion: MCP protocol version (e.g., "2025-06-18")
  • ServerInfo: Server name and version

Initialized Notification

type InitializedParams struct {
	Meta `json:"_meta,omitempty"`
}

Parameters for initialized notification sent by client after receiving InitializeResult.

Methods:

func (p *InitializedParams) GetProgressToken() any
func (p *InitializedParams) SetProgressToken(t any)

Tool Protocol

Call Tool

type CallToolParams struct {
	Meta      `json:"_meta,omitempty"`
	Name      string `json:"name"`
	Arguments any    `json:"arguments,omitempty"`
}

Client request to call a tool.

Fields:

  • Meta: Additional metadata
  • Name: Tool name
  • Arguments: Tool-specific arguments (map or struct)

Methods:

func (p *CallToolParams) GetProgressToken() any
func (p *CallToolParams) SetProgressToken(t any)
type CallToolParamsRaw struct {
	Meta      `json:"_meta,omitempty"`
	Name      string          `json:"name"`
	Arguments json.RawMessage `json:"arguments,omitempty"`
}

Raw parameters passed to tool handlers on server with unparsed arguments.

Methods:

func (p *CallToolParamsRaw) GetProgressToken() any
func (p *CallToolParamsRaw) SetProgressToken(t any)
type CallToolResult struct {
	Meta              `json:"_meta,omitempty"`
	Content           []Content `json:"content"`
	StructuredContent any       `json:"structuredContent,omitempty"`
	IsError           bool      `json:"isError,omitempty"`
}

Server's response to a tool call.

Fields:

  • Content: Unstructured result as content objects (text, images, etc.)
  • StructuredContent: Optional structured result as JSON object
  • IsError: Whether the tool call ended in error

Methods:

func (r *CallToolResult) UnmarshalJSON(data []byte) error

List Tools

type ListToolsParams struct {
	Meta   `json:"_meta,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

Client request to list available tools.

Fields:

  • Cursor: Pagination cursor from previous response

Methods:

func (p *ListToolsParams) GetProgressToken() any
func (p *ListToolsParams) SetProgressToken(t any)
type ListToolsResult struct {
	Meta       `json:"_meta,omitempty"`
	NextCursor string  `json:"nextCursor,omitempty"`
	Tools      []*Tool `json:"tools"`
}

Server response with list of tools.

Fields:

  • NextCursor: Cursor for next page (empty if no more results)
  • Tools: Available tools

Tool List Changed Notification

type ToolListChangedParams struct {
	Meta `json:"_meta,omitempty"`
}

Server notification that its tool list has changed.

Methods:

func (p *ToolListChangedParams) GetProgressToken() any
func (p *ToolListChangedParams) SetProgressToken(t any)

Prompt Protocol

Get Prompt

type GetPromptParams struct {
	Meta      `json:"_meta,omitempty"`
	Arguments map[string]string `json:"arguments,omitempty"`
	Name      string            `json:"name"`
}

Client request to get a prompt with arguments.

Fields:

  • Arguments: Prompt argument values
  • Name: Prompt name

Methods:

func (p *GetPromptParams) GetProgressToken() any
func (p *GetPromptParams) SetProgressToken(t any)
type GetPromptResult struct {
	Meta        `json:"_meta,omitempty"`
	Description string           `json:"description,omitempty"`
	Messages    []*PromptMessage `json:"messages"`
}

Server response with prompt messages.

Fields:

  • Description: Human-readable description
  • Messages: Prompt messages with roles and content
type PromptMessage struct {
	Content Content `json:"content"`
	Role    Role    `json:"role"`
}

A message returned as part of a prompt.

Fields:

  • Content: Message content (text, image, etc.)
  • Role: Message role ("user", "assistant", etc.)

Methods:

func (m *PromptMessage) UnmarshalJSON(data []byte) error

List Prompts

type ListPromptsParams struct {
	Meta   `json:"_meta,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

Client request to list available prompts.

Fields:

  • Cursor: Pagination cursor from previous response

Methods:

func (p *ListPromptsParams) GetProgressToken() any
func (p *ListPromptsParams) SetProgressToken(t any)
type ListPromptsResult struct {
	Meta       `json:"_meta,omitempty"`
	NextCursor string    `json:"nextCursor,omitempty"`
	Prompts    []*Prompt `json:"prompts"`
}

Server response with list of prompts.

Fields:

  • NextCursor: Cursor for next page (empty if no more results)
  • Prompts: Available prompts

Prompt List Changed Notification

type PromptListChangedParams struct {
	Meta `json:"_meta,omitempty"`
}

Server notification that its prompt list has changed.

Methods:

func (p *PromptListChangedParams) GetProgressToken() any
func (p *PromptListChangedParams) SetProgressToken(t any)

Resource Protocol

Read Resource

type ReadResourceParams struct {
	Meta `json:"_meta,omitempty"`
	URI  string `json:"uri"`
}

Client request to read a resource.

Fields:

  • URI: Resource URI to read

Methods:

func (p *ReadResourceParams) GetProgressToken() any
func (p *ReadResourceParams) SetProgressToken(t any)
type ReadResourceResult struct {
	Meta     `json:"_meta,omitempty"`
	Contents []*ResourceContents `json:"contents"`
}

Server response with resource contents.

Fields:

  • Contents: Resource contents (may include sub-resources)

List Resources

type ListResourcesParams struct {
	Meta   `json:"_meta,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

Client request to list available resources.

Fields:

  • Cursor: Pagination cursor from previous response

Methods:

func (p *ListResourcesParams) GetProgressToken() any
func (p *ListResourcesParams) SetProgressToken(t any)
type ListResourcesResult struct {
	Meta       `json:"_meta,omitempty"`
	NextCursor string      `json:"nextCursor,omitempty"`
	Resources  []*Resource `json:"resources"`
}

Server response with list of resources.

Fields:

  • NextCursor: Cursor for next page (empty if no more results)
  • Resources: Available resources

List Resource Templates

type ListResourceTemplatesParams struct {
	Meta   `json:"_meta,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

Client request to list available resource templates.

Fields:

  • Cursor: Pagination cursor from previous response

Methods:

func (p *ListResourceTemplatesParams) GetProgressToken() any
func (p *ListResourceTemplatesParams) SetProgressToken(t any)
type ListResourceTemplatesResult struct {
	Meta              `json:"_meta,omitempty"`
	NextCursor        string              `json:"nextCursor,omitempty"`
	ResourceTemplates []*ResourceTemplate `json:"resourceTemplates"`
}

Server response with list of resource templates.

Fields:

  • NextCursor: Cursor for next page (empty if no more results)
  • ResourceTemplates: Available resource templates

Resource Subscriptions

type SubscribeParams struct {
	Meta `json:"_meta,omitempty"`
	URI  string `json:"uri"`
}

Client request to subscribe to resource updates.

Fields:

  • URI: Resource URI to subscribe to
type UnsubscribeParams struct {
	Meta `json:"_meta,omitempty"`
	URI  string `json:"uri"`
}

Client request to cancel resource subscription.

Fields:

  • URI: Resource URI to unsubscribe from

Resource Notifications

type ResourceListChangedParams struct {
	Meta `json:"_meta,omitempty"`
}

Server notification that its resource list has changed.

Methods:

func (p *ResourceListChangedParams) GetProgressToken() any
func (p *ResourceListChangedParams) SetProgressToken(t any)
type ResourceUpdatedNotificationParams struct {
	Meta `json:"_meta,omitempty"`
	URI  string `json:"uri"`
}

Server notification that a specific resource has been updated.

Fields:

  • URI: URI of the updated resource

Roots Protocol

List Roots

type ListRootsParams struct {
	Meta `json:"_meta,omitempty"`
}

Server request to list client roots.

Methods:

func (p *ListRootsParams) GetProgressToken() any
func (p *ListRootsParams) SetProgressToken(t any)
type ListRootsResult struct {
	Meta  `json:"_meta,omitempty"`
	Roots []*Root `json:"roots"`
}

Client response with list of roots.

Fields:

  • Roots: Client root directories/files

Roots List Changed Notification

type RootsListChangedParams struct {
	Meta `json:"_meta,omitempty"`
}

Client notification that its root list has changed.

Methods:

func (p *RootsListChangedParams) GetProgressToken() any
func (p *RootsListChangedParams) SetProgressToken(t any)

Sampling Protocol

Create Message

type CreateMessageParams struct {
	Meta             `json:"_meta,omitempty"`
	IncludeContext   string             `json:"includeContext,omitempty"`
	MaxTokens        int64              `json:"maxTokens"`
	Messages         []*SamplingMessage `json:"messages"`
	Metadata         any                `json:"metadata,omitempty"`
	ModelPreferences *ModelPreferences  `json:"modelPreferences,omitempty"`
	StopSequences    []string           `json:"stopSequences,omitempty"`
	SystemPrompt     string             `json:"systemPrompt,omitempty"`
	Temperature      float64            `json:"temperature,omitempty"`
}

Server request for client to generate a message using an LLM.

Fields:

  • IncludeContext: Context inclusion strategy
  • MaxTokens: Maximum tokens in response
  • Messages: Conversation history
  • Metadata: Additional metadata
  • ModelPreferences: Model selection preferences
  • StopSequences: Sequences that stop generation
  • SystemPrompt: System prompt for the LLM
  • Temperature: Sampling temperature (0.0-1.0)

Methods:

func (p *CreateMessageParams) GetProgressToken() any
func (p *CreateMessageParams) SetProgressToken(t any)
type CreateMessageResult struct {
	Meta       `json:"_meta,omitempty"`
	Content    Content `json:"content"`
	Model      string  `json:"model"`
	Role       Role    `json:"role"`
	StopReason string  `json:"stopReason,omitempty"`
}

Client response with generated message.

Fields:

  • Content: Generated message content
  • Model: Model used for generation
  • Role: Message role ("assistant")
  • StopReason: Why generation stopped

Methods:

func (r *CreateMessageResult) UnmarshalJSON(data []byte) error
type SamplingMessage struct {
	Content Content `json:"content"`
	Role    Role    `json:"role"`
}

A message in the conversation history for sampling.

Fields:

  • Content: Message content
  • Role: Message role ("user", "assistant")

Methods:

func (m *SamplingMessage) UnmarshalJSON(data []byte) error
type ModelPreferences struct {
	CostPriority         float64      `json:"costPriority,omitempty"`
	Hints                []*ModelHint `json:"hints,omitempty"`
	IntelligencePriority float64      `json:"intelligencePriority,omitempty"`
	SpeedPriority        float64      `json:"speedPriority,omitempty"`
}

Server preferences for model selection during sampling.

Fields:

  • CostPriority: Priority for low cost (0.0-1.0)
  • Hints: Hints for specific models
  • IntelligencePriority: Priority for high intelligence (0.0-1.0)
  • SpeedPriority: Priority for fast response (0.0-1.0)
type ModelHint struct {
	Name string `json:"name,omitempty"`
}

Hint for model selection.

Fields:

  • Name: Suggested model name

Elicitation Protocol

Elicit

type ElicitParams struct {
	Meta            `json:"_meta,omitempty"`
	Message         string `json:"message"`
	RequestedSchema any    `json:"requestedSchema"`
}

Server request for client to prompt user for structured input.

Fields:

  • Message: Message to present to user
  • RequestedSchema: JSON schema defining requested input (top-level properties only)

Methods:

func (p *ElicitParams) GetProgressToken() any
func (p *ElicitParams) SetProgressToken(t any)
type ElicitResult struct {
	Meta    `json:"_meta,omitempty"`
	Action  string         `json:"action"`
	Content map[string]any `json:"content,omitempty"`
}

Client response to elicitation request.

Fields:

  • Action: User action ("accept", "decline", or "cancel")
  • Content: Form data when action is "accept"

Completion Protocol

Complete

type CompleteParams struct {
	Meta     `json:"_meta,omitempty"`
	Argument CompleteParamsArgument `json:"argument"`
	Context  *CompleteContext       `json:"context,omitempty"`
	Ref      *CompleteReference     `json:"ref"`
}

Client request for argument completion suggestions.

Fields:

  • Argument: Argument to complete
  • Context: Additional context
  • Ref: Reference to prompt or resource
type CompleteParamsArgument struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Argument information for completions.

Fields:

  • Name: Argument name
  • Value: Current partial value
type CompleteContext struct {
	Arguments map[string]string `json:"arguments,omitempty"`
}

Additional context for completions.

Fields:

  • Arguments: Other argument values
type CompleteReference struct {
	Type string `json:"type"`
	Name string `json:"name,omitempty"`
	URI  string `json:"uri,omitempty"`
}

Completion reference type ("ref/prompt" or "ref/resource").

Fields:

  • Type: Reference type
  • Name: Prompt name (for ref/prompt)
  • URI: Resource URI (for ref/resource)

Methods:

func (r *CompleteReference) MarshalJSON() ([]byte, error)
func (r *CompleteReference) UnmarshalJSON(data []byte) error
type CompleteResult struct {
	Meta       `json:"_meta,omitempty"`
	Completion CompletionResultDetails `json:"completion"`
}

Server response with completion suggestions.

Fields:

  • Completion: Completion details
type CompletionResultDetails struct {
	HasMore bool     `json:"hasMore,omitempty"`
	Total   int      `json:"total,omitempty"`
	Values  []string `json:"values"`
}

Details of completion results.

Fields:

  • HasMore: Whether there are more completions available
  • Total: Total number of completions
  • Values: Completion suggestions

Logging Protocol

Logging Message

type LoggingMessageParams struct {
	Meta   `json:"_meta,omitempty"`
	Data   any          `json:"data"`
	Level  LoggingLevel `json:"level"`
	Logger string       `json:"logger,omitempty"`
}

Server notification of a log message.

Fields:

  • Data: Log data (string or structured)
  • Level: Log severity level
  • Logger: Optional logger name

Methods:

func (p *LoggingMessageParams) GetProgressToken() any
func (p *LoggingMessageParams) SetProgressToken(t any)

Set Logging Level

type SetLoggingLevelParams struct {
	Meta  `json:"_meta,omitempty"`
	Level LoggingLevel `json:"level"`
}

Client request to set server's logging level.

Fields:

  • Level: New logging level

Methods:

func (p *SetLoggingLevelParams) GetProgressToken() any
func (p *SetLoggingLevelParams) SetProgressToken(t any)

Progress Notifications

type ProgressNotificationParams struct {
	Meta          `json:"_meta,omitempty"`
	ProgressToken any     `json:"progressToken"`
	Message       string  `json:"message,omitempty"`
	Progress      float64 `json:"progress"`
	Total         float64 `json:"total,omitempty"`
}

Progress notification for long-running operations.

Fields:

  • ProgressToken: Token identifying the operation
  • Message: Optional progress message
  • Progress: Current progress value
  • Total: Total expected progress value

Cancellation

type CancelledParams struct {
	Meta      `json:"_meta,omitempty"`
	Reason    string `json:"reason,omitempty"`
	RequestID any    `json:"requestId"`
}

Notification that a request has been cancelled.

Fields:

  • Reason: Optional cancellation reason
  • RequestID: ID of cancelled request

Methods:

func (p *CancelledParams) GetProgressToken() any
func (p *CancelledParams) SetProgressToken(t any)

Ping Protocol

type PingParams struct {
	Meta `json:"_meta,omitempty"`
}

Ping request to check connectivity.

Methods:

func (p *PingParams) GetProgressToken() any
func (p *PingParams) SetProgressToken(t any)

Annotations

type Annotations struct {
	Audience     []Role  `json:"audience,omitempty"`
	LastModified string  `json:"lastModified,omitempty"`
	Priority     float64 `json:"priority,omitempty"`
}

Optional annotations for objects to inform how they are used or displayed.

Fields:

  • Audience: Intended customer (e.g., "user", "assistant")
  • LastModified: ISO 8601 formatted timestamp
  • Priority: Importance from 0 (optional) to 1 (required)