Interface: ResourceConfig<TContext>
Defined in: packages/core/src/resource/ResourceBuilder.ts:60
Configuration for defining a resource.
Type Parameters
| Type Parameter |
|---|
TContext |
Properties
annotations?
readonly optional annotations: {
audience?: ("user" | "assistant")[];
priority?: number;
};Defined in: packages/core/src/resource/ResourceBuilder.ts:76
MCP resource annotations for audience, priority, and freshness.
audience?
readonly optional audience: ("user" | "assistant")[];priority?
readonly optional priority: number;See
https://spec.modelcontextprotocol.io/2025-03-26/server/resources/#resource-annotations
description?
readonly optional description: string;Defined in: packages/core/src/resource/ResourceBuilder.ts:64
Human-readable description shown to AI agents
handler
readonly handler: ResourceHandler<TContext>;Defined in: packages/core/src/resource/ResourceBuilder.ts:81
Handler called when a client reads this resource
mimeType?
readonly optional mimeType: string;Defined in: packages/core/src/resource/ResourceBuilder.ts:66
MIME type of the resource content
subscribable?
readonly optional subscribable: boolean;Defined in: packages/core/src/resource/ResourceBuilder.ts:70
Whether AI agents can subscribe to push notifications for this resource
tags?
readonly optional tags: string[];Defined in: packages/core/src/resource/ResourceBuilder.ts:68
Optional tags for filtering
uri
readonly uri: string;Defined in: packages/core/src/resource/ResourceBuilder.ts:62
URI or URI template (with {placeholders}) identifying this resource