Table of Contents

Method TryParse

Namespace
MailFathom.Mcp.Tools.Categories
Assembly
MailFathom.Mcp.dll

TryParse(string?, out McpToolCategory)

Parses an operator-supplied or client-supplied category name.

public static bool TryParse(string? name, out McpToolCategory category)

Parameters

name string

The written name, which may be absent or anything at all.

category McpToolCategory

The parsed category when the name is published; otherwise the unspecified default.

Returns

bool

true when the name is one this surface publishes; otherwise false.

Remarks

The comparison ignores case and surrounding whitespace, unlike a permission name, which is compared byte for byte because it also has to travel as an OAuth scope. A category travels as a configuration value and as a header token and as nothing else, so a spelling this accepts is a spelling nothing downstream can read differently — which makes case-folding here a kindness rather than a second meaning.