Jeremiah Lowin commited on
Commit
ef1d003
·
1 Parent(s): 7be2f51

Update documentation

Browse files
docs/servers/middleware.mdx CHANGED
@@ -111,9 +111,9 @@ FastMCP middleware handles two types of operations differently:
111
 
112
  **Listing Operations** (`on_list_tools`, `on_list_resources`, `on_list_prompts`, etc.):
113
  - Middleware receives **FastMCP component objects** with full metadata
114
- - These objects include FastMCP-specific properties like `tags` that aren't part of the MCP specification
115
- - The result contains complete component information before it's converted to MCP format
116
- - Tags and other metadata are stripped when finally returned to the MCP client
117
 
118
  **Execution Operations** (`on_call_tool`, `on_read_resource`, `on_get_prompt`):
119
  - Middleware runs **before** the component is executed
@@ -200,7 +200,7 @@ class ListingFilterMiddleware(Middleware):
200
  return filtered_tools
201
  ```
202
 
203
- This filtering happens before the components are converted to MCP format and returned to the client, so the tags (which are FastMCP-specific) are naturally stripped in the final response.
204
 
205
  <Tip>
206
  When filtering components in listing operations, ensure you also prevent execution of filtered components in the corresponding execution hooks (`on_call_tool`, `on_read_resource`, `on_get_prompt`) to maintain consistency.
 
111
 
112
  **Listing Operations** (`on_list_tools`, `on_list_resources`, `on_list_prompts`, etc.):
113
  - Middleware receives **FastMCP component objects** with full metadata
114
+ - These objects include FastMCP-specific properties like `tags` that can be accessed directly from the component
115
+ - The result contains complete component information before it's converted to MCP format
116
+ - Tags are included in the component's `meta` field in the listing response returned to MCP clients
117
 
118
  **Execution Operations** (`on_call_tool`, `on_read_resource`, `on_get_prompt`):
119
  - Middleware runs **before** the component is executed
 
200
  return filtered_tools
201
  ```
202
 
203
+ This filtering happens before the components are converted to MCP format and returned to the client. Tags are accessible both during filtering and are included in the component's `meta` field in the final listing response.
204
 
205
  <Tip>
206
  When filtering components in listing operations, ensure you also prevent execution of filtered components in the corresponding execution hooks (`on_call_tool`, `on_read_resource`, `on_get_prompt`) to maintain consistency.
docs/servers/prompts.mdx CHANGED
@@ -85,7 +85,7 @@ def data_analysis_prompt(
85
  </ParamField>
86
 
87
  <ParamField body="tags" type="set[str] | None">
88
- A set of strings used to categorize the prompt. Clients might use tags to filter or group available prompts
89
  </ParamField>
90
 
91
  <ParamField body="enabled" type="bool" default="True">
 
85
  </ParamField>
86
 
87
  <ParamField body="tags" type="set[str] | None">
88
+ A set of strings used to categorize the prompt. Clients might use tags to filter or group available prompts. Tags are available to clients in the prompt's `meta` field when the prompt is listed (via `list_prompts`)
89
  </ParamField>
90
 
91
  <ParamField body="enabled" type="bool" default="True">
docs/servers/resources.mdx CHANGED
@@ -98,7 +98,7 @@ def get_application_status() -> dict:
98
  </ParamField>
99
 
100
  <ParamField body="tags" type="set[str] | None">
101
- A set of strings for categorization, potentially used by clients for filtering
102
  </ParamField>
103
 
104
  <ParamField body="enabled" type="bool" default="True">
 
98
  </ParamField>
99
 
100
  <ParamField body="tags" type="set[str] | None">
101
+ A set of strings for categorization, potentially used by clients for filtering. Tags are available to clients in the resource's `meta` field when the resource is listed (via `list_resources` or `list_resource_templates`)
102
  </ParamField>
103
 
104
  <ParamField body="enabled" type="bool" default="True">
docs/servers/tools.mdx CHANGED
@@ -76,7 +76,7 @@ def search_products_implementation(query: str, category: str | None = None) -> l
76
  </ParamField>
77
 
78
  <ParamField body="tags" type="set[str] | None">
79
- A set of strings to categorize the tool. Clients might use tags to filter or group available tools
80
  </ParamField>
81
 
82
  <ParamField body="enabled" type="bool" default="True">
 
76
  </ParamField>
77
 
78
  <ParamField body="tags" type="set[str] | None">
79
+ A set of strings to categorize the tool. Clients might use tags to filter or group available tools. Tags are available to clients in the tool's `meta` field when the tool is listed (via `list_tools`)
80
  </ParamField>
81
 
82
  <ParamField body="enabled" type="bool" default="True">