fastmcp.server.providers.local_provider.decorators.resources
Resource decorator mixin for LocalProvider.
This module provides the ResourceDecoratorMixin class that adds resource
and template registration functionality to LocalProvider.
Classes
ResourceDecoratorMixin
Mixin class providing resource decorator functionality for LocalProvider.
This mixin contains all methods related to:
- Resource registration via add_resource()
- Resource template registration via add_template()
- Resource decorator (@provider.resource)
add_resource
add_template
resource
uri: URI for the resource (e.g. “resource://my-resource” or “resource://”)name: Optional name for the resourcetitle: Optional title for the resourcedescription: Optional description of the resourceicons: Optional icons for the resourcemime_type: Optional MIME type for the resourcetags: Optional set of tags for categorizing the resourceenabled: Whether the resource is enabled (default True). If False, adds to blocklist.annotations: Optional annotations about the resource’s behaviormeta: Optional meta information about the resourcetask: Optional task configuration for background executionauth: Optional authorization checks for the resource
- A decorator function.

