mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 14:04:18 +02:00
Stop duplicating path parameter descriptions into tool prose (#3149)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
This commit is contained in:
parent
263e0bf6e0
commit
0f95ed72cd
9 changed files with 163 additions and 155 deletions
|
|
@ -72,26 +72,7 @@ format_json_for_description(data: Any, indent: int = 2) -> str
|
|||
Formats Python data as a JSON string block for Markdown.
|
||||
|
||||
|
||||
### `format_simple_description` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/openapi/formatters.py#L192" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
||||
|
||||
```python
|
||||
format_simple_description(base_description: str, parameters: list[ParameterInfo] | None = None, request_body: RequestBodyInfo | None = None) -> str
|
||||
```
|
||||
|
||||
|
||||
Formats a simple description for MCP objects (tools, resources, prompts).
|
||||
Excludes response details, examples, and verbose status codes.
|
||||
|
||||
**Args:**
|
||||
- `base_description`: The initial description to be formatted.
|
||||
- `parameters`: A list of parameter information.
|
||||
- `request_body`: Information about the request body.
|
||||
|
||||
**Returns:**
|
||||
- The formatted description string with minimal details.
|
||||
|
||||
|
||||
### `format_description_with_responses` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/openapi/formatters.py#L225" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
||||
### `format_description_with_responses` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/openapi/formatters.py#L192" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
||||
|
||||
```python
|
||||
format_description_with_responses(base_description: str, responses: dict[str, Any], parameters: list[ParameterInfo] | None = None, request_body: RequestBodyInfo | None = None) -> str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue