ToolUseContent

data class ToolUseContent(val id: String, val name: String, val input: JsonObject, val meta: JsonObject? = null) : SamplingMessageContent(source)

A request from the assistant to invoke a tool during sampling.

Constructors

Link copied to clipboard
constructor(id: String, name: String, input: JsonObject, meta: JsonObject? = null)

Properties

Link copied to clipboard
val id: String

Unique identifier for this tool use; matches a subsequent ToolResultContent.toolUseId that reports the result.

Link copied to clipboard

The arguments to pass to the tool, conforming to the tool's input schema.

Link copied to clipboard
@SerialName(value = "_meta")
open override val meta: JsonObject?

property/parameter is reserved by MCP to allow clients and servers to attach additional metadata to their interactions.

Link copied to clipboard

The tool name (must match a tool declared in the sampling request's tools list).

Link copied to clipboard
open override val type: ContentTypes

discriminator identifying the content block subtype