Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
13,374 in github.com/PrefectHQ/fastmcp
⨍
Functions
13,374
◇
Types & classes
2,002
↳
Endpoints
150
Method
test_run_in_thread_false_blocks_other_tasks
A sync tool with run_in_thread=False blocks the event loop. This documents the tradeoff: while the tool runs inline, no other task on
tests/tools/test_tool_run_in_thread.py:132
Method
test_run_mcp_config
Test creating a server from an MCPConfig file.
tests/cli/test_run.py:114
Method
test_run_module_mode_delegates_to_run_module_command
Test that module mode calls run_module_command with correct args.
tests/cli/test_run.py:840
Method
test_run_module_mode_requires_server_spec
Test that module mode exits with error when server_spec is None.
tests/cli/test_run.py:813
Method
test_run_module_mode_warns_ignored_options
Test that ignored options produce a warning in module mode.
tests/cli/test_run.py:820
Method
test_run_module_mode_with_reload
Test that --reload in module mode delegates to run_with_reload.
tests/cli/test_run.py:857
Function
test_run_server_on_path
Test running server on a custom path.
tests/client/test_sse.py:141
Method
test_run_stdio_accepts_log_level
Test that run_stdio_async accepts log_level parameter.
tests/server/test_log_level.py:13
Method
test_run_v1_server_default_transport
Test that v1 server uses streamable-http by default.
tests/cli/test_run.py:427
Method
test_run_v1_server_http
Test that v1 server uses async http method.
tests/cli/test_run.py:328
Method
test_run_v1_server_sse
Test that v1 server uses async sse method.
tests/cli/test_run.py:394
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:361
Method
test_run_v1_server_with_host_port
Test that v1 server receives host/port settings.
tests/cli/test_run.py:460
Method
test_run_with_needs_uv_forwards_stateless_flag
`--stateless` should survive the uv-wrapped subprocess path.
tests/cli/test_run.py:964
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:911
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:718
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:1344
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:541
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:526
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
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:817
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:458
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_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:525
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:339
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:177
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:242
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:258
Function
test_sampling_content_to_google_genai_part_tool_result_no_underscore
Test ToolResultContent when toolUseId has no underscore (fallback).
tests/client/sampling/handlers/test_google_genai_handler.py:273
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:226
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:579
Method
test_sanitized_name_collision
Properties that collide after sanitization get deduplicated.
tests/utilities/json_schema_type/test_json_schema_type.py:287
Method
test_sanitizes_param_name
(self)
tests/cli/test_generate_cli.py:228
Method
test_sanitizes_tool_name
(self)
tests/cli/test_generate_cli.py:219
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:527
Method
test_scalar_handler_return_is_auto_wrapped
Scalar handler returns are wrapped as {"value": ...} for scalar schemas.
tests/client/test_elicitation.py:260
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:1151
Method
test_scalar_query_param_unaffected_by_explode
Non-list values pass through regardless of explode setting.
tests/utilities/openapi/test_director.py:719
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:173
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:75
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:686
Method
test_schema_validation_rejects_nested_objects
Test that nested object schemas are rejected.
tests/client/test_elicitation.py:668
Method
test_schema_validation_rejects_non_object
Test that non-object schemas are rejected.
tests/client/test_elicitation.py:662
Method
test_schema_without_type
(self)
tests/utilities/json_schema_type/test_advanced.py:476
Method
test_scheme_mismatch_blocked
Test that scheme mismatches are blocked.
tests/server/auth/test_redirect_validation.py:422
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:292
Method
test_scope_extraction_string
Test scope extraction from space-separated string.
tests/server/auth/test_jwt_provider_bearer.py:276
Method
test_scope_failure_skips_cache
Token verified with fallback scopes (scope API failed) should not be cached.
tests/server/auth/providers/test_github.py:281
Method
test_scope_normalization
(self, scopes, expected)
tests/client/auth/test_client_credentials.py:161
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_pipe_separator_is_preserved
``get_task_scope`` composes ``client_id|sub`` — the ``|`` must survive.
tests/tasks/server/test_task_keys.py:109
Method
test_scope_precedence_over_scp
Test that 'scope' claim takes precedence over 'scp' claim when both are present.
tests/server/auth/test_jwt_provider_bearer.py:358
Function
test_scope_with_colons_is_recovered
()
tests/tasks/server/test_task_keys.py:102
Method
test_scope_without_ttl_raises
(self)
tests/server/test_cache_hints.py:64
Method
test_scope_without_ttl_rejected
(self, scope)
tests/server/test_cache_hints.py:53
Method
test_scopes_forwarded_as_list
(self)
tests/client/auth/test_oauth_cimd.py:116
← previous
next →
11,401–11,500 of 13,374, ranked by callers