Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
16,224 in github.com/PrefectHQ/fastmcp
⨍
Functions
16,224
◇
Types & classes
2,249
↳
Endpoints
189
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:1038
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:287
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:713
Method
test_schema_validation_rejects_nested_objects
Test that nested object schemas are rejected.
tests/client/test_elicitation.py:695
Method
test_schema_validation_rejects_non_object
Test that non-object schemas are rejected.
tests/client/test_elicitation.py:689
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:482
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_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
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:386
Function
test_scope_rate_limit_raises_typed_error
(status_code, headers)
tests/server/auth/providers/test_github_transient_failures.py:182
Function
test_scope_secondary_rate_limit_message_is_operational_error
()
tests/server/auth/providers/test_github_transient_failures.py:194
Function
test_scope_server_failure_does_not_grant_required_user_scope_and_recovers
( status_code, )
tests/server/auth/providers/test_github_transient_failures.py:211
Function
test_scope_transport_failure_does_not_grant_user_scope_and_recovers
()
tests/server/auth/providers/test_github_transient_failures.py:260
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
Method
test_scopes_forwarded_as_string
(self)
tests/client/auth/test_oauth_cimd.py:126
Method
test_scopes_on_server_without_auth_return_401
( self, required_scopes: list[str] )
tests/contrib/test_component_manager.py:988
Method
test_scopes_supported_and_required_scopes_can_differ
Test that scopes_supported and required_scopes can be configured independently.
tests/server/auth/providers/test_descope.py:246
Method
test_scopes_supported_defaults_to_verifier
Test that metadata uses verifier scopes_supported when parameter not set.
tests/server/auth/test_remote_auth_provider.py:586
Method
test_scopes_supported_empty_when_no_required_scopes
(self)
tests/server/auth/providers/test_azure_scopes.py:574
Method
test_scopes_supported_overrides_metadata
Test that scopes_supported parameter overrides what's in metadata.
tests/server/auth/test_remote_auth_provider.py:557
Method
test_scopes_supported_returns_prefixed_form
(self)
tests/server/auth/providers/test_azure_scopes.py:516
Method
test_scp_claim_extraction_list
Test scope extraction from 'scp' claim with list format.
tests/server/auth/test_jwt_provider_bearer.py:368
Method
test_scp_claim_extraction_string
Test scope extraction from 'scp' claim with space-separated string.
tests/server/auth/test_jwt_provider_bearer.py:352
Method
test_screening_still_works_with_sdk
(self)
tests/resources/test_resource_security.py:182
Function
test_script
(tmp_path: Path)
tests/test_mcp_config.py:1517
Method
test_script_connects_to_the_configured_server
( self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch, entry: dict[str, Any]
tests/cli/test_generate_cli_remote.py:151
Method
test_script_keeps_oauth
( self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch )
tests/cli/test_generate_cli_remote.py:163
Method
test_script_path_arrives_literally
(self, script: str)
tests/cli/test_install_cli_arguments.py:256
Method
test_script_receives_arguments
( self, tmp_path: Path, args: list[str] )
tests/client/test_stdio.py:1082
Method
test_sdk_elicit_result_accept_carries_its_content
An accepted SDK `ElicitResult` supplies its content to the resolver.
tests/client/client/test_input_required_driver.py:157
Function
test_sdk_failure_is_tool_error
(bridge)
examples/smart_home/tests/test_lights.py:137
Function
test_sdk_v1_constructor_params_fastmcp_rejects_are_documented
Every v1 keyword FastMCP 4 refuses must be named in the v1 guide. The guide's headline is that upgrading is a single import change. That is o
tests/docs/test_upgrade_guide_api_claims.py:178
Function
test_sdk_verifier_tokens_retain_original_client_id_after_serialization
()
tests/server/auth/test_auth_source_identities.py:401
Method
test_seam_method_emits_single_server_span
A seam-spanned method must produce exactly one SERVER span, not two.
tests/server/telemetry/test_server_tracing.py:471
Method
test_seam_span_has_protocol_version
Seam-only methods (never reaching the high-level path) also carry the protocol version. Pinned to legacy: `logging/setLevel` is a han
tests/server/telemetry/test_server_tracing.py:750
Function
test_search_applies_limits_after_ranking
( default_limit: int | None, override: dict[str, int | None], expected_count: int, )
tests/experimental/transforms/test_code_mode_search_limits.py:55
Method
test_search_by_description
(self)
tests/server/transforms/test_search.py:245
Method
test_search_by_name
(self)
tests/server/transforms/test_search.py:237
Method
test_search_by_param_description
(self)
tests/server/transforms/test_search.py:261
Method
test_search_by_param_name
(self)
tests/server/transforms/test_search.py:253
Method
test_search_case_insensitive
(self)
tests/server/transforms/test_search.py:279
Method
test_search_database_tools
(self)
tests/server/transforms/test_search.py:418
Function
test_search_default_detail_detailed_skips_get_schema
Two-stage pattern: Search(default_detail='detailed') returns schemas inline.
tests/experimental/transforms/test_code_mode_discovery.py:318
Function
test_search_default_limit_from_constructor
Search(default_limit=N) caps results by default.
tests/experimental/transforms/test_code_mode_discovery.py:505
Method
test_search_empty_query
(self)
tests/server/transforms/test_search.py:470
Function
test_search_first_result_is_the_best_match_registered_last
Ranking decides what survives a small limit, not registration order.
tests/experimental/transforms/test_code_mode_search_limits.py:92
Function
test_search_full_detail_empty_results_returns_json
Search with detail=full and no matches returns valid JSON, not plain text.
tests/experimental/transforms/test_code_mode_discovery.py:341
Function
test_search_full_detail_returns_current_schema
()
tests/experimental/transforms/test_code_mode_discovery.py:361
Method
test_search_invalid_pattern
(self)
tests/server/transforms/test_search.py:287
Function
test_search_limit_caps_results
Search with limit returns at most that many results.
tests/experimental/transforms/test_code_mode_discovery.py:476
Function
test_search_listing_still_hides_task_tool
()
tests/tasks/server/test_task_catalog_transforms.py:93
Method
test_search_max_results
(self)
tests/server/transforms/test_search.py:295
Method
test_search_max_results
(self)
tests/server/transforms/test_search.py:430
Method
test_search_no_matches
(self)
tests/server/transforms/test_search.py:304
Method
test_search_no_matches
(self)
tests/server/transforms/test_search.py:438
← previous
next →
13,901–14,000 of 16,224, ranked by callers