# MentorAgentRejectionReasons class

> The MentorAgentRejectionReasons class of Novior.MentorAgent.Core: The reason codes of MentorAgentRejection.ReasonCode. They stay the same from one version to…

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

The reason codes of [`MentorAgentRejection.ReasonCode`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejection#reasoncode). They stay the same from one version to the next; a new one comes only in a minor version, and the CHANGELOG says so.

## Definition

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

`public static class MentorAgentRejectionReasons`

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

## Fields

### `ForeignTools`

`public const string ForeignTools = "foreign-tools"`

The definition adds tools a definition may not add (`webSearch`, `codeInterpreter`, `fileSearch`, `mcp`), or names a function the session does not have, and they could not be taken away: the agent is not loaded.

### `HostedToolRemoved`

`public const string HostedToolRemoved = "hosted-tool-removed"`

With [`MentorAgentRejection.Tool`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejection#tool): a tool the definition added itself — web search, code interpreter, file search, an MCP server — was taken away. The agent loads with the application's own tools.

### `InvalidConfiguration`

`public const string InvalidConfiguration = "invalid-configuration"`

The configuration exposed to the definitions is not valid for the expressions they are evaluated with. Every definition of the source is left out.

### `InvalidDefinition`

`public const string InvalidDefinition = "invalid-definition"`

The agent factory refused the definition: the YAML does not parse, does not describe a valid agent, or describes something else — a workflow, say, in a file meant to hold an agent.

### `NameTaken`

`public const string NameTaken = "name-taken"`

A team of an [`IMentorTeamSource`](https://docs.mentoragent.net/api/novior-mentoragent-core/imentorteamsource) whose tool name is already taken: by a team written in C\#, an action, one of MentorAgent's own tools, or a team another definition gave first. The code wins; the team is left out.

### `NoMembers`

`public const string NoMembers = "no-members"`

A team of an [`IMentorTeamSource`](https://docs.mentoragent.net/api/novior-mentoragent-core/imentorteamsource) with no member: there is nobody to discuss. Left out.

### `NotAnAgent`

`public const string NotAnAgent = "not-an-agent"`

The definition gave no agent, and no error to say why. The Agent Framework's factory refuses a definition of another kind ([`MentorAgentRejectionReasons.InvalidDefinition`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejectionreasons#invaliddefinition)); this is for a factory or a source that answers with nothing.

### `SourceFailed`

`public const string SourceFailed = "source-failed"`

The whole source threw. Added by MentorAgent, with the source's type as the name and the exception's type, never its message, as the detail; the other sources still load.

### `ToolNotFound`

`public const string ToolNotFound = "tool-not-found"`

With [`MentorAgentRejection.Tool`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejection#tool): a `kind: function` entry names no action this session has — unknown to the application, or off for this session. The agent loads without it.

---

- Previous: [MentorAgentRejection record](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentrejection.md)
- Next: [MentorAgentSourceContext record](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentsourcecontext.md)
