MentorAgent Docs
Menu

Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.

ReferencePackage: Novior.MentorAgent.Abstractions

MentorActionRequest record

The MentorActionRequest record of Novior.MentorAgent.Abstractions.Models: What an IMentorActionPolicy is asked about: one action, for one user, at one…

On this page

What an IMentorActionPolicy is asked about: one action, for one user, at one MentorActionRequest.Stage. MentorActionRequest.ToolName means what it means on MentorActionDecision. More properties may be added.

Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.

public sealed record MentorActionRequest : IEquatable<MentorActionRequest>

Terminal
dotnet add package Novior.MentorAgent.Abstractions

public MentorActionRequest()

public MentorAgentKind? AgentKind { get; init; }

Which kind of agent asks for the action; null on the MCP server, where the caller names the tool itself.

public string? AgentName { get; init; }

The name of the agent that asks for the action, when it has one.

public IReadOnlyDictionary<string, object?>? Arguments { get; init; }

The arguments of the call, by parameter name, with the values the model or the MCP client sent — in general a System.Text.Json.JsonElement each. They come from the model and nothing has checked them: read them as you would read a request's body. null at MentorActionStage.Offer.

public string? CallId { get; init; }

The id of the call, as on MentorActionDecision.CallId; null at MentorActionStage.Offer.

public string? Description { get; init; }

The action's description, as the model reads it; null when it has none.

public string? PageName { get; init; }

The page the user is on, as the page named it with IMentorPageContext.SetPageName; null when no page set one, on the MCP server and in a task from another agent.

public IReadOnlyList<string> RequiredRoles { get; init; }

The roles the action requires, any one of which is enough; empty when it requires none.

public bool RequiresConfirmation { get; init; }

Whether the action asks for a confirmation of its own: [MentorAction(RequiresConfirmation = true)], the RequiresApproval predicate, or an approval-required MCP server — with RequireConfirmation on.

public required IServiceProvider Services { get; init; }

The services of the conversation's scope — the circuit, the hub connection, the request, the A2A task; on the MCP server, the request's — for a scoped service of the application. Never the application's root services.

public string? SessionId { get; init; }

The session's opaque id, as on MentorActionDecision.SessionId.

public required MentorActionStage Stage { get; init; }

Whether MentorAgent is deciding what to offer, or a call is about to run.

public required MentorActionSurface Surface { get; init; }

Where the call comes from.

public required string ToolName { get; init; }

The tool's technical name, as the model or the MCP client calls it (for example cancel_order).

public string? TurnId { get; init; }

The turn's opaque id, as on MentorActionDecision.TurnId; null on the MCP server.

public ClaimsPrincipal? User { get; init; }

The signed-in user, or null when nobody is. Read for every action, those that require no role too. On the MCP server, the caller McpCallerPrincipal resolves, else the request's user.