mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-20 20:44:17 +02:00
fix escaping problem
This commit is contained in:
parent
094d259389
commit
98a91cbd9e
7 changed files with 14 additions and 15 deletions
|
|
@ -30,7 +30,7 @@ update_claude_config(file_spec: str, server_name: str) -> bool
|
|||
Add or update a FastMCP server in Claude's configuration.
|
||||
|
||||
**Args:**
|
||||
- `file_spec`: Path to the server file, optionally with :object suffix
|
||||
- `file_spec`: Path to the server file, optionally with \:object suffix
|
||||
- `server_name`: Name for the server in Claude's config
|
||||
- `with_editable`: Optional directory to install in editable mode
|
||||
- `with_packages`: Optional list of additional packages to install
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ parse_file_path(server_spec: str) -> tuple[Path, str | None]
|
|||
Parse a file path that may include a server object specification.
|
||||
|
||||
**Args:**
|
||||
- `server_spec`: Path to file, optionally with :object suffix
|
||||
- `server_spec`: Path to file, optionally with \:object suffix
|
||||
|
||||
**Returns:**
|
||||
- Tuple of (file_path, server_object)
|
||||
|
|
@ -47,7 +47,7 @@ Import a MCP server from a file.
|
|||
|
||||
**Args:**
|
||||
- `file`: Path to the file
|
||||
- `server_object`: Optional object name in format "module:object" or just "object"
|
||||
- `server_object`: Optional object name in format "module\:object" or just "object"
|
||||
|
||||
**Returns:**
|
||||
- The server object
|
||||
|
|
@ -97,7 +97,7 @@ run_command(server_spec: str, transport: str | None = None, host: str | None = N
|
|||
Run a MCP server or connect to a remote one.
|
||||
|
||||
**Args:**
|
||||
- `server_spec`: Python file, object specification (file:obj), or URL
|
||||
- `server_spec`: Python file, object specification (file\:obj), or URL
|
||||
- `transport`: Transport protocol to use
|
||||
- `host`: Host to bind to when using http transport
|
||||
- `port`: Port to bind to when using http transport
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ This is intended to be provided to the `auth` parameter of an
|
|||
httpx.AsyncClient (or appropriate FastMCP client/transport instance)
|
||||
|
||||
**Args:**
|
||||
- `mcp_url`: Full URL to the MCP endpoint (e.g.,
|
||||
- `"http`: //host/mcp/sse/")
|
||||
- `mcp_url`: Full URL to the MCP endpoint (e.g. "http\://host/mcp/sse/")
|
||||
- `scopes`: OAuth scopes to request. Can be a
|
||||
- `client_name`: Name for this client during registration
|
||||
- `token_storage_cache_dir`: Directory for FileTokenStorage
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ This decorator supports multiple calling patterns:
|
|||
- `name`: Optional name for the tool (keyword-only, alternative to name_or_fn)
|
||||
- `description`: Optional description of what the tool does
|
||||
- `tags`: Optional set of tags for categorizing the tool
|
||||
- `annotations`: Optional annotations about the tool's behavior (e.g. {"is_async": True})
|
||||
- `annotations`: Optional annotations about the tool's behavior (e.g. {"is_async"\: True})
|
||||
- `exclude_args`: Optional list of argument names to exclude from the tool schema
|
||||
- `enabled`: Optional boolean to enable or disable the tool
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ If the URI contains parameters (e.g. "resource://{param}") or the function
|
|||
has parameters, it will be registered as a template resource.
|
||||
|
||||
**Args:**
|
||||
- `uri`: URI for the resource (e.g. "resource://my-resource" or "resource://{param}")
|
||||
- `uri`: URI for the resource (e.g. "resource\://my-resource" or "resource\://{param}")
|
||||
- `name`: Optional name for the resource
|
||||
- `description`: Optional description of the resource
|
||||
- `mime_type`: Optional MIME type for the resource
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@ to call the parent tool. Functions with **kwargs receive transformed
|
|||
argument names.
|
||||
- `name`: New name for the tool. Defaults to parent tool's name.
|
||||
- `transform_args`: Optional transformations for parent tool arguments.
|
||||
Only specified arguments are transformed, others pass through unchanged:
|
||||
- str: Simple rename
|
||||
- ArgTransform: Complex transformation (rename/description/default/drop)
|
||||
- None: Drop the argument
|
||||
Only specified arguments are transformed, others pass through unchanged\:
|
||||
- str\: Simple rename
|
||||
- ArgTransform\: Complex transformation (rename/description/default/drop)
|
||||
- None\: Drop the argument
|
||||
- `description`: New description. Defaults to parent's description.
|
||||
- `tags`: New tags. Defaults to parent's tags.
|
||||
- `annotations`: New annotations. Defaults to parent's annotations.
|
||||
|
|
|
|||
|
|
@ -20,6 +20,6 @@ Remove the given parameters from the schema.
|
|||
- `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_additional_properties`: Whether to remove additionalProperties\: false
|
||||
- `prune_titles`: Whether to remove title fields from the schema
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue