Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
16,725 in github.com/PrefectHQ/fastmcp
⨍
Functions
16,725
◇
Types & classes
2,302
↳
Endpoints
198
Method
test_run_v1_server_keeps_default_log_level
Test that the SDK log level is untouched when --log-level is absent.
tests/cli/test_run.py:681
Method
test_run_v1_server_sse
Test that v1 server uses async sse method.
tests/cli/test_run.py:395
Method
test_run_v1_server_sse_with_path
Test that v1 SSE receives --path (and no unsupported stateless kwarg).
tests/cli/test_run.py:596
Method
test_run_v1_server_stateless_without_path
Test that --stateless alone leaves the SDK path default untouched.
tests/cli/test_run.py:575
Method
test_run_v1_server_stdio
Test that v1 server uses async stdio method.
tests/cli/test_run.py:295
Method
test_run_v1_server_streamable_http
Test that v1 server uses async streamable-http method.
tests/cli/test_run.py:362
Method
test_run_v1_server_streamable_http_with_path
Test that v1 Streamable HTTP receives --path.
tests/cli/test_run.py:552
Method
test_run_v1_server_transport_is_fourth_positional
The documented positional call must keep binding ``transport`` fourth. ``run_v1_server_async(server, host, port, "sse")`` previously bound
tests/cli/test_run.py:497
Method
test_run_v1_server_with_host_port
Test that v1 server receives host/port settings.
tests/cli/test_run.py:461
Method
test_run_with_needs_uv_forwards_skip_source_flag
`--skip-source` should survive the uv-wrapped subprocess path.
tests/cli/test_run.py:1212
Method
test_run_with_needs_uv_forwards_stateless_flag
`--stateless` should survive the uv-wrapped subprocess path.
tests/cli/test_run.py:1175
Method
test_run_with_reload_does_not_mutate_command
Test for issue 4081: Verify that run_with_reload does NOT mutate the command arguments. The command used for restart must be
tests/cli/test_run.py:1122
Function
test_running_aggregate_accepts_bundle_supported_by_root
()
tests/server/test_provider_extensions.py:636
Function
test_running_aggregate_accepts_components_without_new_extensions
()
tests/server/test_provider_extensions.py:645
Function
test_running_aggregate_rejects_new_extension_without_exposing_components
( wrapped: bool, )
tests/server/test_provider_extensions.py:610
Function
test_running_mounted_child_accepts_root_supported_bundle
( bundle: BundledLocalProvider, wrapped: bool )
tests/server/test_extension_runtime.py:52
Method
test_runs_python_m_module
Test that run_module_command invokes python -m <module>.
tests/cli/test_run.py:929
Function
test_runtime_catalog_changes_are_visible
()
tests/skills/test_provider.py:136
Method
test_runtime_toggle_on_off_on
(self, monkeypatch)
tests/test_compat.py:199
Method
test_safe_create_model_keeps_field_metadata
(self)
tests/utilities/json_schema_type/test_generated_classes.py:345
Method
test_safe_only_headers
(self)
tests/server/providers/openapi/test_openapi_features.py:1435
Method
test_safe_uris_pass_by_default
(self, server: FastMCP, uri: str)
tests/resources/test_resource_security.py:229
Function
test_safety_filtered_response_on_non_tool_path_raises
A safety-filtered response on the non-tool path should include finish_reason in the error.
tests/client/sampling/handlers/test_google_genai_handler.py:761
Function
test_safety_filtered_response_on_tool_path_raises
A safety-filtered response (no parts) should raise with the finish_reason included in the error message.
tests/client/sampling/handlers/test_google_genai_handler.py:746
Method
test_salt_not_required_without_hashing
(self, mode)
tests/server/middleware/test_usage.py:533
Function
test_same_bundled_configuration_is_deduplicated
(caplog: pytest.LogCaptureFixture)
tests/server/test_provider_extensions.py:234
Function
test_same_client_can_access_all_its_tasks
A single authenticated caller can resolve every task it created.
tests/tasks/server/test_task_security.py:40
Function
test_same_client_reuses_session_and_per_call_timeout_overrides_default
( sleepy_server: Path, )
tests/client/test_stdio_session_kwargs.py:83
Method
test_same_function_names_do_not_collide
(self)
tests/tasks/server/test_task_mount.py:309
Method
test_same_id_different_principals_are_isolated
(self)
tests/server/test_sessions.py:156
Method
test_same_inputs_same_hash
(self)
tests/server/providers/test_addressing.py:21
Method
test_same_key_reuses_one_codec
(self, encryption_key: str)
tests/tasks/server/test_snapshot_encryption.py:118
Method
test_same_name_in_path_and_query_is_rejected
(self)
tests/server/providers/proxy/test_proxy_server.py:844
Function
test_same_origin_does_not_clear_credentials
(tmp_path: Path)
tests/cli/deploy/test_configuration.py:96
Method
test_same_origin_requests_work
(self, headers: dict[str, str])
tests/cli/test_apps_dev_server.py:521
Method
test_same_proxy_serves_both_eras_without_bleed
The SAME proxy instance serves a legacy front and a modern front (and a legacy front again); each gets its matching backend era. This is the
tests/server/test_mrtr_guards.py:591
Method
test_same_request_is_still_silently_approved
The same client, redirect URI and scopes stay remembered, in any scope order.
tests/server/auth/test_oauth_consent_remembered_key.py:154
Method
test_same_stem_files_get_independent_modules
Two files with the same stem in different directories must not collide in sys.modules. The first-imported file keeps the bare stem key; the s
tests/fs/test_discovery.py:557
Method
test_same_surface
(self, pair)
tests/docs/test_upgrade_guide_equivalence.py:131
Method
test_same_surface
(self, pair)
tests/docs/test_upgrade_guide_equivalence.py:189
Function
test_sampler_added_attribute_survives_alongside_fastmcp_attributes
A sampler that forwards attributes unchanged and adds its own must keep both: its own attribute and every FastMCP attribute.
tests/telemetry/test_span_attributes.py:343
Function
test_sampling
Requests LLM sampling via the client. `Context` has no `sample()` — server-initiated sampling is not part of FastMCP's server API. The handsh
tests/conformance/server.py:205
Function
test_sampling_content_to_google_genai_part_tool_result
Test converting ToolResultContent to Google GenAI Part with FunctionResponse.
tests/client/sampling/handlers/test_google_genai_handler.py:260
Function
test_sampling_content_to_google_genai_part_tool_result_empty
Test converting empty ToolResultContent to Google GenAI Part.
tests/client/sampling/handlers/test_google_genai_handler.py:277
Function
test_sampling_content_to_google_genai_part_tool_result_requires_matching_call
()
tests/client/sampling/handlers/test_google_genai_handler.py:310
Function
test_sampling_content_to_google_genai_part_tool_result_uses_paired_name
Tool-use IDs are opaque and must resolve through their paired call.
tests/client/sampling/handlers/test_google_genai_handler.py:294
Function
test_sampling_content_to_google_genai_part_tool_use
Test converting ToolUseContent to Google GenAI Part with FunctionCall.
tests/client/sampling/handlers/test_google_genai_handler.py:244
Method
test_sampling_handler_resolves_from_its_submodule
(self)
tests/test_upgrade_from_v3.py:193
Method
test_sampling_params_max_tokens_bridged
(self)
tests/test_compat.py:103
Function
test_sampling_with_image
(fastmcp_server: FastMCP)
tests/client/test_sampling.py:152
Function
test_sampling_with_messages
(fastmcp_server: FastMCP)
tests/client/test_sampling.py:128
Function
test_sampling_with_system_prompt
(fastmcp_server: FastMCP)
tests/client/test_sampling.py:112
Method
test_sanitize_untrusted_text
(self)
tests/cli/test_client_commands.py:1158
Function
test_sanitized_diagnostics_and_bounded_retry
( triage, monkeypatch, failure, expected_kind, status, expected_calls )
tests/test_public_triage.py:249
Method
test_sanitized_name_collision
Properties that collide after sanitization get deduplicated.
tests/utilities/json_schema_type/test_json_schema_type.py:434
Method
test_sanitizes_param_name
(self)
tests/cli/test_generate_cli.py:231
Method
test_sanitizes_tool_name
(self)
tests/cli/test_generate_cli.py:222
Function
test_scalar_elicitation_schema_omits_wrapper_title
Scalar/list wrappers must not leak the internal class name on the wire.
tests/client/test_elicitation_enums.py:631
Method
test_scalar_handler_return_is_auto_wrapped
Scalar handler returns are wrapped as {"value": ...} for scalar schemas.
tests/client/test_elicitation.py:288
Function
test_scalar_json_body_reaches_http_endpoint
( media_type: str, schema_type: str, value: str | int | float | bool )
tests/server/providers/openapi/test_json_request_bodies.py:35
Method
test_scalar_query_param_rejects_explode
Explode always produces a list, so a scalar-only parameter is invalid.
tests/resources/test_resource_template.py:1327
Method
test_scalar_query_param_unaffected_by_explode
Non-list values pass through regardless of explode setting.
tests/utilities/openapi/test_director.py:750
Method
test_scalar_role_claim_is_one_role
A provider storing one role as a string must not be iterated. `str` satisfies `Iterable[str]`, so a bare "admin" would otherwise beco
tests/server/auth/test_authorization.py:190
Function
test_schema_has_correct_id
Test that the schema has the correct $id field.
tests/cli/test_mcp_server_config_schema.py:11
Function
test_schema_has_required_fields
Test that the schema specifies the required fields correctly.
tests/cli/test_mcp_server_config_schema.py:23
Function
test_schema_is_inlined
(defs_key: str, pointer: str)
tests/utilities/test_json_schema_expansion.py:76
Function
test_schema_log_level_enum
Test that log_level field has correct enum values.
tests/cli/test_mcp_server_config_schema.py:120
Function
test_schema_nested_structure
Test that the schema has the correct nested structure.
tests/cli/test_mcp_server_config_schema.py:37
Method
test_schema_over_size_budget_is_not_cached
( self, monkeypatch: pytest.MonkeyPatch )
tests/utilities/json_schema_type/test_generated_classes.py:633
Method
test_schema_refs_resolution
Test that schema references are resolved correctly.
tests/server/providers/openapi/test_comprehensive.py:672
Function
test_schema_section_fallbacks
(schema: Any, expected_lines: list[str])
tests/experimental/transforms/test_code_mode_serialization.py:77
Function
test_schema_section_handles_deep_shared_definitions
()
tests/experimental/transforms/test_code_mode_serialization.py:246
Function
test_schema_section_ignores_unresolvable_refs
()
tests/experimental/transforms/test_code_mode_serialization.py:272
Function
test_schema_section_lists_fields_with_required_marker
()
tests/experimental/transforms/test_code_mode_serialization.py:81
Function
test_schema_section_lists_nested_field_names_through_defs
Object-valued fields show their own field names one level down.
tests/experimental/transforms/test_code_mode_serialization.py:96
Function
test_schema_section_preserves_order_through_mutually_recursive_refs
()
tests/experimental/transforms/test_code_mode_serialization.py:218
Function
test_schema_section_stops_on_recursive_refs
`Json = list[Json] | int` refers to itself through anyOf and items and must not loop.
tests/experimental/transforms/test_code_mode_serialization.py:152
Function
test_schema_section_truncates_long_nested_objects
()
tests/experimental/transforms/test_code_mode_serialization.py:262
Function
test_schema_section_unions_fields_across_object_branches
A | B lists the fields of both models; allOf merges inherited and inline fields.
tests/experimental/transforms/test_code_mode_serialization.py:128
Function
test_schema_section_visits_shared_definitions_once
(union: str)
tests/experimental/transforms/test_code_mode_serialization.py:183
Function
test_schema_transport_enum
Test that transport field has correct enum values.
tests/cli/test_mcp_server_config_schema.py:83
Function
test_schema_type_basic
(schema: Any, expected: str)
tests/experimental/transforms/test_code_mode_serialization.py:35
Function
test_schema_type_unions
(schema: Any, expected: str)
tests/experimental/transforms/test_code_mode_serialization.py:56
Method
test_schema_validation_rejects_arrays
Test that non-enum array schemas are rejected.
tests/client/test_elicitation.py:841
Method
test_schema_validation_rejects_nested_objects
Test that nested object schemas are rejected.
tests/client/test_elicitation.py:823
Method
test_schema_validation_rejects_non_object
Test that non-object schemas are rejected.
tests/client/test_elicitation.py:817
Method
test_schema_without_type
(self)
tests/utilities/json_schema_type/test_advanced.py:1099
Function
test_schema_without_write_only_is_unchanged
(openapi_version: str)
tests/server/providers/openapi/test_write_only_responses.py:426
Method
test_scheme_mismatch_blocked
Test that scheme mismatches are blocked.
tests/server/auth/test_redirect_validation.py:646
Function
test_scope_401_is_still_an_invalid_token
()
tests/server/auth/providers/test_github_transient_failures.py:288
Method
test_scope_defaults_to_private
(self)
tests/server/test_cache_hints.py:42
Method
test_scope_defaults_to_private
(self)
tests/server/test_cache_hints.py:130
Method
test_scope_discovery_retries_after_transient_failure
A transient discovery failure is not cached and is retried.
tests/server/auth/providers/test_descope.py:146
Method
test_scope_extraction_list
Test scope extraction from list format.
tests/server/auth/test_jwt_provider_bearer.py:320
Method
test_scope_extraction_string
Test scope extraction from space-separated string.
tests/server/auth/test_jwt_provider_bearer.py:304
Method
test_scope_failure_keeps_identity_without_inventing_scopes
A scope-endpoint outage may verify identity, but must not invent scopes.
tests/server/auth/providers/test_github.py:282
Method
test_scope_normalization
(self, scopes, expected)
tests/client/auth/test_client_credentials.py:164
Method
test_scope_outside_valid_scopes_is_rejected
A document scope outside valid_scopes fails the scope gate.
tests/server/auth/oauth_proxy/test_oauth_proxy.py:740
Method
test_scope_patch_applied_when_tokens_identical
Regression test: scopes must be patched even when id_token and access_token carry the same JWT value (fixes #3461).
tests/server/auth/test_oidc_proxy_token.py:378
Function
test_scope_permanent_client_error_is_an_invalid_token
(status_code)
tests/server/auth/providers/test_github_transient_failures.py:300
← previous
next →
14,301–14,400 of 16,725, ranked by callers