Skip to content

AgentPrismExternalCallException

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Thrown when an external caller (over MCP or A2A) asked to invoke an agent from the catalog and the call was refused because it crosses a boundary.

public sealed class AgentPrismExternalCallException : AgentPrismException, ISerializable

objectExceptionAgentPrismExceptionAgentPrismExternalCallException

ISerializable

AgentPrismException.ErrorType, Exception.GetBaseException(), Exception.ToString(), Exception.GetType(), Exception.TargetSite, Exception.Message, Exception.Data, Exception.InnerException, Exception.HelpLink, Exception.Source, Exception.HResult, Exception.StackTrace, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The most common cause is an external caller trying to open an agent that carries a tool requiring approval. An external caller is not an agent and cannot answer an approval request — the same rule, applied a second time.

Creates a new error.

public AgentPrismExternalCallException()

Creates a new error.

public AgentPrismExternalCallException(string message)

message string

The error message.

AgentPrismExternalCallException(string, Exception)

Section titled “ AgentPrismExternalCallException(string, Exception)”

Creates a new error.

public AgentPrismExternalCallException(string message, Exception innerException)

message string

The error message.

innerException Exception

The underlying error.

The stable value written to AgentPrismException.ErrorType.

public const string ExternalCallRejectedErrorType = "external_call_rejected"

string

Gets the agent the caller asked for.

public required string AgentName { get; init; }

string

Gets the stable error type name written to the run record.

public override string ErrorType { get; }

string

Defaults to the full name of the exception type, so today’s behaviour does not change. A derived type overrides this member when the record has to be machine readable — for example AgentPrismContentFilteredException writes content_filtered. Reports and alert rules can rely on this stable name instead of an assembly name.

The value is written to RunError.Type and carries no secret.

Gets the protocol the call arrived on: mcp or a2a.

public required string Protocol { get; init; }

string