API ReferenceEditor.Mcp

McpResultclass

The result of an MCP tool call - one or more content blocks the agent reads. Tools can return plain values and get shaped into a single block automatically, but returning one of these gives full control, like pairing a screenshot with a caption.

objectMcpResult
Namespace
Editor.Mcp
Assembly
Sandbox.Tools
Declaration
public sealed class Editor.Mcp.McpResult

Methods7

Showing 7 methods

public static Editor.Mcp.McpResult Structured(object value)PUBLICSTATIC

A structured content block - the value as json the client binds against the tool's output schema, paired with the same json as text for clients that don't.

ParameterTypeDescription
valueobject
Returns:McpResult

public static Editor.Mcp.McpResult Text(object value)PUBLICSTATIC

A text block. Anything that isn't a string gets serialized to json.

ParameterTypeDescription
valueobject
Returns:McpResult

public Editor.Mcp.McpResult WithText(object value)PUBLIC

Append a text block. Anything that isn't a string gets serialized to json.

ParameterTypeDescription
valueobject
Returns:McpResult

On this page