chore: Update SDK documentation (#4360)

This commit is contained in:
marvin-context-protocol[bot] 2026-06-27 10:36:03 -04:00 committed by GitHub
commit 4d5627ba5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 49 additions and 117 deletions

View file

@ -1,8 +0,0 @@
---
title: client
sidebarTitle: client
---
# `fastmcp.client`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: __init__
sidebarTitle: __init__
---
# `fastmcp.experimental`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: __init__
sidebarTitle: __init__
---
# `fastmcp.experimental.sampling`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: handlers
sidebarTitle: handlers
---
# `fastmcp.experimental.sampling.handlers`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: __init__
sidebarTitle: __init__
---
# `fastmcp.experimental.transforms`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: prompts
sidebarTitle: prompts
---
# `fastmcp.prompts`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: resources
sidebarTitle: resources
---
# `fastmcp.resources`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: server
sidebarTitle: server
---
# `fastmcp.server`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: tools
sidebarTitle: tools
---
# `fastmcp.tools`
*This module is empty or contains only private/internal implementations.*

View file

@ -9,17 +9,19 @@ sidebarTitle: types
Reusable type annotations for FastMCP tool parameters.
These types can be used in tool function signatures to influence how
parameters are presented in UIs (e.g. ``fastmcp dev apps``) and
parameters are presented in UIs (e.g. `fastmcp dev apps`) and
serialized in JSON Schema.
Example::
Example:
from fastmcp import FastMCP
from fastmcp.types import Textarea
```python
from fastmcp import FastMCP
from fastmcp.types import Textarea
mcp = FastMCP("demo")
mcp = FastMCP("demo")
@mcp.tool()
def run_query(sql: Textarea) -> str:
...
@mcp.tool()
def run_query(sql: Textarea) -> str:
...
```

View file

@ -126,7 +126,24 @@ No-ops if task_config.mode is "forbidden". Subclasses override to
register their callable (self.run, self.read, self.render, or self.fn).
#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/components.py#L235" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
#### `coerce_task_arguments` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/components.py#L235" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
coerce_task_arguments(self, arguments: dict[str, Any]) -> dict[str, Any]
```
Validate and coerce task arguments before any task state is created.
Called by ``submit_to_docket`` up front, so invalid inputs raise before
the task's Redis metadata and initial status notification exist —
otherwise a coercion failure during queueing would orphan a task the
client has already observed. The base implementation is a no-op;
components that splat arguments into a typed Python callable (e.g.
``FunctionTool``) override this to mirror the synchronous validation
path.
#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/components.py#L248" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
add_to_docket(self, docket: Docket, *args: Any, **kwargs: Any) -> Execution
@ -143,7 +160,7 @@ Subclasses override this to handle their specific calling conventions:
The **kwargs are passed through to docket.add() (e.g., key=task_key).
#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/components.py#L257" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/components.py#L270" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
get_span_attributes(self) -> dict[str, Any]

View file

@ -7,7 +7,24 @@ sidebarTitle: json_schema
## Functions
### `dereference_refs` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/json_schema.py#L104" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
### `require_discriminator_property` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/json_schema.py#L116" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
require_discriminator_property(schema: dict[str, Any]) -> dict[str, Any]
```
Keep an OpenAPI discriminator's tag mandatory after the keyword is dropped.
Returns a copy of *schema* with ``discriminator.propertyName`` added to each
``anyOf``/``oneOf`` variant's ``required`` list. A Pydantic discriminated
union whose tag has a default omits that tag from ``required``; without this,
an untagged payload passes the generated schema but fails later in the source
model with ``union_tag_not_found``. No-op if there is no string
``propertyName``.
### `dereference_refs` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/json_schema.py#L147" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
dereference_refs(schema: dict[str, Any]) -> dict[str, Any]
@ -40,7 +57,7 @@ schemas from untrusted servers.
- when no longer needed
### `resolve_root_ref` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/json_schema.py#L251" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
### `resolve_root_ref` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/json_schema.py#L294" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
resolve_root_ref(schema: dict[str, Any]) -> dict[str, Any]
@ -62,7 +79,7 @@ the referenced definition while preserving $defs for nested references.
- if no resolution is needed
### `compress_schema` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/json_schema.py#L645" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
### `compress_schema` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/utilities/json_schema.py#L688" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
compress_schema(schema: dict[str, Any], prune_params: list[str] | None = None, prune_additional_properties: bool = False, prune_titles: bool = False, dereference: bool = False) -> dict[str, Any]

View file

@ -1,8 +0,0 @@
---
title: __init__
sidebarTitle: __init__
---
# `fastmcp.utilities.mcp_server_config.v1`
*This module is empty or contains only private/internal implementations.*

View file

@ -1,8 +0,0 @@
---
title: __init__
sidebarTitle: __init__
---
# `fastmcp.utilities.mcp_server_config.v1.sources`
*This module is empty or contains only private/internal implementations.*