From 6ece5462db577bc1c5500b37df34475066f6fedd Mon Sep 17 00:00:00 2001 From: Didier Durand <2927957+didier-durand@users.noreply.github.com> Date: Fri, 12 Sep 2025 00:07:02 +0200 Subject: [PATCH] [Doc]: fixing typos in multiple files (#1804) --- docs/python-sdk/fastmcp-tools-tool_transform.mdx | 2 +- docs/servers/proxy.mdx | 2 +- src/fastmcp/client/auth/oauth.py | 2 +- src/fastmcp/client/client.py | 2 +- src/fastmcp/contrib/component_manager/component_service.py | 2 +- src/fastmcp/contrib/mcp_mixin/README.md | 2 +- src/fastmcp/server/context.py | 6 +++--- src/fastmcp/settings.py | 2 +- src/fastmcp/tools/tool_transform.py | 2 +- .../utilities/mcp_server_config/v1/mcp_server_config.py | 2 +- tests/server/middleware/test_rate_limiting.py | 2 +- tests/test_mcp_config.py | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/python-sdk/fastmcp-tools-tool_transform.mdx b/docs/python-sdk/fastmcp-tools-tool_transform.mdx index 9ad99ae30..ea8652fab 100644 --- a/docs/python-sdk/fastmcp-tools-tool_transform.mdx +++ b/docs/python-sdk/fastmcp-tools-tool_transform.mdx @@ -69,7 +69,7 @@ apply_transformations_to_tools(tools: dict[str, Tool], transformations: dict[str ``` -Apply a list of transformations to a list of tools. Tools that do not have any transforamtions +Apply a list of transformations to a list of tools. Tools that do not have any transformations are left unchanged. diff --git a/docs/servers/proxy.mdx b/docs/servers/proxy.mdx index 1ca535968..82daccb5d 100644 --- a/docs/servers/proxy.mdx +++ b/docs/servers/proxy.mdx @@ -256,7 +256,7 @@ composite_proxy = FastMCP.as_proxy(config, name="Composite Proxy") When you access tools, resources, or prompts from a proxy server, they are "mirrored" from the remote server. Mirrored components cannot be modified directly since they reflect the state of the remote server. For example, you can not simply "disable" a mirrored component. -However, you can create a copy of a mirrored component and store it as a new locally-defined component. Local components always take precedence over mirored ones because the proxy server will check its own registry before it attempts to engage the remote server. +However, you can create a copy of a mirrored component and store it as a new locally-defined component. Local components always take precedence over mirrored ones because the proxy server will check its own registry before it attempts to engage the remote server. Therefore, to enable or disable a proxy tool, resource, or prompt, you should first create a local copy and add it to your own server. Here's an example of how to do that for a tool: diff --git a/src/fastmcp/client/auth/oauth.py b/src/fastmcp/client/auth/oauth.py index c703950d4..18c4cb1b6 100644 --- a/src/fastmcp/client/auth/oauth.py +++ b/src/fastmcp/client/auth/oauth.py @@ -355,7 +355,7 @@ class OAuth(OAuthClientProvider): raise TimeoutError(f"OAuth callback timed out after {TIMEOUT} seconds") finally: server.should_exit = True - await asyncio.sleep(0.1) # Allow server to shutdown gracefully + await asyncio.sleep(0.1) # Allow server to shut down gracefully tg.cancel_scope.cancel() raise RuntimeError("OAuth callback handler could not be started") diff --git a/src/fastmcp/client/client.py b/src/fastmcp/client/client.py index 5eb0e0ede..bcbab30b0 100644 --- a/src/fastmcp/client/client.py +++ b/src/fastmcp/client/client.py @@ -454,7 +454,7 @@ class Client(Generic[ClientTransportT]): if self._session_state.nesting_counter > 0: return - # stop the active seesion + # stop the active session if self._session_state.session_task is None: return self._session_state.stop_event.set() diff --git a/src/fastmcp/contrib/component_manager/component_service.py b/src/fastmcp/contrib/component_manager/component_service.py index d8b1736f3..b63dff339 100644 --- a/src/fastmcp/contrib/component_manager/component_service.py +++ b/src/fastmcp/contrib/component_manager/component_service.py @@ -174,7 +174,7 @@ class ComponentService: key: The key of the prompt to enable Returns: - The prompt that was enable + The prompt that was enabled """ logger.debug("Enabling prompt: %s", key) diff --git a/src/fastmcp/contrib/mcp_mixin/README.md b/src/fastmcp/contrib/mcp_mixin/README.md index 86c46651c..e02d57cba 100644 --- a/src/fastmcp/contrib/mcp_mixin/README.md +++ b/src/fastmcp/contrib/mcp_mixin/README.md @@ -16,7 +16,7 @@ Prompts: * [enable/disable](https://gofastmcp.com/servers/prompts#disabling-prompts) Resources: -* [enable/disabe](https://gofastmcp.com/servers/resources#disabling-resources) +* [enable/disable](https://gofastmcp.com/servers/resources#disabling-resources) ## Usage diff --git a/src/fastmcp/server/context.py b/src/fastmcp/server/context.py index 40fac923a..974ca4be4 100644 --- a/src/fastmcp/server/context.py +++ b/src/fastmcp/server/context.py @@ -449,7 +449,7 @@ class Context: AcceptedElicitation[dict[str, Any]] | DeclinedElicitation | CancelledElicitation ): ... - """When response_type is None, the accepted elicitaiton will contain an + """When response_type is None, the accepted elicitation will contain an empty dict""" @overload @@ -459,7 +459,7 @@ class Context: response_type: type[T], ) -> AcceptedElicitation[T] | DeclinedElicitation | CancelledElicitation: ... - """When response_type is not None, the accepted elicitaiton will contain the + """When response_type is not None, the accepted elicitation will contain the response data""" @overload @@ -469,7 +469,7 @@ class Context: response_type: list[str], ) -> AcceptedElicitation[str] | DeclinedElicitation | CancelledElicitation: ... - """When response_type is a list of strings, the accepted elicitaiton will + """When response_type is a list of strings, the accepted elicitation will contain the selected string response""" async def elicit( diff --git a/src/fastmcp/settings.py b/src/fastmcp/settings.py index 5cbc8dfad..431b65236 100644 --- a/src/fastmcp/settings.py +++ b/src/fastmcp/settings.py @@ -272,7 +272,7 @@ class Settings(BaseSettings): If None, no automatic configuration will take place. - This setting is *always* overriden by any auth provider passed to the + This setting is *always* overridden by any auth provider passed to the FastMCP constructor. Note that most auth providers require additional configuration diff --git a/src/fastmcp/tools/tool_transform.py b/src/fastmcp/tools/tool_transform.py index 56e0bfd82..c1bd5b69e 100644 --- a/src/fastmcp/tools/tool_transform.py +++ b/src/fastmcp/tools/tool_transform.py @@ -934,7 +934,7 @@ def apply_transformations_to_tools( tools: dict[str, Tool], transformations: dict[str, ToolTransformConfig], ) -> dict[str, Tool]: - """Apply a list of transformations to a list of tools. Tools that do not have any transforamtions + """Apply a list of transformations to a list of tools. Tools that do not have any transformations are left unchanged. """ diff --git a/src/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py b/src/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py index eb1937166..0f402e084 100644 --- a/src/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py +++ b/src/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py @@ -26,7 +26,7 @@ logger = get_logger("cli.config") FASTMCP_JSON_SCHEMA = "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json" -# Type alias for source union (will expand with GitSource, etc in future) +# Type alias for source union (will expand with GitSource, etc. in future) SourceType: TypeAlias = FileSystemSource # Type alias for environment union (will expand with other environments in future) diff --git a/tests/server/middleware/test_rate_limiting.py b/tests/server/middleware/test_rate_limiting.py index 7cc2083e7..0a4e1d67b 100644 --- a/tests/server/middleware/test_rate_limiting.py +++ b/tests/server/middleware/test_rate_limiting.py @@ -357,7 +357,7 @@ class TestRateLimitingMiddlewareIntegration: rate_limit_server.add_middleware( SlidingWindowRateLimitingMiddleware( max_requests=5, # Accounting for extra list_tools calls - window_minutes=1, # 1 minute window + window_minutes=1, # 1-minute window ) ) diff --git a/tests/test_mcp_config.py b/tests/test_mcp_config.py index 1500a7ddd..bd2cf6280 100644 --- a/tests/test_mcp_config.py +++ b/tests/test_mcp_config.py @@ -610,7 +610,7 @@ async def test_canonical_multi_client_with_transforms(tmp_path: Path): "test_1": { "command": "python", "args": [str(script_path)], - "tools": { # <--- Will be ignored as its not valid for a canonical MCPConfig + "tools": { # <--- Will be ignored as it's not valid for a canonical MCPConfig "add": { "name": "transformed_add", "arguments": {