Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
10,524 in github.com/PrefectHQ/fastmcp
⨍
Functions
10,524
◇
Types & classes
1,545
↳
Endpoints
103
↓ 2 callers
Method
_chat_completion_to_create_message_result
( chat_completion: ChatCompletion, )
fastmcp_slim/fastmcp/client/sampling/handlers/openai.py:387
↓ 2 callers
Method
_cleanup_expired
Remove all entries whose TTL has elapsed.
fastmcp_slim/fastmcp/utilities/token_cache.py:150
↓ 2 callers
Method
_cleanup_expired_jtis
Remove expired JTIs from cache.
fastmcp_slim/fastmcp/server/auth/cimd.py:489
↓ 2 callers
Function
_coerce_tool_transform_configs
(tools: dict[str, Any])
fastmcp_slim/fastmcp/mcp_config.py:74
↓ 2 callers
Function
_collect_stats
Collect a full snapshot of system stats.
examples/apps/system_monitor/system_monitor_server.py:48
↓ 2 callers
Function
_compute_summary
(rows: list[dict])
examples/apps/explorer/explorer_server.py:300
↓ 2 callers
Method
_connect
Establish or reuse a session connection. This method implements the reentrant context manager pattern: - First call: Creates
fastmcp_slim/fastmcp/client/client.py:540
↓ 2 callers
Function
_content_block_to_dict
Serialize a single content block to a JSON-safe dict.
fastmcp_slim/fastmcp/cli/client.py:452
↓ 2 callers
Function
_convert_nullable_field
Convert OpenAPI nullable field to JSON Schema type array.
fastmcp_slim/fastmcp/utilities/openapi/json_schema_converter.py:156
↓ 2 callers
Function
_convert_tool_choice_to_google_genai
Convert MCP ToolChoice to Google GenAI ToolConfig.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:165
↓ 2 callers
Method
_convert_tools_to_anthropic
Convert MCP tools to Anthropic tool format.
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:362
↓ 2 callers
Method
_cookie_signing_key
Return the key used for HMAC-signing consent cookies. Uses the upstream client secret when available, falling back to the JWT signing
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:80
↓ 2 callers
Method
_create_basic_auth_header
Create HTTP Basic Auth header value from client credentials.
fastmcp_slim/fastmcp/server/auth/providers/introspection.py:150
↓ 2 callers
Function
_create_client_factory
Create a client factory from the given target. Internal helper that handles the session strategy based on the target type: - Connected Client
fastmcp_slim/fastmcp/server/providers/proxy.py:794
↓ 2 callers
Function
_create_dataclass
Create dataclass from object schema.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:652
↓ 2 callers
Function
_decode_jwt_part
Decode a JWT part (header or payload) without signature verification. Args: token: JWT token string (header.payload.signature) pa
fastmcp_slim/fastmcp/utilities/auth.py:10
↓ 2 callers
Method
_decode_list_cookie
Decode and verify a signed base64-encoded JSON list from cookie. Returns [] if missing/invalid.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:124
↓ 2 callers
Function
_dict_to_enum_schema
Convert dict enum to SEP-1330 compliant schema pattern. Args: enum_dict: {"low": {"title": "Low Priority"}, "medium": {"title": "Medium P
fastmcp_slim/fastmcp/server/elicitation.py:343
↓ 2 callers
Function
_dispatch_decorator
Shared dispatch logic for @app.tool() and @app.ui() calling patterns.
fastmcp_slim/fastmcp/apps/app.py:109
↓ 2 callers
Function
_elicit_keys
Build (request, response, status) Redis keys for a task's elicitation.
fastmcp_slim/fastmcp/server/tasks/elicitation.py:41
↓ 2 callers
Method
_encode_list_cookie
Encode values to base64 and sign with HMAC. Returns: signed cookie value (payload.signature)
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:153
↓ 2 callers
Function
_execute_single_tool
Execute a single tool and return its result.
fastmcp_slim/fastmcp/server/sampling/run.py:284
↓ 2 callers
Method
_extract_schema_dependencies
Extract all schema names referenced by a schema (including transitive dependencies). Args: schema: The schema to analyze
fastmcp_slim/fastmcp/utilities/openapi/parser.py:535
↓ 2 callers
Method
_extract_upstream_claims
Extract upstream claims to embed in FastMCP JWT. Override this method to decode upstream tokens, call userinfo endpoints, or otherwis
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:1351
↓ 2 callers
Function
_filter_rows
( rows: list[dict], region: str = "All", product: str = "All", )
examples/apps/explorer/explorer_server.py:287
↓ 2 callers
Function
_format_host_for_url
Format a host for inclusion in a URL, bracketing IPv6 addresses. A bare IPv6 address like ``::1`` must be wrapped in brackets when placed bef
fastmcp_slim/fastmcp/server/mixins/transport.py:40
↓ 2 callers
Function
_get_arguments_str
Get a string representation of the arguments.
fastmcp_slim/fastmcp/server/middleware/caching.py:538
↓ 2 callers
Function
_get_candidate_from_response
Extract the first candidate from a response.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:310
↓ 2 callers
Method
_get_client
Gets a client instance by calling the sync or async factory.
fastmcp_slim/fastmcp/server/providers/proxy.py:131
↓ 2 callers
Method
_get_data
Get raw image data as base64-encoded string.
fastmcp_slim/fastmcp/utilities/types.py:278
↓ 2 callers
Function
_get_duration_ms
(start_time: float, /)
fastmcp_slim/fastmcp/server/middleware/logging.py:255
↓ 2 callers
Method
_get_execute_tool
(self)
fastmcp_slim/fastmcp/experimental/transforms/code_mode.py:584
↓ 2 callers
Method
_get_model
(self, model_preferences: ModelPreferences | None)
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:136
↓ 2 callers
Method
_get_tool
(self, name: str, version: Any = None)
fastmcp_slim/fastmcp/apps/app.py:396
↓ 2 callers
Method
_get_tool
( self, name: str, version: VersionSpec | None = None )
tests/server/test_providers.py:55
↓ 2 callers
Method
_get_visible_tools
Get the auth-filtered tool catalog, excluding pinned tools.
fastmcp_slim/fastmcp/server/transforms/search/base.py:257
↓ 2 callers
Function
_has_read_only_properties
Quick check if schema has any readOnly properties.
fastmcp_slim/fastmcp/utilities/openapi/json_schema_converter.py:192
↓ 2 callers
Function
_has_ref
Check if a schema contains any $ref.
fastmcp_slim/fastmcp/server/middleware/dereference.py:67
↓ 2 callers
Function
_has_write_only_properties
Quick check if schema has any writeOnly properties.
fastmcp_slim/fastmcp/utilities/openapi/json_schema_converter.py:202
↓ 2 callers
Function
_import_key_for_algorithm
(key: str | bytes | JWKKeyData, algorithm: str)
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:32
↓ 2 callers
Function
_inject_log_panel
Inject the MCP message log panel before </body>.
fastmcp_slim/fastmcp/cli/apps_dev.py:921
↓ 2 callers
Function
_is_backend_tool
Check whether a tool is handled specially as backend tool Tools registered via ``@app.tool()`` (without ``model=True``) have ``meta["ui"]["vi
fastmcp_slim/fastmcp/server/server.py:211
↓ 2 callers
Function
_is_simple_type
Check if a schema represents a simple (non-complex) type.
fastmcp_slim/fastmcp/cli/generate.py:32
↓ 2 callers
Method
_list_resource_templates_mcp
List all available resource templates, in the format expected by the low-level MCP server. Supports pagination when list_page_size is
fastmcp_slim/fastmcp/server/mixins/mcp_operations.py:143
↓ 2 callers
Method
_list_resources
List all resources from the remote server.
fastmcp_slim/fastmcp/server/providers/proxy.py:665
↓ 2 callers
Method
_list_tools
(self)
tests/server/test_providers.py:76
↓ 2 callers
Method
_list_tools
(self)
tests/server/providers/test_base_provider.py:31
↓ 2 callers
Function
_lookup_task_execution
Look up task execution and metadata from Redis. Consolidates the common pattern of fetching task metadata from Redis, validating it exists, a
fastmcp_slim/fastmcp/server/tasks/requests.py:72
↓ 2 callers
Method
_make_call_tool
Create the call_tool proxy that executes discovered tools.
fastmcp_slim/fastmcp/server/transforms/search/base.py:223
↓ 2 callers
Method
_make_client_key
Create a stable key for consent tracking from client_id and redirect_uri.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:59
↓ 2 callers
Method
_make_get_prompt_tool
Create the get_prompt tool.
fastmcp_slim/fastmcp/server/transforms/prompts_as_tools.py:126
↓ 2 callers
Method
_make_list_prompts_tool
Create the list_prompts tool.
fastmcp_slim/fastmcp/server/transforms/prompts_as_tools.py:93
↓ 2 callers
Method
_make_list_resources_tool
Create the list_resources tool.
fastmcp_slim/fastmcp/server/transforms/resources_as_tools.py:96
↓ 2 callers
Method
_make_read_resource_tool
Create the read_resource tool.
fastmcp_slim/fastmcp/server/transforms/resources_as_tools.py:135
↓ 2 callers
Method
_make_reader_tool
(self)
tests/server/transforms/test_catalog.py:53
↓ 2 callers
Function
_make_restoring_handler
Wrap a proxy handler to restore request_ctx before delegating. The wrapper is a plain ``async def`` so it passes ``inspect.isfunction()`` che
fastmcp_slim/fastmcp/server/providers/proxy.py:1061
↓ 2 callers
Method
_make_search_tool
Create the search tool. Subclasses define the parameter schema.
fastmcp_slim/fastmcp/server/transforms/search/base.py:219
↓ 2 callers
Function
_make_summary
(entry: dict[str, Any])
fastmcp_slim/fastmcp/apps/file_upload.py:92
↓ 2 callers
Method
_make_synthetic_tool
(self)
tests/server/transforms/test_catalog.py:81
↓ 2 callers
Method
_make_tool
(self, row: aiosqlite.Row)
examples/providers/sqlite/server.py:94
↓ 2 callers
Method
_matches
(self, name: str)
fastmcp_remote/fastmcp_remote/cli.py:55
↓ 2 callers
Method
_matches_tool_cache_settings
Check if the tool matches the cache settings for tool calls.
fastmcp_slim/fastmcp/server/middleware/caching.py:513
↓ 2 callers
Function
_maybe_apply_prefab_ui
Mark a tool as a Prefab tool if its config or return type implies it. Per-tool renderer resources are synthesized lazily at list/read time; h
fastmcp_slim/fastmcp/server/providers/local_provider/decorators/tools.py:93
↓ 2 callers
Method
_merge_schema_with_precedence
Merge two schemas, with the override schema taking precedence. Args: base_schema: Base schema to start with override_
fastmcp_slim/fastmcp/tools/tool_transform.py:845
↓ 2 callers
Method
_message_to_create_message_result
( message: Message, )
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:330
↓ 2 callers
Method
_message_to_result_with_tools
Convert Anthropic response to CreateMessageResultWithTools.
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:401
↓ 2 callers
Function
_normalize_resource_url
Normalize a resource URL by removing query parameters and trailing slashes. RFC 8707 allows clients to include query parameters in resource URLs,
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:104
↓ 2 callers
Function
_object_schema_to_type
Convert an object schema to the appropriate Python type. Single source of truth for the four object-schema cases, used by both the top-level
fastmcp_slim/fastmcp/utilities/json_schema_type.py:385
↓ 2 callers
Method
_paginate_list
Generic pagination helper for list operations. Args: request_factory: Function that creates a request from a cursor c
fastmcp_slim/fastmcp/server/context.py:451
↓ 2 callers
Method
_ping_loop
Send periodic pings until session ends.
fastmcp_slim/fastmcp/server/middleware/ping.py:63
↓ 2 callers
Function
_prefab_to_json
Call PrefabApp.to_json() with the hash-based resolver. The resolver prefixes peer-tool references with a deterministic hash derived from the
fastmcp_slim/fastmcp/tools/base.py:567
↓ 2 callers
Method
_prepare_scopes_for_upstream_refresh
Prepare scopes for upstream token refresh request. Override this method to transform scopes before sending to upstream provider. For
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:1334
↓ 2 callers
Function
_query_scalar_to_str
Convert a scalar to its query-string representation. Booleans are lowercased to match JSON/OpenAPI conventions (true/false) rather than Pytho
fastmcp_slim/fastmcp/utilities/openapi/director.py:18
↓ 2 callers
Method
_render_results
(self, tools: Sequence[Tool])
fastmcp_slim/fastmcp/server/transforms/search/base.py:250
↓ 2 callers
Function
_require_azure_identity
Raise ImportError with install instructions if azure-identity is not available.
fastmcp_slim/fastmcp/server/auth/providers/azure.py:792
↓ 2 callers
Method
_reset_session_state
Reset session state after disconnect or cancellation. Args: full: If True, also resets session_task and nesting_counter.
fastmcp_slim/fastmcp/client/client.py:362
↓ 2 callers
Function
_resolve_param_hints
Resolve a callable's parameter type hints, tolerating partials. ``get_type_hints`` rejects ``functools.partial`` objects (and other non-funct
fastmcp_slim/fastmcp/tools/function_tool.py:166
↓ 2 callers
Function
_resolve_ref
Resolve JSON Schema reference to target schema.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:258
↓ 2 callers
Function
_restore_request_context
Set the ``request_ctx``, ``_current_context`` and ``_current_server`` ContextVars from stashed values. Called at the start of proxy handler i
fastmcp_slim/fastmcp/server/providers/proxy.py:1008
↓ 2 callers
Method
_reverse_name
Remove namespace prefix from a name, or None if no match.
fastmcp_slim/fastmcp/server/transforms/namespace.py:64
↓ 2 callers
Method
_reverse_uri
Remove namespace from a URI, or None if no match.
fastmcp_slim/fastmcp/server/transforms/namespace.py:82
↓ 2 callers
Function
_sanitize_name
Convert string to valid Python identifier.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:537
↓ 2 callers
Method
_select_model_from_preferences
( self, model_preferences: ModelPreferences | str | list[str] | None )
fastmcp_slim/fastmcp/client/sampling/handlers/openai.py:404
↓ 2 callers
Method
_select_model_from_preferences
( self, model_preferences: ModelPreferences | str | list[str] | None )
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:351
↓ 2 callers
Function
_serialize_with_fallback
( result: Any, serializer: ToolResultSerializerType | None = None )
fastmcp_slim/fastmcp/tools/base.py:508
↓ 2 callers
Function
_server_url_has_query
Check if a URL has query parameters.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:123
↓ 2 callers
Method
_set_auth
(self, auth: httpx.Auth | Literal["oauth"] | str | None)
fastmcp_slim/fastmcp/client/transports/sse.py:68
↓ 2 callers
Method
_set_consent_binding_cookie
Add a consent binding entry for a transaction. This cookie binds the browser that approved consent to the IdP callback, ensuring a di
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:236
↓ 2 callers
Method
_set_list_cookie
( self: OAuthProxy, response: HTMLResponse | RedirectResponse, base_name: str,
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:162
↓ 2 callers
Method
_setup_session_with_claims
Set up a proxy JWT pointing at a valid upstream token, with optional upstream_claims.
tests/server/auth/oauth_proxy/test_tokens.py:1384
↓ 2 callers
Method
_template
(self)
tests/resources/test_resource_template_meta.py:39
↓ 2 callers
Method
_to_sdk_tool
Convert to an mcp.types.Tool for SDK compatibility. This is used internally when passing tools to the MCP SDK's create_message() meth
fastmcp_slim/fastmcp/server/sampling/sampling_tool.py:71
↓ 2 callers
Function
_tokenize
Lowercase, split on non-alphanumeric, filter short tokens.
fastmcp_slim/fastmcp/server/transforms/search/bm25.py:18
↓ 2 callers
Method
_transform_name
Apply namespace prefix to a name.
fastmcp_slim/fastmcp/server/transforms/namespace.py:60
↓ 2 callers
Method
_truncate_to_result
Truncate text to fit within max_size and wrap in ToolResult.
fastmcp_slim/fastmcp/server/middleware/response_limiting.py:71
↓ 2 callers
Method
_try_transparent_refresh
Refresh the upstream token transparently and update storage. Called during load_access_token when the upstream token has expired but
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:1697
↓ 2 callers
Function
_wait_for_process_exit
Poll until a process has exited, raising if it's still alive after timeout.
tests/test_mcp_config.py:400
↓ 2 callers
Function
_walk_prefab_tools
Enumerate all prefab tools across the server's providers (sync walk of _components).
fastmcp_slim/fastmcp/server/providers/prefab_synthesis.py:153
↓ 2 callers
Function
_write_cache
Write version info to cache.
fastmcp_slim/fastmcp/utilities/version_check.py:46
↓ 2 callers
Method
_write_consent_bindings
Write the consent binding map to a signed cookie.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:205
← previous
next →
701–800 of 10,524, ranked by callers