mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-12 16:49:10 +02:00
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
25 lines
857 B
Text
25 lines
857 B
Text
---
|
|
title: json_schema
|
|
sidebarTitle: json_schema
|
|
---
|
|
|
|
# `fastmcp.utilities.json_schema`
|
|
|
|
## Functions
|
|
|
|
### `compress_schema` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/json_schema.py#L200" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
|
|
|
```python
|
|
compress_schema(schema: dict, prune_params: list[str] | None = None, prune_defs: bool = True, prune_additional_properties: bool = True, prune_titles: bool = False) -> dict
|
|
```
|
|
|
|
|
|
Remove the given parameters from the schema.
|
|
|
|
**Args:**
|
|
- `schema`: The schema to compress
|
|
- `prune_params`: List of parameter names to remove from properties
|
|
- `prune_defs`: Whether to remove unused definitions
|
|
- `prune_additional_properties`: Whether to remove additionalProperties\: false
|
|
- `prune_titles`: Whether to remove title fields from the schema
|
|
|