Skip to content

EveToolStubOutcome

NexusLabs.Eve

EveToolStubOutcome Class

Declares a JSON response or a server-side thrown error for a matched tool call.

public sealed class EveToolStubOutcome

Inheritance System.Object → EveToolStubOutcome

Properties

EveToolStubOutcome.Json Property

Gets the immutable wire declaration, including arbitrary response JSON.

public System.Text.Json.JsonElement Json { get; }

Property Value

System.Text.Json.JsonElement

Methods

EveToolStubOutcome.Respond(JsonElement) Method

Creates a successful outcome without executing a tool in the client.

public static NexusLabs.Eve.EveToolStubOutcome Respond(System.Text.Json.JsonElement response);

Parameters

response System.Text.Json.JsonElement

Any JSON value, including JSON null.

Returns

EveToolStubOutcome
A response-only outcome.

Exceptions

System.ArgumentException
The JSON value is undefined.

EveToolStubOutcome.Throw(string, string) Method

Creates a server-side thrown error; an omitted name defaults to Error.

public static NexusLabs.Eve.EveToolStubOutcome Throw(string message, string? name=null);

Parameters

message System.String

The error message. An empty message is permitted.

name System.String

An optional nonempty error name, not a JavaScript class.

Returns

EveToolStubOutcome
A throw-only outcome.

Exceptions

System.ArgumentNullException
The message is null.

System.ArgumentException
The supplied name is empty.