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
namestringThe written name, which may be absent or anything at all.
categoryMcpToolCategoryThe parsed category when the name is published; otherwise the unspecified default.
Returns
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.