Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
11,669 in github.com/PrefectHQ/fastmcp
⨍
Functions
11,669
◇
Types & classes
1,774
↳
Endpoints
123
↓ 2 callers
Function
_block_containing
Execute the one code block on `page` that contains `needle`.
tests/docs/test_upgrade_guide_equivalence.py:32
↓ 2 callers
Function
_build
(transform)
tests/server/transforms/test_model_visibility_boundary.py:35
↓ 2 callers
Function
_build_resource_for_tool
Synthesize a TextResource for a prefab tool. Returns None if prefab_ui isn't installed.
fastmcp_slim/fastmcp/server/providers/prefab_synthesis.py:75
↓ 2 callers
Method
_build_response_cache
Build the SEP-2549 response cache from the `cache=` argument. Response caching is opt-in: `None` (the default) and `False` both leave it
fastmcp_slim/fastmcp/client/client.py:588
↓ 2 callers
Method
_build_upstream_authorize_url
Build Azure authorization URL with prefixed scopes. Overrides parent to prefix scopes with identifier_uri before sending to Azure, wh
fastmcp_slim/fastmcp/server/auth/providers/azure.py:466
↓ 2 callers
Function
_cached_server
An SDK MCPServer whose tools/list carries a positive ttlMs hint at 2026.
tests/client/client/test_kv_response_cache.py:51
↓ 2 callers
Method
_calculate_delay
Calculate delay for the given attempt number.
fastmcp_slim/fastmcp/server/middleware/error_handling.py:186
↓ 2 callers
Method
_call_tool
Helper method to call a tool with the provided arguments.
fastmcp_slim/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py:120
↓ 2 callers
Method
_call_without_validating
Call through a client that does not enforce the schema itself.
tests/server/providers/proxy/test_proxy_server.py:1248
↓ 2 callers
Function
_cancelled_key
(docket: Docket, task_scope: str | None, task_id: str)
fastmcp_tasks/fastmcp_tasks/input_store.py:425
↓ 2 callers
Function
_catalog_hash
SHA256 hash of sorted tool searchable text for staleness detection.
fastmcp_slim/fastmcp/server/transforms/search/bm25.py:80
↓ 2 callers
Method
_challenge_context
Build shared scope and resource metadata challenge parameters.
fastmcp_slim/fastmcp/server/auth/middleware.py:125
↓ 2 callers
Method
_chat_completion_to_create_message_result
( chat_completion: ChatCompletion, )
fastmcp_slim/fastmcp/client/sampling/handlers/openai.py:388
↓ 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
(self)
fastmcp_slim/fastmcp/server/auth/identity_assertion.py:244
↓ 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:936
↓ 2 callers
Function
_connection_failure
Present a dead session the same way wherever it is noticed. A failed session surfaces from two places: `_connect`, when the connection never
fastmcp_slim/fastmcp/client/client.py:235
↓ 2 callers
Function
_contains_input_required
True when `InputRequiredResult` appears anywhere in *tp*. Recurses through `TypeAliasType`, `Annotated`, and unions so a guard arm is found e
fastmcp_slim/fastmcp/tools/function_parsing.py:86
↓ 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:169
↓ 2 callers
Method
_convert_tools_to_anthropic
Convert MCP tools to Anthropic tool format.
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:368
↓ 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:82
↓ 2 callers
Function
_copy_schema
Return a deep copy of a JSON schema without recursing. `copy.deepcopy` consumes stack frames in proportion to nesting depth, so a deeply nest
fastmcp_slim/fastmcp/utilities/json_schema.py:9
↓ 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_dataclass
Create dataclass from object schema.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:652
↓ 2 callers
Function
_current_user_session
Build the per-user session for the current principal, or `None` if unauth. Resolves the store through `get_server()` rather than `get_context()`:
fastmcp_slim/fastmcp/server/sessions.py:386
↓ 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:126
↓ 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:344
↓ 2 callers
Method
_discover_body
(**envelope: Any)
tests/client/client/test_mode_negotiation.py:175
↓ 2 callers
Function
_discriminator_target_name
Resolve a ``discriminator.mapping`` value to a local schema name. Mapping values hold "schema names or references", so a bare ``"Cat"`` means
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:261
↓ 2 callers
Function
_dispatch_decorator
Shared dispatch logic for @app.tool() and @app.ui() calling patterns.
fastmcp_slim/fastmcp/apps/app.py:114
↓ 2 callers
Function
_drive_flow_tracking_step_up
Delegate to the inherited auth flow, flagging step-up challenges. On a 403 ``insufficient_scope`` the inherited flow unions the challenged scope
fastmcp_slim/fastmcp/client/auth/client_credentials.py:134
↓ 2 callers
Function
_drive_to_terminal
Poll `tasks/get` until the task reaches a terminal state. `working` sleeps and polls again; `input_required` answers the outstanding requests
fastmcp_tasks/fastmcp_tasks/client.py:248
↓ 2 callers
Function
_dump_task_fields
Dump without the `resultType` discriminator the draft schema omits. `resultType` is required by the protocol's result union but forbidden by the
tests/tasks/server/test_wire_models.py:56
↓ 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:155
↓ 2 callers
Function
_evaluate_check
Evaluate a single auth check, masking unexpected failures as denial. An ``AuthorizationError`` is the check's deliberate denial and propagates.
fastmcp_slim/fastmcp/utilities/authorization.py:230
↓ 2 callers
Function
_extract_client_extension_settings
Pull `_meta[clientCapabilities][extensions][identifier]` from a lifted meta block.
fastmcp_slim/fastmcp/server/extensions.py:217
↓ 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:542
↓ 2 callers
Method
_extract_scopes
(self, claims: dict[str, Any])
fastmcp_slim/fastmcp/server/auth/providers/auth0.py:194
↓ 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:1687
↓ 2 callers
Function
_fastmcp_surface
(mcp: FastMCP)
tests/docs/test_upgrade_guide_equivalence.py:108
↓ 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:595
↓ 2 callers
Function
_get_candidate_from_response
Extract the first candidate from a response.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:314
↓ 2 callers
Method
_get_client
Gets a client instance by calling the sync or async factory.
fastmcp_slim/fastmcp/server/providers/proxy.py:261
↓ 2 callers
Method
_get_client
(self)
fastmcp_slim/fastmcp/server/providers/proxy.py:1255
↓ 2 callers
Method
_get_data
Get raw image data as base64-encoded string.
fastmcp_slim/fastmcp/utilities/types.py:283
↓ 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:140
↓ 2 callers
Method
_get_tool
(self, name: str, version: Any = None)
fastmcp_slim/fastmcp/apps/app.py:410
↓ 2 callers
Method
_get_tool
( self, name: str, version: VersionSpec | None = None )
tests/server/test_providers.py:56
↓ 2 callers
Method
_get_visible_tools
Get the auth-filtered tool catalog, excluding pinned tools.
fastmcp_slim/fastmcp/server/transforms/search/base.py:266
↓ 2 callers
Function
_guard_server
()
tests/server/middleware/test_message_visibility.py:320
↓ 2 callers
Method
_handle
(self, request: httpx2.Request)
tests/utilities/httpx2_mock.py:160
↓ 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
_http_request_with_headers
Build a minimal Starlette HTTP request carrying the given headers.
tests/server/http/test_http_dependencies.py:27
↓ 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
_initialize
Create a session with the given token and return its session id.
tests/server/http/test_session_owner_enforcement.py:59
↓ 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
_inlined_call_tool_result
Parse a completed task's inlined result dict into a `CallToolResult`.
fastmcp_tasks/fastmcp_tasks/client.py:303
↓ 2 callers
Method
_input_response_params
The active request's multi-round-trip fields (SEP-2322), if any. Reads the raw params of the active wire request through the SDK's pe
fastmcp_slim/fastmcp/server/context.py:357
↓ 2 callers
Function
_is_input_required_type
True when *tp* is the `InputRequiredResult` type (SEP-2322). Resolves a `TypeAliasType` and peels an `Annotated` wrapper first, so an aliased
fastmcp_slim/fastmcp/tools/function_parsing.py:72
↓ 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
Function
_is_unsafe_redirect_uri
(uri: str)
fastmcp_slim/fastmcp/server/auth/redirect_validation.py:293
↓ 2 callers
Function
_key_asking
The surfaced key whose parked request asks *message*.
tests/tasks/server/test_guard_reentrant.py:66
↓ 2 callers
Method
_list_prompts
Return all available prompts. Override to provide prompts dynamically. Returns ALL versions of all prompts. The server handles dedupl
fastmcp_slim/fastmcp/server/providers/base.py:457
↓ 2 callers
Method
_list_resource_templates
Return all available resource templates. Override to provide resource templates dynamically. Returns ALL versions. The server handles
fastmcp_slim/fastmcp/server/providers/base.py:426
↓ 2 callers
Method
_list_resources
Return all available resources. Override to provide resources dynamically. Returns ALL versions of all resources. The server handles
fastmcp_slim/fastmcp/server/providers/base.py:395
↓ 2 callers
Method
_list_resources
List all resources from the remote server.
fastmcp_slim/fastmcp/server/providers/proxy.py:919
↓ 2 callers
Method
_list_tools
Return all available tools. Override to provide tools dynamically. Returns ALL versions of all tools. The server handles deduplicatio
fastmcp_slim/fastmcp/server/providers/base.py:363
↓ 2 callers
Method
_list_tools
(self)
tests/server/test_providers.py:77
↓ 2 callers
Function
_log_level_session_key
Derive the per-session key used for logging/setLevel gating. v2 constructs sessions per-request, so the stable identity is the connection ses
fastmcp_slim/fastmcp/server/context.py:1316
↓ 2 callers
Function
_make_app
()
tests/server/http/test_session_owner_enforcement.py:44
↓ 2 callers
Method
_make_call_tool
Create the call_tool proxy that executes discovered tools.
fastmcp_slim/fastmcp/server/transforms/search/base.py:225
↓ 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:61
↓ 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.
fastmcp_slim/fastmcp/server/providers/proxy.py:1491
↓ 2 callers
Method
_make_search_tool
Create the search tool. Subclasses define the parameter schema.
fastmcp_slim/fastmcp/server/transforms/search/base.py:221
↓ 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_task_context
( self, mcp: FastMCP, session_id: str )
tests/tasks/server/test_context_background_task.py:186
↓ 2 callers
Method
_make_task_context
( self, mcp: FastMCP, extensions: dict[str, dict[str, Any]] | None )
tests/tasks/server/test_context_background_task.py:244
↓ 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:570
↓ 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:879
← previous
next →
901–1,000 of 11,669, ranked by callers