Table of Contents

Method NarrowedBy

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

NarrowedBy(IReadOnlySet<McpToolCategory>)

Narrows the selection to what a client asked its own session for.

public PublishedToolCategorySelection NarrowedBy(IReadOnlySet<McpToolCategory> requested)

Parameters

requested IReadOnlySet<McpToolCategory>

The categories the client named, empty where it named none this surface publishes.

Returns

PublishedToolCategorySelection

The selection in force for that request.

Remarks

The result is the intersection, so a client can only ever be served fewer tools than the deployment publishes. A category this deployment excluded stays excluded however the request is written, and a request naming only excluded categories is therefore served nothing at all rather than being widened back to the configured set — which is the honest answer to a client that asked for a surface this endpoint does not offer.

An empty request is a request that named nothing this surface publishes, including one that named nothing at all, and leaves the deployment's own selection in force. That keeps a malformed or unknown value from narrowing an endpoint to silence, which is the failure a caller could not tell from a broken deployment.

Exceptions

ArgumentNullException

Thrown when requested is null.