Class
McpToolResult
Represents the result of executing an MCP tool.
public sealed class McpToolResultInheritance #
Inherited Members #
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors #
| Name | Description |
|---|---|
| McpToolResult(JsonValue) | Initializes a new instance of the McpToolResult class. |
Properties #
| Name | Description |
|---|---|
| Result | Gets the JSON representation of the tool result. |
Methods #
| Name | Description |
|---|---|
| Combine(params McpToolResult[]) | Combines multiple McpToolResult objects into a single result. If the input contains a single result, it is returned directly. Otherwise, all individual results are unpacked and combined into a JSON array. |
| CreateAudio(ReadOnlySpan<byte>, string) | Creates an audio-based result for an MCP tool. |
| CreateImage(ReadOnlySpan<byte>, string) | Creates an image-based result for an MCP tool. |
| CreateText(string) | Creates a text-based result for an MCP tool. |
Operators #
| Name | Description |
|---|---|
| implicit operator McpToolResult(string) |