Skip to main content

Overview

Methods

getResources()

Get all static resources (not templates).
Example:

getResourceTemplates()

Get all resource templates.
Example:

findByUri()

Find a resource by exact URI match.
Example:

matchTemplateByUri()

Match a URI against template resources.
Example:

findResourceForUri()

Find resource by URI (exact match or template).
Example:

getExported()

Lookup a resource by its exported (resolved) name.

exportResolvedNames()

Produce unique, conflict-aware exported names.

getInlineResources()

Get resources defined inline (local only).

listAllInstances()

List all resource instances (locals + adopted).

listByOwner()

List resources by owner path.

registerResourceInstance()

Register a pre-constructed ResourceEntry directly.

registerDynamicResource()

Register a resource or template at runtime.
Example:

subscribe()

Subscribe to resource change events.
Returns: Unsubscribe function. Example:

getCapabilities()

Get MCP capabilities for resources.
Example:

hasAny()

Check if any resources exist.

adoptFromChild()

Adopt resources from a child registry.

Change Events

Indexes

Static vs Template Resources

Static Resources

Have a fixed uri property. Found via findByUri().

Template Resources

Have a uriTemplate with parameters. Matched via matchTemplateByUri().
Example: