Class ToolUseContentBlock
- Namespace
- ModelContextProtocol.Protocol
- Assembly
- ModelContextProtocol.Core.dll
Represents a request from the assistant to call a tool.
public sealed class ToolUseContentBlock : ContentBlock
- Inheritance
-
ToolUseContentBlock
- Inherited Members
- Extension Methods
Properties
Id
Gets or sets a unique identifier for this tool use.
[JsonPropertyName("id")]
public required string Id { get; set; }
Property Value
Remarks
This ID is used to match tool results to their corresponding tool uses.
Input
Gets or sets the arguments to pass to the tool, conforming to the tool's input schema.
[JsonPropertyName("input")]
public required JsonElement Input { get; set; }
Property Value
Name
Gets or sets the name of the tool to call.
[JsonPropertyName("name")]
public required string Name { get; set; }
Property Value
Type
When overridden in a derived class, gets the type of content.
public override string Type { get; }
Property Value
Remarks
This determines the structure of the content object. Valid values include "image", "audio", "text", "resource", "resource_link", "tool_use", and "tool_result".