@@ -118,6 +118,46 @@ Decorator for registering tools. Can be used with or without arguments.
118118| ` requires_metadata ` | ` list[str] \| None ` | List of metadata keys the tool requires | ` None ` |
119119| ` adapters ` | ` list[ErrorAdapter] \| None ` | Error adapters for custom error handling | ` None ` |
120120| ` metadata ` | ` ToolMetadata \| None ` | Additional tool metadata | ` None ` |
121+ | ` meta ` | ` dict[str, Any] \| None ` | Arbitrary ` _meta ` extensions (e.g., ` {"ui": {"resourceUri": "..."}} ` ) | ` None ` |
122+
123+ #### ` resource `
124+
125+ ``` python
126+ @app.resource (
127+ " config://settings" ,
128+ name = " Settings" ,
129+ description = " Application settings" ,
130+ mime_type = " application/json" ,
131+ )
132+ def settings_handler (uri : str ) -> str :
133+ ...
134+ ```
135+
136+ Decorator for registering resources and resource templates. See [ Resources] ( /references/mcp/python/resources ) for full documentation.
137+
138+ #### ` add_resource `
139+
140+ ``` python
141+ app.add_resource(uri, name = None , handler = my_handler, ... )
142+ ```
143+
144+ Imperative form of ` @app.resource ` . See [ Resources] ( /references/mcp/python/resources ) for full documentation.
145+
146+ #### ` add_text_resource `
147+
148+ ``` python
149+ app.add_text_resource(uri, text = " ..." , name = None , ... )
150+ ```
151+
152+ Register a static text resource. See [ Resources] ( /references/mcp/python/resources ) for full documentation.
153+
154+ #### ` add_file_resource `
155+
156+ ``` python
157+ app.add_file_resource(uri, path = " path/to/file" , name = None , ... )
158+ ```
159+
160+ Register a file-backed resource. See [ Resources] ( /references/mcp/python/resources ) for full documentation.
121161
122162#### ` add_tool `
123163
0 commit comments