Class PublishedToolCategorySelection
- Namespace
- MailFathom.Mcp.Tools.Categories
- Assembly
- MailFathom.Mcp.dll
The categories one endpoint may publish, which is what a deployment states and what a client may narrow.
public sealed class PublishedToolCategorySelection
- Inheritance
-
PublishedToolCategorySelection
- Inherited Members
Remarks
A deployment composes one of these from its own configuration and it is the authority: a tool outside it is absent from every listing and its name answers nothing, whatever a caller presents and whatever a request asks for. What a client may do is NarrowedBy(IReadOnlySet<McpToolCategory>), which intersects and therefore only ever takes away.
It cannot turn anything on. A category naming a capability the deployment has not enabled publishes nothing, because selecting a category removes descriptors and never adds one — the capability switches stay the authority over whether a tool exists at all, and the grant stays the authority over whether this caller may reach it.
Composed once while the host is being composed and read from every request, so the instance is immutable and safe to share across threads.
Properties
- Categories
Gets the selected categories, in the order All declares them.
- Everything
Gets the selection publishing every category, which is what a deployment that names none publishes.
Methods
- NarrowedBy(IReadOnlySet<McpToolCategory>)
Narrows the selection to what a client asked its own session for.
- Of(IEnumerable<McpToolCategory>)
Composes the selection a deployment named.
- Publishes(McpToolCategory)
Reports whether this endpoint publishes a category at all.