McpServer.Tool.Content.Text (HTTP MCP Server v0.6.0)

View Source

Represents text content in a tool result.

Fields

  • text - The text content (required)

Examples

iex> text = McpServer.Tool.Content.Text.new(text: "Hello!")
iex> text.text
"Hello!"

Summary

Functions

Creates a new Text content struct.

Types

t()

@type t() :: %McpServer.Tool.Content.Text{text: String.t()}

Functions

new(opts)

@spec new(keyword()) :: t()

Creates a new Text content struct.

Parameters

  • opts - Keyword list with required :text field

Examples

iex> McpServer.Tool.Content.Text.new(text: "Hello, World!")
%McpServer.Tool.Content.Text{text: "Hello, World!"}