mcp-use TypeScript API
    Preparing search index...

    Interface ResourceDefinition

    Declares a static resource at a fixed URI. First argument to MCPServer.resource.

    interface ResourceDefinition {
        _meta?: MetaObject;
        annotations?: {};
        description?: string;
        mimeType?: string;
        name: string;
        title?: string;
        uri: string;
    }
    Index
    _meta?: MetaObject

    Extension metadata advertised on this resource's resources/list descriptor. Use vendor-namespaced keys for custom data.

    This value is not copied into resources/read content entries; content metadata must be returned by the callback on each entry's own _meta.

    annotations?: {}

    Standard MCP hints describing the resource's audience and presentation.

    description?: string

    Human-readable description.

    mimeType?: string

    MIME type advertised in resource listings. Contents entries carry their own mimeType on the wire — set it in the callback's result.

    name: string

    Resource display name.

    title?: string

    Human-readable title (falls back to name).

    uri: string

    Unique resource URI, e.g. "config://settings".