Table of Contents

Enum CacheScope

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Indicates the intended scope of a cached response, analogous to the HTTP Cache-Control: public and Cache-Control: private directives.

[JsonConverter(typeof(JsonStringEnumConverter<CacheScope>))]
public enum CacheScope

Fields

[JsonStringEnumMemberName("private")] Private = 1

The response contains user-specific data. Only the requesting user's client may cache it. Shared caches (for example, multi-tenant gateways) must not serve the cached response to a different user.

This is appropriate for resources/read results that depend on the authenticated user, or for filtered list results that vary per user.

[JsonStringEnumMemberName("public")] Public = 0

The response does not contain user-specific data. Any client, shared gateway, or caching proxy may store and serve the cached response to any user.

This is appropriate for lists of tools, prompts, and resource templates that are identical for all users.

Remarks

This is used by CacheScope to control who may cache a response returned by tools/list, prompts/list, resources/list, resources/templates/list, and resources/read.

When the field is absent from a response, clients should treat it as Public.