# MentorAgentRejection record

> Something an IMentorAgentSource left out: a whole definition, or — when MentorAgentRejection.Tool is set — one tool of an agent that loaded without it.

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

## Definition

Namespace: `Novior.MentorAgent.Core`. Package: `Novior.MentorAgent`.

`public sealed record MentorAgentRejection : IEquatable<MentorAgentRejection>`

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

## Constructors

`public MentorAgentRejection(string Name, string ReasonCode, string? Detail)`

Something an [`IMentorAgentSource`](https://docs.mentoragent.net/api/novior-mentoragent-core/imentoragentsource) left out: a whole definition, or — when [`MentorAgentRejection.Tool`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejection#tool) is set — one tool of an agent that loaded without it.

**Parameters**

- `Name`: What was left out, as the source names it. `Novior.MentorAgent.Declarative` gives the file name, or `inline[n]` for the n-th of `MentorDeclarativeOptions.Definitions`; for [`MentorAgentRejectionReasons.SourceFailed`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejectionreasons#sourcefailed), the full type name of the source.
- `ReasonCode`: One of [`MentorAgentRejectionReasons`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejectionreasons), or a code of the source's own.
- `Detail`: What to correct, when there is something to say: for a definition the agent factory refused, its message, which describes the text. Never an exception's message for [`MentorAgentRejectionReasons.SourceFailed`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejectionreasons#sourcefailed): only its type.

## Properties

### `Detail`

`public string? Detail { get; init; }`

What to correct, when there is something to say: for a definition the agent factory refused, its message, which describes the text. Never an exception's message for [`MentorAgentRejectionReasons.SourceFailed`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejectionreasons#sourcefailed): only its type.

### `Name`

`public string Name { get; init; }`

What was left out, as the source names it. `Novior.MentorAgent.Declarative` gives the file name, or `inline[n]` for the n-th of `MentorDeclarativeOptions.Definitions`; for [`MentorAgentRejectionReasons.SourceFailed`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejectionreasons#sourcefailed), the full type name of the source.

### `ReasonCode`

`public string ReasonCode { get; init; }`

One of [`MentorAgentRejectionReasons`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejectionreasons), or a code of the source's own.

### `Tool`

`public string? Tool { get; init; }`

The tool taken away, when the agent loaded without it; `null` when the whole definition was left out.

---

- Previous: [IMentorTeamSource interface](https://docs.mentoragent.net/api/novior-mentoragent-core/imentorteamsource.md)
- Next: [MentorAgentRejectionReasons class](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejectionreasons.md)
