# MentorActionBuilder class

> The MentorActionBuilder class of Novior.MentorAgent.Options: What a registered action declares, as [MentorAction] would: given to the callback of…

- URL: https://docs.mentoragent.net/api/novior-mentoragent-options/mentoractionbuilder
- Verified with: MentorAgent 1.4.0
- Last updated: 2026-11-18
- Packages: Novior.MentorAgent

What a registered action declares, as `[MentorAction]` would: given to the callback of [`MentorActionRegistrations.Add`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoractionregistrations#add), [`MentorActionRegistrations.AddCommand`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoractionregistrations#addcommand) and [`MentorActionRegistrations.AddQuery`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoractionregistrations#addquery). Each call returns the builder, to write the next.

## Definition

Namespace: `Novior.MentorAgent.Options`. Package: `Novior.MentorAgent`.

`public sealed class MentorActionBuilder`

```shell
dotnet add package Novior.MentorAgent
```

## Methods

### `Category`

`public MentorActionBuilder Category(string category)`

A free-form category, published as the skill's tag on the A2A agent card, as `[MentorAction(Category = …)]`. It does not change what the assistant sees or does.

### `Describe`

`public MentorActionBuilder Describe(string description)`

What the action does, in the words the model reads to decide when to call it. Required.

### `Hint`

`public MentorActionBuilder Hint(string guidance)`

Guidance for the assistant about what to suggest before or after the action, appended to its description as "Guidance: …", as `[MentorAction(ProactiveHint = …)]`.

### `Name`

`public MentorActionBuilder Name(string name)`

The name the model calls the action by, instead of the method's name, or the command's or the query's type's, in snake\_case: letters, digits, `_` and `-`, up to 64. Another name stops the registration.

### `NavigateTo`

`public MentorActionBuilder NavigateTo(string url)`

The page MentorAgent opens after the action succeeds, when the user is on another one, as `[MentorAction(NavigateTo = …)]`.

### `Off`

`public MentorActionBuilder Off()`

The action ships off, as `[MentorAction(Enabled = false)]`: it is in the catalogue and nowhere else, and a call to it does not run, until an `IMentorActionGovernor` turns it on.

### `ReadOnly`

`public MentorActionBuilder ReadOnly()`

The action only reads: it changes no data. MentorAgent takes your word for it, as for `[MentorAction(ReadOnly = true)]`. Ignored when the action also asks for confirmation. A query is always read-only; a command cannot be.

### `RequireConfirmation`

`public MentorActionBuilder RequireConfirmation(bool required = true)`

Whether the user confirms before the action runs, declared: `true` asks, `false` opts the action out. Not called, the action follows [`MentorOptions.RequireConfirmationForWrites`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoroptions#requireconfirmationforwrites), as a `[MentorAction]` that declares nothing: on by default, so an action that is not [`MentorActionBuilder.ReadOnly`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoractionbuilder#readonly) asks.

### `RequireRoles`

`public MentorActionBuilder RequireRoles(params string[] roles)`

The roles allowed to run the action: a signed-in user who holds any one of them, checked with `ClaimsPrincipal.IsInRole`, as `[MentorAction(RequiredRoles = …)]`. A second call replaces the first.

---

- Previous: [MentorTelemetry class](https://docs.mentoragent.net/api/novior-mentoragent-observability/mentortelemetry.md)
- Next: [MentorActionRegistrations class](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoractionregistrations.md)
