SYMBOL INDEX (8642 symbols across 591 files) FILE: docs/unify-intent.js function isAuthPage (line 5) | function isAuthPage() { function loadUnify (line 10) | function loadUnify() { function update (line 47) | function update() { FILE: docs/v2-banner.js function addBanner (line 5) | function addBanner() { function run (line 22) | function run() { FILE: examples/apps/chart_server.py function sales_chart (line 19) | def sales_chart(stacked: bool = False) -> Column: FILE: examples/apps/contacts/contacts_server.py class ContactModel (line 65) | class ContactModel(BaseModel): function save_contact (line 84) | def save_contact(data: ContactModel) -> list[dict]: function search_contacts (line 91) | def search_contacts(query: str) -> list[dict]: function list_contacts (line 98) | def list_contacts() -> list[dict]: function contact_manager (line 104) | def contact_manager() -> PrefabApp: FILE: examples/apps/datatable_server.py function team_directory (line 46) | def team_directory(department: str | None = None) -> Column: FILE: examples/apps/greet_server.py function greet (line 27) | def greet( function farewell (line 50) | def farewell( FILE: examples/apps/patterns_server.py function quarterly_revenue (line 233) | def quarterly_revenue(year: int = 2025) -> PrefabApp: function usage_trend (line 251) | def usage_trend() -> PrefabApp: function ticket_breakdown (line 267) | def ticket_breakdown() -> PrefabApp: function employee_directory (line 288) | def employee_directory() -> PrefabApp: function contact_form (line 314) | def contact_form() -> PrefabApp: function save_contact (line 350) | def save_contact( function system_status (line 368) | def system_status() -> PrefabApp: function feature_flags (line 404) | def feature_flags() -> PrefabApp: function project_overview (line 432) | def project_overview() -> PrefabApp: function api_health (line 468) | def api_health() -> PrefabApp: FILE: examples/apps/qr_server/qr_server.py function generate_qr (line 108) | def generate_qr( function view (line 164) | def view() -> str: FILE: examples/atproto_mcp/demo.py function main (line 20) | async def main(enable_posting: bool = False): FILE: examples/atproto_mcp/src/atproto_mcp/__main__.py function main (line 4) | def main(): FILE: examples/atproto_mcp/src/atproto_mcp/_atproto/_client.py function get_client (line 10) | def get_client() -> Client: FILE: examples/atproto_mcp/src/atproto_mcp/_atproto/_posts.py function create_post (line 19) | def create_post( function _build_facets (line 92) | def _build_facets( function _build_reply_ref (line 184) | def _build_reply_ref(reply_to: str, reply_root: str | None, client): function _build_quote_embed (line 208) | def _build_quote_embed(quote_uri: str, client): function _build_quote_with_images_embed (line 223) | def _build_quote_with_images_embed( function _send_images (line 261) | def _send_images( function create_thread (line 329) | def create_thread(posts: list[ThreadPost]) -> ThreadResult: FILE: examples/atproto_mcp/src/atproto_mcp/_atproto/_profile.py function get_profile_info (line 8) | def get_profile_info() -> ProfileInfo: FILE: examples/atproto_mcp/src/atproto_mcp/_atproto/_read.py function fetch_timeline (line 14) | def fetch_timeline(limit: int = 10) -> TimelineResult: function search_for_posts (line 51) | def search_for_posts(query: str, limit: int = 10) -> SearchResult: function fetch_notifications (line 91) | def fetch_notifications(limit: int = 10) -> NotificationsResult: FILE: examples/atproto_mcp/src/atproto_mcp/_atproto/_social.py function follow_user_by_handle (line 8) | def follow_user_by_handle(handle: str) -> FollowResult: function like_post_by_uri (line 43) | def like_post_by_uri(uri: str) -> LikeResult: function repost_by_uri (line 77) | def repost_by_uri(uri: str) -> RepostResult: FILE: examples/atproto_mcp/src/atproto_mcp/server.py function atproto_status (line 30) | def atproto_status() -> ProfileInfo: function get_timeline (line 36) | def get_timeline() -> TimelineResult: function get_notifications (line 42) | def get_notifications() -> NotificationsResult: function post (line 49) | def post( function follow (line 89) | def follow( function like (line 102) | def like( function repost (line 110) | def repost( function search (line 118) | def search( function create_thread (line 129) | def create_thread( FILE: examples/atproto_mcp/src/atproto_mcp/settings.py class Settings (line 5) | class Settings(BaseSettings): FILE: examples/atproto_mcp/src/atproto_mcp/types.py class ProfileInfo (line 6) | class ProfileInfo(TypedDict): class PostResult (line 19) | class PostResult(TypedDict): class Post (line 30) | class Post(TypedDict): class TimelineResult (line 43) | class TimelineResult(TypedDict): class SearchResult (line 52) | class SearchResult(TypedDict): class Notification (line 62) | class Notification(TypedDict): class NotificationsResult (line 73) | class NotificationsResult(TypedDict): class FollowResult (line 82) | class FollowResult(TypedDict): class LikeResult (line 92) | class LikeResult(TypedDict): class RepostResult (line 101) | class RepostResult(TypedDict): class RichTextLink (line 110) | class RichTextLink(TypedDict): class RichTextMention (line 117) | class RichTextMention(TypedDict): class ThreadPost (line 124) | class ThreadPost(TypedDict, total=False): class ThreadResult (line 135) | class ThreadResult(TypedDict): FILE: examples/auth/authkit_dcr/client.py function main (line 17) | async def main(): FILE: examples/auth/authkit_dcr/server.py function echo (line 26) | def echo(message: str) -> str: FILE: examples/auth/aws_oauth/client.py function main (line 16) | async def main(): FILE: examples/auth/aws_oauth/server.py function echo (line 42) | def echo(message: str) -> str: function get_access_token_claims (line 48) | async def get_access_token_claims() -> dict: FILE: examples/auth/azure_oauth/client.py function main (line 16) | async def main(): FILE: examples/auth/azure_oauth/server.py function echo (line 38) | def echo(message: str) -> str: FILE: examples/auth/discord_oauth/client.py function main (line 16) | async def main(): FILE: examples/auth/discord_oauth/server.py function echo (line 29) | def echo(message: str) -> str: FILE: examples/auth/github_oauth/client.py function main (line 16) | async def main(): FILE: examples/auth/github_oauth/server.py function echo (line 29) | def echo(message: str) -> str: FILE: examples/auth/google_oauth/client.py function main (line 16) | async def main(): FILE: examples/auth/google_oauth/server.py function echo (line 31) | def echo(message: str) -> str: FILE: examples/auth/mounted/client.py function main (line 17) | async def main(): FILE: examples/auth/mounted/server.py function github_echo (line 49) | def github_echo(message: str) -> str: function github_info (line 55) | def github_info() -> str: function google_echo (line 72) | def google_echo(message: str) -> str: function google_info (line 78) | def google_info() -> str: FILE: examples/auth/propelauth_oauth/client.py function main (line 16) | async def main(): FILE: examples/auth/propelauth_oauth/server.py function echo (line 39) | def echo(message: str) -> str: function whoami (line 45) | def whoami() -> dict: FILE: examples/auth/scalekit_oauth/client.py function main (line 16) | async def main(): FILE: examples/auth/scalekit_oauth/server.py function echo (line 41) | def echo(message: str) -> str: function auth_status (line 47) | def auth_status() -> dict: FILE: examples/auth/workos_oauth/client.py function main (line 16) | async def main(): FILE: examples/auth/workos_oauth/server.py function echo (line 31) | def echo(message: str) -> str: FILE: examples/code_mode/client.py function _get_result (line 26) | def _get_result(result) -> Any: function _format_params (line 36) | def _format_params(tool: dict) -> str: function _tool_table (line 49) | def _tool_table( function main (line 70) | async def main(): FILE: examples/code_mode/server.py function add (line 22) | def add(a: int, b: int) -> int: function multiply (line 28) | def multiply(x: float, y: float) -> float: function fibonacci (line 34) | def fibonacci(n: int) -> list[int]: function reverse_string (line 45) | def reverse_string(text: str) -> str: function word_count (line 51) | def word_count(text: str) -> int: function to_uppercase (line 57) | def to_uppercase(text: str) -> str: function list_files (line 63) | def list_files(directory: str) -> list[str]: function read_file (line 71) | def read_file(path: str) -> str: FILE: examples/complex_inputs.py class ShrimpTank (line 16) | class ShrimpTank(BaseModel): class Shrimp (line 17) | class Shrimp(BaseModel): function name_shrimp (line 24) | def name_shrimp( FILE: examples/config_server.py function get_status (line 28) | def get_status() -> dict[str, str | bool]: function echo_message (line 38) | def echo_message(message: str) -> str: FILE: examples/custom_tool_serializer_decorator.py function with_serializer (line 19) | def with_serializer(serializer: Callable[[Any], str]): function get_example_data (line 46) | def get_example_data() -> dict: function get_json_data (line 52) | def get_json_data() -> dict: function example_usage (line 57) | async def example_usage(): FILE: examples/desktop.py function desktop (line 16) | def desktop() -> list[str]: function get_greeting (line 24) | def get_greeting(name: str) -> str: function add (line 30) | def add(a: int, b: int) -> int: FILE: examples/diagnostics/client_with_tracing.py function setup_tracing (line 32) | def setup_tracing(): function main (line 48) | async def main(): FILE: examples/diagnostics/server.py function lifespan (line 20) | async def lifespan(server: FastMCP) -> AsyncIterator[None]: function ping (line 78) | def ping() -> str: function status_resource (line 84) | def status_resource() -> str: function echo_template (line 90) | def echo_template(message: str) -> str: function greet_prompt (line 96) | def greet_prompt(name: str = "World") -> str: function fail_tool (line 105) | def fail_tool(message: str = "Intentional tool failure") -> str: function error_resource (line 111) | def error_resource() -> str: function error_template (line 117) | def error_template(code: str) -> str: function fail_prompt (line 123) | def fail_prompt() -> str: FILE: examples/echo.py function echo_tool (line 12) | def echo_tool(text: str) -> str: function echo_resource (line 18) | def echo_resource() -> str: function echo_template (line 23) | def echo_template(text: str) -> str: function echo_prompt (line 29) | def echo_prompt(text: str) -> str: FILE: examples/elicitation.py function greet (line 21) | async def greet(ctx: Context) -> str: function survey (line 31) | async def survey(ctx: Context) -> str: FILE: examples/fastmcp_config/server.py function echo (line 10) | def echo(text: str) -> str: function add (line 16) | def add(a: int, b: int) -> int: function get_example_config (line 22) | def get_example_config() -> str: FILE: examples/fastmcp_config_demo/server.py function take_screenshot (line 20) | def take_screenshot() -> Image: function analyze_colors (line 38) | def analyze_colors() -> dict: FILE: examples/filesystem-provider/mcp/prompts/assistant.py function code_review (line 7) | def code_review(code: str, language: str = "python") -> str: function explain (line 32) | def explain(topic: str, audience: str = "developer") -> str: FILE: examples/filesystem-provider/mcp/resources/config.py function get_app_config (line 10) | def get_app_config() -> str: function get_env_config (line 24) | def get_env_config(env: str) -> str: function get_feature_flags (line 46) | def get_feature_flags() -> str: FILE: examples/filesystem-provider/mcp/tools/calculator.py function add (line 11) | def add(a: float, b: float) -> float: function multiply (line 17) | def multiply(a: float, b: float) -> float: FILE: examples/filesystem-provider/mcp/tools/greeting.py function greet (line 7) | def greet(name: str) -> str: function farewell (line 17) | def farewell(name: str) -> str: function _format_message (line 27) | def _format_message(msg: str) -> str: FILE: examples/get_file.py function create_server (line 13) | def create_server(): FILE: examples/in_memory_proxy_example.py class EchoService (line 18) | class EchoService: method echo (line 21) | def echo(self, message: str) -> str: function main (line 25) | async def main(): FILE: examples/memory.py function cosine_similarity (line 48) | def cosine_similarity(a: list[float], b: list[float]) -> float: function do_ai (line 56) | async def do_ai( class Deps (line 72) | class Deps: function get_db_pool (line 77) | async def get_db_pool() -> asyncpg.Pool: class MemoryNode (line 86) | class MemoryNode(BaseModel): method from_content (line 98) | async def from_content(cls, content: str, deps: Deps): method save (line 102) | async def save(self, deps: Deps): method merge_with (line 136) | async def merge_with(self, other: Self, deps: Deps): method get_effective_importance (line 156) | def get_effective_importance(self): function get_embedding (line 160) | async def get_embedding(text: str, deps: Deps) -> list[float]: function delete_memory (line 168) | async def delete_memory(memory_id: int, deps: Deps): function add_memory (line 173) | async def add_memory(content: str, deps: Deps): function find_similar_memories (line 189) | async def find_similar_memories(embedding: list[float], deps: Deps) -> l... function update_importance (line 215) | async def update_importance(user_embedding: list[float], deps: Deps): function prune_memories (line 241) | async def prune_memories(deps: Deps): function display_memory_tree (line 256) | async def display_memory_tree(deps: Deps) -> str: function remember (line 278) | async def remember( function read_profile (line 293) | async def read_profile() -> str: function initialize_database (line 300) | async def initialize_database(): FILE: examples/mount_example.py function get_weather_forecast (line 20) | def get_weather_forecast(location: str) -> str: function weather_data (line 26) | async def weather_data(): function get_news_headlines (line 36) | def get_news_headlines() -> list[str]: function news_data (line 46) | async def news_data(): function check_app_status (line 60) | def check_app_status() -> dict[str, str]: function get_server_details (line 71) | async def get_server_details(): FILE: examples/namespace_activation/client.py function load_server (line 17) | def load_server(): function show_tools (line 31) | def show_tools(tools: list, title: str) -> None: function main (line 37) | async def main(): FILE: examples/namespace_activation/server.py function analyze_portfolio (line 16) | def analyze_portfolio(symbols: list[str]) -> str: function get_market_data (line 22) | def get_market_data(symbol: str) -> dict: function execute_trade (line 28) | def execute_trade(symbol: str, quantity: int, side: str) -> str: function list_users (line 35) | def list_users() -> list[str]: function reset_user_password (line 41) | def reset_user_password(username: str) -> str: function activate_finance (line 48) | async def activate_finance(ctx: Context) -> str: function activate_admin (line 55) | async def activate_admin(ctx: Context) -> str: function deactivate_all (line 62) | async def deactivate_all(ctx: Context) -> str: FILE: examples/persistent_state/client.py function main (line 21) | async def main() -> None: FILE: examples/persistent_state/client_stdio.py function main (line 27) | async def main() -> None: FILE: examples/persistent_state/server.py function set_value (line 17) | async def set_value(key: str, value: str, ctx: Context) -> str: function get_value (line 24) | async def get_value(key: str, ctx: Context) -> str: function list_session_info (line 33) | async def list_session_info(ctx: Context) -> dict[str, str | None]: FILE: examples/prompts_as_tools/client.py function main (line 16) | async def main(): FILE: examples/prompts_as_tools/server.py function explain_concept (line 18) | def explain_concept(concept: str) -> str: function analyze_code (line 33) | def analyze_code(code: str, language: str = "python", focus: str = "all"... function review_pull_request (line 53) | def review_pull_request( FILE: examples/providers/sqlite/server.py class ConfigurableTool (line 31) | class ConfigurableTool(Tool): method run (line 40) | async def run(self, arguments: dict[str, Any]) -> ToolResult: class SQLiteToolProvider (line 67) | class SQLiteToolProvider(Provider): method __init__ (line 74) | def __init__(self, db_path: str): method list_tools (line 78) | async def list_tools(self) -> Sequence[Tool]: method get_tool (line 85) | async def get_tool(self, name: str) -> Tool | None: method _make_tool (line 94) | def _make_tool(self, row: aiosqlite.Row) -> ConfigurableTool: function server_info (line 109) | def server_info() -> dict[str, str]: function main (line 118) | async def main(): FILE: examples/providers/sqlite/setup_db.py function setup_database (line 19) | async def setup_database() -> None: FILE: examples/resources_as_tools/client.py function main (line 16) | async def main(): FILE: examples/resources_as_tools/server.py function app_config (line 18) | def app_config() -> str: function readme (line 31) | def readme() -> str: function user_profile (line 42) | def user_profile(user_id: str) -> str: function read_file (line 55) | def read_file(directory: str, filename: str) -> str: FILE: examples/run_with_tracing.py function main (line 22) | def main() -> None: FILE: examples/sampling/server_fallback.py function summarize (line 41) | async def summarize(text: str, ctx: Context) -> str: function translate (line 56) | async def translate(text: str, target_language: str, ctx: Context) -> str: function main (line 70) | async def main(): FILE: examples/sampling/structured_output.py class LoggingAnthropicHandler (line 28) | class LoggingAnthropicHandler(AnthropicSamplingHandler): method __call__ (line 29) | async def __call__( class SentimentAnalysis (line 39) | class SentimentAnalysis(BaseModel): function analyze_sentiment (line 51) | async def analyze_sentiment(text: str, ctx: Context) -> dict: function main (line 65) | async def main(): FILE: examples/sampling/text.py class LoggingAnthropicHandler (line 27) | class LoggingAnthropicHandler(AnthropicSamplingHandler): method __call__ (line 28) | async def __call__( function write_haiku (line 42) | async def write_haiku(topic: str, ctx: Context) -> str: function main (line 58) | async def main(): FILE: examples/sampling/tool_use.py class LoggingAnthropicHandler (line 29) | class LoggingAnthropicHandler(AnthropicSamplingHandler): method __call__ (line 30) | async def __call__( function add (line 40) | def add(a: float, b: float) -> str: function multiply (line 47) | def multiply(a: float, b: float) -> str: function get_current_time (line 54) | def get_current_time() -> str: function roll_dice (line 60) | def roll_dice(sides: int = 6) -> str: class AssistantResponse (line 68) | class AssistantResponse(BaseModel): function ask_assistant (line 81) | async def ask_assistant(question: str, ctx: Context) -> dict: function main (line 96) | async def main(): FILE: examples/screenshot.py function take_screenshot (line 22) | def take_screenshot() -> Image: FILE: examples/search/client_bm25.py function _get_result (line 23) | def _get_result(result) -> Any: function _format_params (line 33) | def _format_params(tool: dict) -> str: function _tool_table (line 46) | def _tool_table( function main (line 67) | async def main(): FILE: examples/search/client_regex.py function _get_result (line 23) | def _get_result(result) -> Any: function _format_params (line 33) | def _format_params(tool: dict) -> str: function _tool_table (line 46) | def _tool_table( function main (line 67) | async def main(): FILE: examples/search/server_bm25.py function add (line 24) | def add(a: int, b: int) -> int: function multiply (line 30) | def multiply(x: float, y: float) -> float: function fibonacci (line 36) | def fibonacci(n: int) -> list[int]: function reverse_string (line 47) | def reverse_string(text: str) -> str: function word_count (line 53) | def word_count(text: str) -> int: function to_uppercase (line 59) | def to_uppercase(text: str) -> str: function list_files (line 65) | def list_files(directory: str) -> list[str]: function read_file (line 71) | def read_file(path: str) -> str: FILE: examples/search/server_regex.py function add (line 28) | def add(a: int, b: int) -> int: function multiply (line 34) | def multiply(x: float, y: float) -> float: function fibonacci (line 40) | def fibonacci(n: int) -> list[int]: function reverse_string (line 51) | def reverse_string(text: str) -> str: function word_count (line 57) | def word_count(text: str) -> int: function to_uppercase (line 63) | def to_uppercase(text: str) -> str: FILE: examples/simple_echo.py function echo (line 12) | def echo(text: str) -> str: FILE: examples/skills/client.py function main (line 17) | async def main(): FILE: examples/skills/download_skills.py function main (line 29) | async def main(): FILE: examples/smart_home/src/smart_home/__main__.py function main (line 4) | def main(): FILE: examples/smart_home/src/smart_home/hub.py function hub_status (line 16) | def hub_status() -> str: FILE: examples/smart_home/src/smart_home/lights/hue_utils.py function _get_bridge (line 9) | def _get_bridge() -> Bridge | None: function handle_phue_error (line 23) | def handle_phue_error( FILE: examples/smart_home/src/smart_home/lights/server.py class HueAttributes (line 19) | class HueAttributes(TypedDict, total=False): function read_all_lights (line 61) | def read_all_lights() -> list[str]: function toggle_light (line 77) | def toggle_light(light_name: str, state: bool) -> dict[str, Any]: function set_brightness (line 94) | def set_brightness(light_name: str, brightness: int) -> dict[str, Any]: function list_groups (line 118) | def list_groups() -> list[str]: function list_scenes (line 131) | def list_scenes() -> dict[str, list[str]] | list[str]: function activate_scene (line 172) | def activate_scene(group_name: str, scene_name: str) -> dict[str, Any]: function set_light_attributes (line 233) | def set_light_attributes(light_name: str, attributes: HueAttributes) -> ... function set_group_attributes (line 260) | def set_group_attributes(group_name: str, attributes: HueAttributes) -> ... function list_lights_by_group (line 285) | def list_lights_by_group() -> dict[str, list[str]] | list[str]: FILE: examples/smart_home/src/smart_home/settings.py class Settings (line 5) | class Settings(BaseSettings): FILE: examples/tags_example.py function get_users (line 20) | async def get_users(): function create_user (line 26) | async def create_user(name: str): function get_admin_stats (line 32) | async def get_admin_stats(): function health_check (line 38) | async def health_check(): function get_metrics (line 44) | async def get_metrics(): function main (line 49) | async def main(): FILE: examples/task_elicitation.py class DinnerPrefs (line 35) | class DinnerPrefs: function plan_dinner (line 41) | async def plan_dinner(ctx: Context) -> str: function handle_elicitation (line 63) | async def handle_elicitation(message, response_type, params, context): function main (line 70) | async def main(): FILE: examples/tasks/client.py function load_server (line 33) | def load_server(): function print_notification (line 51) | def print_notification(status: GetTaskResult) -> None: function task (line 83) | async def task( function immediate (line 132) | async def immediate( FILE: examples/tasks/server.py function slow_computation (line 33) | async def slow_computation( FILE: examples/testing_demo/server.py function add (line 16) | def add(a: int, b: int) -> int: function greet (line 22) | def greet(name: str, greeting: str = "Hello") -> str: function async_multiply (line 28) | async def async_multiply(x: float, y: float) -> float: function server_info (line 35) | def server_info() -> str: function greeting_resource (line 41) | def greeting_resource(name: str) -> str: function hello_prompt (line 48) | def hello_prompt(name: str = "World") -> str: function explain_prompt (line 54) | def explain_prompt(topic: str, detail_level: str = "medium") -> str: FILE: examples/testing_demo/tests/test_server.py function client (line 14) | async def client(): function test_add_tool (line 28) | async def test_add_tool(client: Client): function test_greet_tool_default (line 34) | async def test_greet_tool_default(client: Client): function test_greet_tool_custom (line 40) | async def test_greet_tool_custom(client: Client): function test_async_multiply_tool (line 46) | async def test_async_multiply_tool(client: Client): function test_add_parametrized (line 61) | async def test_add_parametrized(client: Client, a: int, b: int, expected... function test_server_info_resource (line 67) | async def test_server_info_resource(client: Client): function test_greeting_resource_template (line 74) | async def test_greeting_resource_template(client: Client): function test_hello_prompt_default (line 81) | async def test_hello_prompt_default(client: Client): function test_hello_prompt_custom (line 87) | async def test_hello_prompt_custom(client: Client): function test_explain_prompt_levels (line 93) | async def test_explain_prompt_levels(client: Client): function test_list_tools (line 110) | async def test_list_tools(client: Client): function test_list_resources (line 120) | async def test_list_resources(client: Client): function test_list_prompts (line 131) | async def test_list_prompts(client: Client): function test_greet_with_dirty_equals (line 141) | async def test_greet_with_dirty_equals(client: Client): function test_tool_schema_structure (line 149) | async def test_tool_schema_structure(client: Client): FILE: examples/text_me.py class SurgeSettings (line 30) | class SurgeSettings(BaseSettings): function text_me (line 50) | def text_me(text_content: str) -> str: FILE: examples/tool_result_echo.py class EchoData (line 19) | class EchoData: function echo (line 25) | def echo(text: str) -> ToolResult: FILE: examples/versioning/client_version_selection.py function charge (line 21) | def charge(amount: int, currency: str = "USD") -> dict: function charge (line 27) | def charge( # noqa: F811 function charge (line 35) | def charge( # noqa: F811 function main (line 45) | async def main(): FILE: examples/versioning/version_filters.py function process (line 24) | def process(data: str) -> str: function process (line 30) | def process(data: str, mode: str = "upper") -> str: # noqa: F811 function process (line 36) | def process(data: str, mode: str = "upper", repeat: int = 1) -> str: # ... function health (line 44) | def health() -> str: function show_surface (line 60) | async def show_surface(name: str, server: FastMCP): function main (line 76) | async def main(): FILE: examples/versioning/versioned_components.py function calculate (line 25) | def calculate(x: int, y: int) -> int: function calculate (line 31) | def calculate(x: int, y: int, z: int = 0) -> int: # noqa: F811 function config_v1 (line 41) | def config_v1() -> str: function config_v2 (line 46) | def config_v2() -> str: function summarize (line 55) | def summarize(text: str) -> str: function summarize (line 60) | def summarize(text: str, style: str = "concise") -> str: # noqa: F811 function main (line 64) | async def main(): FILE: scripts/auto_close_duplicates.py class Issue (line 23) | class Issue: class Comment (line 35) | class Comment: class Reaction (line 47) | class Reaction: class GitHubClient (line 55) | class GitHubClient: method __init__ (line 58) | def __init__(self, token: str, owner: str, repo: str): method get_potential_duplicate_issues (line 68) | def get_potential_duplicate_issues(self) -> list[Issue]: method get_issue_comments (line 115) | def get_issue_comments(self, issue_number: int) -> list[Comment]: method get_comment_reactions (line 152) | def get_comment_reactions( method remove_label (line 177) | def remove_label(self, issue_number: int, label: str) -> bool: method close_issue (line 184) | def close_issue(self, issue_number: int, comment: str) -> bool: function find_duplicate_comment (line 219) | def find_duplicate_comment(comments: list[Comment]) -> Comment | None: function was_already_auto_closed (line 231) | def was_already_auto_closed(comments: list[Comment]) -> bool: function is_past_cooldown (line 242) | def is_past_cooldown(duplicate_comment: Comment) -> bool: function has_human_activity (line 251) | def has_human_activity( function main (line 285) | def main(): FILE: scripts/auto_close_needs_mre.py class Issue (line 24) | class Issue: class Comment (line 37) | class Comment: class Event (line 48) | class Event: class GitHubClient (line 56) | class GitHubClient: method __init__ (line 59) | def __init__(self, token: str, owner: str, repo: str): method get_issues_with_label (line 69) | def get_issues_with_label( method get_issue_events (line 112) | def get_issue_events(self, issue_number: int) -> list[Event]: method get_issue_comments (line 150) | def get_issue_comments(self, issue_number: int) -> list[Comment]: method get_issue_timeline (line 186) | def get_issue_timeline(self, issue_number: int) -> list[dict]: method close_issue (line 218) | def close_issue(self, issue_number: int, comment: str) -> tuple[bool, ... function find_label_application_date (line 257) | def find_label_application_date( function has_author_activity_after (line 268) | def has_author_activity_after( function should_close_as_needs_mre (line 303) | def should_close_as_needs_mre( function main (line 323) | def main(): FILE: scripts/benchmark_imports.py class BenchmarkCase (line 24) | class BenchmarkCase: function measure_once (line 120) | def measure_once(stmt: str, prereqs: str) -> float | None: function measure (line 139) | def measure(case: BenchmarkCase, runs: int) -> dict[str, float | str | N... function print_table (line 161) | def print_table(results: list[dict[str, float | str | None]]) -> None: function main (line 185) | def main() -> None: FILE: src/fastmcp/__init__.py function __getattr__ (line 39) | def __getattr__(name: str) -> object: FILE: src/fastmcp/cli/apps_dev.py function _has_ui_resource (line 288) | def _has_ui_resource(tool: dict[str, Any]) -> bool: function _model_from_schema (line 299) | def _model_from_schema(tool_name: str, input_schema: dict[str, Any]) -> ... function _build_picker_html (line 352) | def _build_picker_html(tools: list[dict[str, Any]]) -> str: function _list_tools (line 448) | async def _list_tools(mcp_url: str) -> list[dict[str, Any]]: function _read_mcp_resource (line 467) | async def _read_mcp_resource(mcp_url: str, uri: str) -> str | None: function _fetch_app_bridge_bundle_sync (line 496) | def _fetch_app_bridge_bundle_sync( function _fetch_app_bridge_bundle (line 590) | async def _fetch_app_bridge_bundle( function _make_dev_app (line 606) | def _make_dev_app( function _start_user_server (line 775) | async def _start_user_server( function _wait_for_server (line 807) | async def _wait_for_server(url: str, timeout: float = 15.0) -> bool: function run_dev_apps (line 825) | async def run_dev_apps( FILE: src/fastmcp/cli/cimd.py function create_command (line 32) | def create_command( function validate_command (line 144) | def validate_command( FILE: src/fastmcp/cli/cli.py function _get_npx_command (line 49) | def _get_npx_command(): function _parse_env_var (line 63) | def _parse_env_var(env_var: str) -> tuple[str, str]: function with_argv (line 73) | def with_argv(args: list[str] | None): function version (line 96) | def version( function inspector (line 142) | async def inspector( function apps (line 337) | async def apps( function run (line 385) | async def run( function inspect (line 760) | async def inspect( function prepare (line 1002) | async def prepare( FILE: src/fastmcp/cli/client.py function resolve_server_spec (line 43) | def resolve_server_spec( function _build_stdio_from_command (line 115) | def _build_stdio_from_command(command_str: str) -> StdioTransport: function _resolve_json_spec (line 130) | def _resolve_json_spec(path: Path) -> str | dict[str, Any]: function _is_http_target (line 158) | def _is_http_target(resolved: str | dict[str, Any] | ClientTransport) ->... function _terminal_elicitation_handler (line 169) | async def _terminal_elicitation_handler( function _build_client (line 228) | def _build_client( function coerce_value (line 264) | def coerce_value(raw: str, schema: dict[str, Any]) -> Any: function parse_tool_arguments (line 298) | def parse_tool_arguments( function _json_schema_type_to_str (line 356) | def _json_schema_type_to_str(schema: dict[str, Any]) -> str: function format_tool_signature (line 370) | def format_tool_signature(tool: mcp.types.Tool) -> str: function _print_schema (line 401) | def _print_schema(label: str, schema: dict[str, Any]) -> None: function _sanitize_untrusted_text (line 409) | def _sanitize_untrusted_text(value: str) -> str: function _format_call_result_text (line 420) | def _format_call_result_text(result: CallToolResult) -> None: function _content_block_to_dict (line 452) | def _content_block_to_dict(block: mcp.types.ContentBlock) -> dict[str, A... function _call_result_to_dict (line 463) | def _call_result_to_dict(result: CallToolResult) -> dict[str, Any]: function _tools_to_json (line 473) | def _tools_to_json(tools: list[mcp.types.Tool]) -> list[dict[str, Any]]: function _handle_tool_call (line 492) | async def _handle_tool_call( function _handle_resource (line 541) | async def _handle_resource( function _handle_prompt (line 579) | async def _handle_prompt( function list_command (line 641) | async def list_command( function call_command (line 796) | async def call_command( function discover_command (line 897) | async def discover_command( FILE: src/fastmcp/cli/discovery.py class DiscoveredServer (line 37) | class DiscoveredServer: method qualified_name (line 46) | def qualified_name(self) -> str: method transport_summary (line 51) | def transport_summary(self) -> str: function _normalize_server_entry (line 68) | def _normalize_server_entry(entry: dict[str, Any]) -> dict[str, Any]: function _parse_mcp_servers (line 90) | def _parse_mcp_servers( function _parse_mcp_config (line 120) | def _parse_mcp_config(path: Path, source: str) -> list[DiscoveredServer]: function _scan_claude_desktop (line 140) | def _scan_claude_desktop() -> list[DiscoveredServer]: function _scan_claude_code (line 157) | def _scan_claude_code(start_dir: Path) -> list[DiscoveredServer]: function _scan_cursor_workspace (line 204) | def _scan_cursor_workspace(start_dir: Path) -> list[DiscoveredServer]: function _scan_project_mcp_json (line 223) | def _scan_project_mcp_json(start_dir: Path) -> list[DiscoveredServer]: function _scan_gemini (line 231) | def _scan_gemini(start_dir: Path) -> list[DiscoveredServer]: function _scan_goose (line 251) | def _scan_goose() -> list[DiscoveredServer]: function discover_servers (line 314) | def discover_servers(start_dir: Path | None = None) -> list[DiscoveredSe... function resolve_name (line 331) | def resolve_name(name: str, start_dir: Path | None = None) -> ClientTran... FILE: src/fastmcp/cli/generate.py function _is_simple_type (line 32) | def _is_simple_type(schema: dict[str, Any]) -> bool: function _is_simple_array (line 41) | def _is_simple_array(schema: dict[str, Any]) -> tuple[bool, str | None]: function _schema_to_python_type (line 69) | def _schema_to_python_type(schema: dict[str, Any]) -> tuple[str, bool]: function _format_schema_for_help (line 107) | def _format_schema_for_help(schema: dict[str, Any]) -> str: function serialize_transport (line 122) | def serialize_transport( function _to_python_identifier (line 155) | def _to_python_identifier(name: str) -> str: function _tool_function_source (line 166) | def _tool_function_source(tool: mcp.types.Tool) -> str: function generate_cli_script (line 283) | def generate_cli_script( function _param_to_cli_flag (line 536) | def _param_to_cli_flag(prop_name: str) -> str: function _schema_type_label (line 550) | def _schema_type_label(prop_schema: dict[str, Any]) -> str: function _tool_skill_section (line 569) | def _tool_skill_section(tool: mcp.types.Tool, cli_filename: str) -> str: function generate_skill_content (line 621) | def generate_skill_content( function generate_cli_command (line 672) | async def generate_cli_command( function _derive_server_name (line 792) | def _derive_server_name(server_spec: str) -> str: FILE: src/fastmcp/cli/install/claude_code.py function find_claude_command (line 20) | def find_claude_command() -> str | None: function check_claude_code_available (line 68) | def check_claude_code_available() -> bool: function install_claude_code (line 73) | def install_claude_code( function claude_code_command (line 155) | async def claude_code_command( FILE: src/fastmcp/cli/install/claude_desktop.py function get_claude_config_path (line 20) | def get_claude_config_path(config_path: Path | None = None) -> Path | None: function install_claude_desktop (line 49) | def install_claude_desktop( function claude_desktop_command (line 139) | async def claude_desktop_command( FILE: src/fastmcp/cli/install/cursor.py function generate_cursor_deeplink (line 22) | def generate_cursor_deeplink( function open_deeplink (line 47) | def open_deeplink(deeplink: str) -> bool: function install_cursor_workspace (line 59) | def install_cursor_workspace( function install_cursor (line 143) | def install_cursor( function cursor_command (line 228) | async def cursor_command( FILE: src/fastmcp/cli/install/gemini_cli.py function find_gemini_command (line 20) | def find_gemini_command() -> str | None: function check_gemini_cli_available (line 64) | def check_gemini_cli_available() -> bool: function install_gemini_cli (line 69) | def install_gemini_cli( function gemini_cli_command (line 152) | async def gemini_cli_command( FILE: src/fastmcp/cli/install/goose.py function _slugify (line 19) | def _slugify(name: str) -> str: function generate_goose_deeplink (line 29) | def generate_goose_deeplink( function _build_uvx_command (line 59) | def _build_uvx_command( function install_goose (line 86) | def install_goose( function goose_command (line 136) | async def goose_command( FILE: src/fastmcp/cli/install/mcp_json.py function install_mcp_json (line 20) | def install_mcp_json( function mcp_json_command (line 98) | async def mcp_json_command( FILE: src/fastmcp/cli/install/shared.py function validate_server_name (line 28) | def validate_server_name(name: str) -> str: function parse_env_var (line 42) | def parse_env_var(env_var: str) -> tuple[str, str]: function process_common_args (line 53) | async def process_common_args( function open_deeplink (line 169) | def open_deeplink(url: str, *, expected_scheme: str) -> bool: FILE: src/fastmcp/cli/install/stdio.py function install_stdio (line 21) | def install_stdio( function stdio_command (line 78) | async def stdio_command( FILE: src/fastmcp/cli/run.py function is_url (line 83) | def is_url(path: str) -> bool: function create_client_server (line 89) | def create_client_server(url: str) -> Any: function create_mcp_config_server (line 109) | def create_mcp_config_server(mcp_config_path: Path) -> FastMCP[None]: function load_mcp_server_config (line 118) | def load_mcp_server_config(config_path: Path) -> MCPServerConfig: function run_command (line 135) | async def run_command( function run_module_command (line 260) | def run_module_command( function run_v1_server_async (line 299) | async def run_v1_server_async( function _watch_filter (line 327) | def _watch_filter(_change: Change, path: str) -> bool: function _terminate_process (line 332) | async def _terminate_process(process: asyncio.subprocess.Process) -> None: function run_with_reload (line 364) | async def run_with_reload( FILE: src/fastmcp/cli/tasks.py function check_distributed_backend (line 22) | def check_distributed_backend() -> None: function worker (line 61) | def worker( FILE: src/fastmcp/client/auth/bearer.py class BearerAuth (line 11) | class BearerAuth(httpx.Auth): method __init__ (line 12) | def __init__(self, token: str): method auth_flow (line 15) | def auth_flow(self, request): FILE: src/fastmcp/client/auth/oauth.py class ClientNotFoundError (line 37) | class ClientNotFoundError(Exception): function check_if_auth_required (line 41) | async def check_if_auth_required( class TokenStorageAdapter (line 71) | class TokenStorageAdapter(TokenStorage): method __init__ (line 77) | def __init__(self, async_key_value: AsyncKeyValue, server_url: str): method _get_token_cache_key (line 93) | def _get_token_cache_key(self) -> str: method _get_client_info_cache_key (line 96) | def _get_client_info_cache_key(self) -> str: method clear (line 99) | async def clear(self) -> None: method get_tokens (line 104) | async def get_tokens(self) -> OAuthToken | None: method set_tokens (line 108) | async def set_tokens(self, tokens: OAuthToken) -> None: method get_client_info (line 119) | async def get_client_info(self) -> OAuthClientInformationFull | None: method set_client_info (line 125) | async def set_client_info(self, client_info: OAuthClientInformationFul... class OAuth (line 138) | class OAuth(OAuthClientProvider): method __init__ (line 148) | def __init__( method _bind (line 201) | def _bind(self, mcp_url: str) -> None: method _initialize (line 279) | async def _initialize(self) -> None: method redirect_handler (line 290) | async def redirect_handler(self, authorization_url: str) -> None: method callback_handler (line 311) | async def callback_handler(self) -> tuple[str, str | None]: method async_auth_flow (line 350) | async def async_auth_flow( FILE: src/fastmcp/client/client.py class ClientSessionState (line 97) | class ClientSessionState: class CallToolResult (line 114) | class CallToolResult: class Client (line 124) | class Client( method __init__ (line 191) | def __init__(self: Client[T], transport: T, *args: Any, **kwargs: Any)... method __init__ (line 194) | def __init__( method __init__ (line 202) | def __init__( method __init__ (line 210) | def __init__( method __init__ (line 218) | def __init__( method __init__ (line 226) | def __init__( method __init__ (line 238) | def __init__( method _reset_session_state (line 356) | def _reset_session_state(self, full: bool = False) -> None: method session (line 371) | def session(self) -> ClientSession: method initialize_result (line 381) | def initialize_result(self) -> mcp.types.InitializeResult | None: method set_roots (line 385) | def set_roots(self, roots: RootsList | RootsHandler) -> None: method set_sampling_callback (line 389) | def set_sampling_callback( method set_elicitation_callback (line 404) | def set_elicitation_callback( method is_connected (line 412) | def is_connected(self) -> bool: method new (line 416) | def new(self) -> Client[ClientTransportT]: method _context_manager (line 445) | async def _context_manager(self): method initialize (line 461) | async def initialize( method __aenter__ (line 512) | async def __aenter__(self): method __aexit__ (line 515) | async def __aexit__(self, exc_type, exc_val, exc_tb): method _connect (line 522) | async def _connect(self): method _disconnect (line 612) | async def _disconnect(self, force: bool = False): method _session_runner (line 650) | async def _session_runner(self): method _await_with_session_monitoring (line 675) | async def _await_with_session_monitoring( method _handle_task_status_notification (line 740) | def _handle_task_status_notification( method close (line 762) | async def close(self): method ping (line 768) | async def ping(self) -> bool: method cancel (line 773) | async def cancel( method progress (line 790) | async def progress( method set_logging_level (line 802) | async def set_logging_level(self, level: mcp.types.LoggingLevel) -> None: method send_roots_list_changed (line 806) | async def send_roots_list_changed(self) -> None: method complete_mcp (line 812) | async def complete_mcp( method complete (line 843) | async def complete( method generate_name (line 870) | def generate_name(cls, name: str | None = None) -> str: FILE: src/fastmcp/client/elicitation.py class ElicitResult (line 22) | class ElicitResult(MCPElicitResult, Generic[T]): function create_elicitation_callback (line 38) | def create_elicitation_callback( FILE: src/fastmcp/client/logging.py function default_log_handler (line 17) | async def default_log_handler(message: LogMessage) -> None: function create_log_callback (line 47) | def create_log_callback(handler: LogHandler | None = None) -> LoggingFnT: FILE: src/fastmcp/client/messages.py class MessageHandler (line 16) | class MessageHandler: method __call__ (line 22) | async def __call__( method dispatch (line 30) | async def dispatch(self, message: Message) -> None: method on_message (line 76) | async def on_message(self, message: Message) -> None: method on_request (line 79) | async def on_request( method on_ping (line 84) | async def on_ping(self, message: mcp.types.PingRequest) -> None: method on_list_roots (line 87) | async def on_list_roots(self, message: mcp.types.ListRootsRequest) -> ... method on_create_message (line 90) | async def on_create_message(self, message: mcp.types.CreateMessageRequ... method on_notification (line 93) | async def on_notification(self, message: mcp.types.ServerNotification)... method on_exception (line 96) | async def on_exception(self, message: Exception) -> None: method on_progress (line 99) | async def on_progress(self, message: mcp.types.ProgressNotification) -... method on_logging_message (line 102) | async def on_logging_message( method on_tool_list_changed (line 107) | async def on_tool_list_changed( method on_resource_list_changed (line 112) | async def on_resource_list_changed( method on_prompt_list_changed (line 117) | async def on_prompt_list_changed( method on_resource_updated (line 122) | async def on_resource_updated( method on_cancelled (line 127) | async def on_cancelled(self, message: mcp.types.CancelledNotification)... FILE: src/fastmcp/client/mixins/prompts.py class ClientPromptsMixin (line 31) | class ClientPromptsMixin: method list_prompts_mcp (line 36) | async def list_prompts_mcp( method list_prompts (line 59) | async def list_prompts( method get_prompt_mcp (line 107) | async def get_prompt_mcp( method get_prompt (line 176) | async def get_prompt( method get_prompt (line 187) | async def get_prompt( method get_prompt (line 199) | async def get_prompt( method _get_prompt_as_task (line 247) | async def _get_prompt_as_task( FILE: src/fastmcp/client/mixins/resources.py class ClientResourcesMixin (line 30) | class ClientResourcesMixin: method list_resources_mcp (line 35) | async def list_resources_mcp( method list_resources (line 58) | async def list_resources( method list_resource_templates_mcp (line 105) | async def list_resource_templates_mcp( method list_resource_templates (line 128) | async def list_resource_templates( method read_resource_mcp (line 177) | async def read_resource_mcp( method read_resource (line 233) | async def read_resource( method read_resource (line 243) | async def read_resource( method read_resource (line 254) | async def read_resource( method _read_resource_as_task (line 308) | async def _read_resource_as_task( FILE: src/fastmcp/client/mixins/task_management.py class ClientTaskManagementMixin (line 30) | class ClientTaskManagementMixin: method get_task_status (line 33) | async def get_task_status(self: Client, task_id: str) -> GetTaskResult: method get_task_result (line 56) | async def get_task_result(self: Client, task_id: str) -> Any: method list_tasks (line 85) | async def list_tasks( method cancel_task (line 135) | async def cancel_task(self: Client, task_id: str) -> mcp.types.CancelT... FILE: src/fastmcp/client/mixins/tools.py class ClientToolsMixin (line 34) | class ClientToolsMixin: method list_tools_mcp (line 39) | async def list_tools_mcp( method list_tools (line 62) | async def list_tools( method call_tool_mcp (line 111) | async def call_tool_mcp( method _parse_call_tool_result (line 164) | async def _parse_call_tool_result( method call_tool (line 191) | async def call_tool( method call_tool (line 205) | async def call_tool( method call_tool (line 220) | async def call_tool( method _call_tool_as_task (line 291) | async def _call_tool_as_task( function _parse_call_tool_result (line 361) | async def _parse_call_tool_result( FILE: src/fastmcp/client/oauth_callback.py function create_callback_html (line 34) | def create_callback_html( class CallbackResponse (line 80) | class CallbackResponse: method from_dict (line 87) | def from_dict(cls, data: dict[str, str]) -> CallbackResponse: method to_dict (line 90) | def to_dict(self) -> dict[str, str]: class OAuthCallbackResult (line 95) | class OAuthCallbackResult: function create_oauth_callback_server (line 103) | def create_oauth_callback_server( FILE: src/fastmcp/client/progress.py function default_progress_handler (line 12) | async def default_progress_handler( FILE: src/fastmcp/client/roots.py function convert_roots_list (line 19) | def convert_roots_list(roots: RootsList) -> list[mcp.types.Root]: function create_roots_callback (line 33) | def create_roots_callback( function _create_roots_callback_from_roots (line 45) | def _create_roots_callback_from_roots( function _create_roots_callback_from_fn (line 58) | def _create_roots_callback_from_fn( FILE: src/fastmcp/client/sampling/__init__.py function create_sampling_callback (line 44) | def create_sampling_callback( FILE: src/fastmcp/client/sampling/handlers/anthropic.py function _image_content_to_anthropic_block (line 55) | def _image_content_to_anthropic_block(content: ImageContent) -> ImageBlo... class AnthropicSamplingHandler (line 72) | class AnthropicSamplingHandler: method __init__ (line 90) | def __init__( method __call__ (line 96) | async def __call__( method _iter_models_from_preferences (line 150) | def _iter_models_from_preferences( method _convert_to_anthropic_messages (line 173) | def _convert_to_anthropic_messages( method _message_to_create_message_result (line 328) | def _message_to_create_message_result( method _select_model_from_preferences (line 349) | def _select_model_from_preferences( method _convert_tools_to_anthropic (line 360) | def _convert_tools_to_anthropic(tools: list[Tool]) -> list[ToolParam]: method _convert_tool_choice_to_anthropic (line 379) | def _convert_tool_choice_to_anthropic( method _message_to_result_with_tools (line 399) | def _message_to_result_with_tools( FILE: src/fastmcp/client/sampling/handlers/google_genai.py class GoogleGenaiSamplingHandler (line 56) | class GoogleGenaiSamplingHandler: method __init__ (line 76) | def __init__( method __call__ (line 86) | async def __call__( method _get_model (line 136) | def _get_model(self, model_preferences: ModelPreferences | None) -> str: function _convert_tool_to_google_genai (line 144) | def _convert_tool_to_google_genai(tool: MCPTool) -> GoogleTool: function _convert_tool_choice_to_google_genai (line 161) | def _convert_tool_choice_to_google_genai(tool_choice: ToolChoice | None)... function _sampling_content_to_google_genai_part (line 191) | def _sampling_content_to_google_genai_part( function _convert_messages_to_google_genai_content (line 268) | def _convert_messages_to_google_genai_content( function _get_candidate_from_response (line 306) | def _get_candidate_from_response(response: GenerateContentResponse) -> C... function _response_to_create_message_result (line 314) | def _response_to_create_message_result( function _response_to_result_with_tools (line 331) | def _response_to_result_with_tools( FILE: src/fastmcp/client/sampling/handlers/openai.py function _image_content_to_openai_part (line 63) | def _image_content_to_openai_part( function _audio_content_to_openai_part (line 79) | def _audio_content_to_openai_part( class OpenAISamplingHandler (line 95) | class OpenAISamplingHandler: method __init__ (line 98) | def __init__( method __call__ (line 106) | async def __call__( method _iter_models_from_preferences (line 157) | def _iter_models_from_preferences( method _convert_to_openai_messages (line 182) | def _convert_to_openai_messages( method _chat_completion_to_create_message_result (line 382) | def _chat_completion_to_create_message_result( method _select_model_from_preferences (line 399) | def _select_model_from_preferences( method _convert_tools_to_openai (line 410) | def _convert_tools_to_openai(tools: list[Tool]) -> list[ChatCompletion... method _convert_tool_choice_to_openai (line 432) | def _convert_tool_choice_to_openai( method _chat_completion_to_result_with_tools (line 446) | def _chat_completion_to_result_with_tools( FILE: src/fastmcp/client/tasks.py class TaskNotificationHandler (line 26) | class TaskNotificationHandler(MessageHandler): method __init__ (line 29) | def __init__(self, client: Client): method dispatch (line 33) | async def dispatch(self, message: Message) -> None: class Task (line 47) | class Task(abc.ABC, Generic[TaskResultT]): method __init__ (line 60) | def __init__( method _check_client_connected (line 87) | def _check_client_connected(self) -> None: method task_id (line 105) | def task_id(self) -> str: method returned_immediately (line 110) | def returned_immediately(self) -> bool: method _handle_status_notification (line 119) | def _handle_status_notification(self, status: GetTaskResult) -> None: method on_status_change (line 145) | def on_status_change( method status (line 171) | async def status(self) -> GetTaskResult: method result (line 202) | async def result(self) -> TaskResultT: method wait (line 209) | async def wait( method cancel (line 272) | async def cancel(self) -> None: method __await__ (line 289) | def __await__(self): class ToolTask (line 294) | class ToolTask(Task["CallToolResult"]): method __init__ (line 317) | def __init__( method result (line 336) | async def result(self) -> CallToolResult: class PromptTask (line 396) | class PromptTask(Task[mcp.types.GetPromptResult]): method __init__ (line 408) | def __init__( method result (line 427) | async def result(self) -> mcp.types.GetPromptResult: class ResourceTask (line 461) | class ResourceTask( method __init__ (line 475) | def __init__( method result (line 497) | async def result( FILE: src/fastmcp/client/telemetry.py function client_span (line 12) | def client_span( FILE: src/fastmcp/client/transports/base.py class SessionKwargs (line 23) | class SessionKwargs(TypedDict, total=False): class ClientTransport (line 36) | class ClientTransport(abc.ABC): method connect_session (line 47) | async def connect_session( method __repr__ (line 69) | def __repr__(self) -> str: method close (line 73) | async def close(self): # noqa: B027 method get_session_id (line 76) | def get_session_id(self) -> str | None: method _set_auth (line 80) | def _set_auth(self, auth: httpx.Auth | Literal["oauth"] | str | None): FILE: src/fastmcp/client/transports/config.py class MCPConfigTransport (line 25) | class MCPConfigTransport(ClientTransport): method __init__ (line 72) | def __init__(self, config: MCPConfig | dict, name_as_prefix: bool = Tr... method connect_session (line 88) | async def connect_session( method _create_proxy (line 135) | async def _create_proxy( method close (line 205) | async def close(self): method __repr__ (line 209) | def __repr__(self) -> str: FILE: src/fastmcp/client/transports/http.py class StreamableHttpTransport (line 26) | class StreamableHttpTransport(ClientTransport): method __init__ (line 29) | def __init__( method _set_auth (line 98) | def _set_auth(self, auth: httpx.Auth | Literal["oauth"] | str | None): method _make_verify_factory (line 121) | def _make_verify_factory(self) -> McpHttpClientFactory | None: method connect_session (line 147) | async def connect_session( method get_session_id (line 200) | def get_session_id(self) -> str | None: method close (line 208) | async def close(self): method __repr__ (line 212) | def __repr__(self) -> str: FILE: src/fastmcp/client/transports/inference.py function infer_transport (line 24) | def infer_transport(transport: ClientTransportT) -> ClientTransportT: ... function infer_transport (line 28) | def infer_transport(transport: FastMCP) -> FastMCPTransport: ... function infer_transport (line 32) | def infer_transport(transport: FastMCP1Server) -> FastMCPTransport: ... function infer_transport (line 36) | def infer_transport(transport: MCPConfig) -> MCPConfigTransport: ... function infer_transport (line 40) | def infer_transport(transport: dict[str, Any]) -> MCPConfigTransport: ... function infer_transport (line 44) | def infer_transport( function infer_transport (line 50) | def infer_transport( function infer_transport (line 58) | def infer_transport(transport: Path) -> PythonStdioTransport | NodeStdio... function infer_transport (line 61) | def infer_transport( FILE: src/fastmcp/client/transports/memory.py class FastMCPTransport (line 14) | class FastMCPTransport(ClientTransport): method __init__ (line 23) | def __init__(self, mcp: FastMCP | FastMCP1Server, raise_exceptions: bo... method connect_session (line 33) | async def connect_session( method __repr__ (line 84) | def __repr__(self) -> str: function _enter_server_lifespan (line 89) | async def _enter_server_lifespan( FILE: src/fastmcp/client/transports/sse.py class SSETransport (line 25) | class SSETransport(ClientTransport): method __init__ (line 28) | def __init__( method _set_auth (line 66) | def _set_auth(self, auth: httpx.Auth | Literal["oauth"] | str | None): method _make_verify_factory (line 89) | def _make_verify_factory(self) -> McpHttpClientFactory | None: method connect_session (line 115) | async def connect_session( method __repr__ (line 151) | def __repr__(self) -> str: FILE: src/fastmcp/client/transports/stdio.py class StdioTransport (line 22) | class StdioTransport(ClientTransport): method __init__ (line 30) | def __init__( method connect_session (line 72) | async def connect_session( method connect (line 84) | async def connect( method disconnect (line 120) | async def disconnect(self): method close (line 135) | async def close(self): method __del__ (line 138) | def __del__(self): method __repr__ (line 143) | def __repr__(self) -> str: function _stdio_transport_connect_task (line 149) | async def _stdio_transport_connect_task( class PythonStdioTransport (line 205) | class PythonStdioTransport(StdioTransport): method __init__ (line 208) | def __init__( class FastMCPStdioTransport (line 258) | class FastMCPStdioTransport(StdioTransport): method __init__ (line 261) | def __init__( class NodeStdioTransport (line 287) | class NodeStdioTransport(StdioTransport): method __init__ (line 290) | def __init__( class UvStdioTransport (line 340) | class UvStdioTransport(StdioTransport): method __init__ (line 343) | def __init__( class UvxStdioTransport (line 419) | class UvxStdioTransport(StdioTransport): method __init__ (line 422) | def __init__( class NpxStdioTransport (line 484) | class NpxStdioTransport(StdioTransport): method __init__ (line 487) | def __init__( FILE: src/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py class CallToolRequest (line 16) | class CallToolRequest(BaseModel): class CallToolRequestResult (line 25) | class CallToolRequestResult(CallToolResult): method from_call_tool_result (line 37) | def from_call_tool_result( class BulkToolCaller (line 51) | class BulkToolCaller(MCPMixin): method register_tools (line 58) | def register_tools( method call_tools_bulk (line 72) | async def call_tools_bulk( method call_tool_bulk (line 93) | async def call_tool_bulk( method _call_tool (line 120) | async def _call_tool( FILE: src/fastmcp/contrib/bulk_tool_caller/example.py function echo_tool (line 10) | def echo_tool(text: str) -> str: FILE: src/fastmcp/contrib/component_manager/component_manager.py function set_up_component_manager (line 17) | def set_up_component_manager( function _build_routes (line 50) | def _build_routes(server: FastMCP, base_path: str) -> list[Route]: function _make_endpoint (line 91) | def _make_endpoint(server: FastMCP, component_type: str, action: str): FILE: src/fastmcp/contrib/component_manager/example.py function get_greeting (line 51) | def get_greeting() -> str: function get_info (line 57) | def get_info() -> str: FILE: src/fastmcp/contrib/mcp_mixin/example.py class Sample (line 16) | class Sample(MCPMixin): method __init__ (line 17) | def __init__(self, name): method first_tool (line 21) | def first_tool(self): method first_resource (line 26) | def first_resource(self): method first_prompt (line 31) | def first_prompt(self): function list_components (line 43) | async def list_components() -> None: FILE: src/fastmcp/contrib/mcp_mixin/mcp_mixin.py function mcp_tool (line 45) | def mcp_tool( function mcp_resource (line 94) | def mcp_resource( function mcp_prompt (line 140) | def mcp_prompt( class MCPMixin (line 180) | class MCPMixin: method _get_methods_to_register (line 190) | def _get_methods_to_register(self, registration_type: str): method register_tools (line 202) | def register_tools( method register_resources (line 232) | def register_resources( method register_prompts (line 267) | def register_prompts( method register_all (line 297) | def register_all( FILE: src/fastmcp/decorators.py function resolve_task_config (line 17) | def resolve_task_config(task: bool | TaskConfig | None) -> bool | TaskCo... class HasFastMCPMeta (line 23) | class HasFastMCPMeta(Protocol): function get_fastmcp_meta (line 29) | def get_fastmcp_meta(fn: Any) -> Any | None: FILE: src/fastmcp/exceptions.py class FastMCPError (line 6) | class FastMCPError(Exception): class ValidationError (line 10) | class ValidationError(FastMCPError): class ResourceError (line 14) | class ResourceError(FastMCPError): class ToolError (line 18) | class ToolError(FastMCPError): class PromptError (line 22) | class PromptError(FastMCPError): class InvalidSignature (line 26) | class InvalidSignature(Exception): class ClientError (line 30) | class ClientError(Exception): class NotFoundError (line 34) | class NotFoundError(Exception): class DisabledError (line 38) | class DisabledError(Exception): class AuthorizationError (line 42) | class AuthorizationError(FastMCPError): FILE: src/fastmcp/experimental/transforms/code_mode.py function _ensure_async (line 40) | def _ensure_async(fn: Callable[..., Any]) -> Callable[..., Any]: function _unwrap_tool_result (line 50) | def _unwrap_tool_result(result: ToolResult) -> dict[str, Any] | str: class SandboxProvider (line 73) | class SandboxProvider(Protocol): method run (line 82) | async def run( class MontySandboxProvider (line 91) | class MontySandboxProvider: method __init__ (line 102) | def __init__( method run (line 109) | async def run( function _render_tools (line 156) | def _render_tools(tools: Sequence[Tool], detail: ToolDetailLevel) -> str: class Search (line 179) | class Search: method __init__ (line 194) | def __init__( method __call__ (line 212) | def __call__(self, get_catalog: GetToolCatalog) -> Tool: class GetSchemas (line 261) | class GetSchemas: method __init__ (line 273) | def __init__( method __call__ (line 282) | def __call__(self, get_catalog: GetToolCatalog) -> Tool: class GetTags (line 322) | class GetTags: method __init__ (line 335) | def __init__( method __call__ (line 344) | def __call__(self, get_catalog: GetToolCatalog) -> Tool: class ListTools (line 389) | class ListTools: method __init__ (line 400) | def __init__( method __call__ (line 409) | def __call__(self, get_catalog: GetToolCatalog) -> Tool: function _default_discovery_tools (line 434) | def _default_discovery_tools() -> list[DiscoveryToolFactory]: class CodeMode (line 438) | class CodeMode(CatalogTransform): method __init__ (line 451) | def __init__( method _build_discovery_tools (line 472) | def _build_discovery_tools(self) -> list[Tool]: method transform_tools (line 488) | async def transform_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 491) | async def get_tool( method _build_execute_description (line 505) | def _build_execute_description(self) -> str: method _find_tool (line 516) | def _find_tool(name: str, tools: Sequence[Tool]) -> Tool | None: method _get_execute_tool (line 523) | def _get_execute_tool(self) -> Tool: method _make_execute_tool (line 528) | def _make_execute_tool(self) -> Tool: FILE: src/fastmcp/mcp_config.py function infer_transport_type_from_url (line 56) | def infer_transport_type_from_url( class _TransformingMCPServerMixin (line 76) | class _TransformingMCPServerMixin(FastMCPBaseModel): method _require_at_least_one_transform_field (line 94) | def _require_at_least_one_transform_field( method _to_server_and_underlying_transport (line 113) | def _to_server_and_underlying_transport( method to_transport (line 148) | def to_transport(self) -> ClientTransport: class StdioMCPServer (line 155) | class StdioMCPServer(BaseModel): method to_transport (line 188) | def to_transport(self) -> StdioTransport: class TransformingStdioMCPServer (line 200) | class TransformingStdioMCPServer(_TransformingMCPServerMixin, StdioMCPSe... class RemoteMCPServer (line 204) | class RemoteMCPServer(BaseModel): method to_transport (line 240) | def to_transport(self) -> StreamableHttpTransport | SSETransport: class TransformingRemoteMCPServer (line 265) | class TransformingRemoteMCPServer(_TransformingMCPServerMixin, RemoteMCP... class MCPConfig (line 276) | class MCPConfig(BaseModel): method wrap_servers_at_root (line 290) | def wrap_servers_at_root(cls, values: dict[str, Any]) -> dict[str, Any]: method add_server (line 303) | def add_server(self, name: str, server: MCPServerTypes) -> None: method from_dict (line 308) | def from_dict(cls, config: dict[str, Any]) -> Self: method to_dict (line 312) | def to_dict(self) -> dict[str, Any]: method write_to_file (line 316) | def write_to_file(self, file_path: Path) -> None: method from_file (line 322) | def from_file(cls, file_path: Path) -> Self: class CanonicalMCPConfig (line 330) | class CanonicalMCPConfig(MCPConfig): method add_server (line 340) | def add_server(self, name: str, server: CanonicalMCPServerTypes) -> None: function update_config_file (line 345) | def update_config_file( FILE: src/fastmcp/prompts/base.py class Message (line 43) | class Message(pydantic.BaseModel): method __init__ (line 68) | def __init__( method to_mcp_prompt_message (line 98) | def to_mcp_prompt_message(self) -> PromptMessage: class PromptArgument (line 103) | class PromptArgument(FastMCPBaseModel): class PromptResult (line 115) | class PromptResult(pydantic.BaseModel): method __init__ (line 151) | def __init__( method _normalize_messages (line 168) | def _normalize_messages( method to_mcp_prompt_result (line 187) | def to_mcp_prompt_result(self) -> GetPromptResult: class Prompt (line 197) | class Prompt(FastMCPComponent): method to_mcp_prompt (line 209) | def to_mcp_prompt( method from_function (line 235) | def from_function( method render (line 271) | async def render( method convert_result (line 284) | def convert_result(self, raw_value: Any) -> PromptResult: method _render (line 321) | async def _render( method _render (line 328) | async def _render( method _render (line 334) | async def _render( method register_with_docket (line 374) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 380) | async def add_to_docket( # type: ignore[override] method get_span_attributes (line 403) | def get_span_attributes(self) -> dict[str, Any]: function __getattr__ (line 418) | def __getattr__(name: str) -> Any: FILE: src/fastmcp/prompts/function_prompt.py class DecoratedPrompt (line 53) | class DecoratedPrompt(Protocol): method __call__ (line 58) | def __call__(self, *args: Any, **kwargs: Any) -> Any: ... class PromptMeta (line 62) | class PromptMeta: class FunctionPrompt (line 78) | class FunctionPrompt(Prompt): method from_function (line 84) | def from_function( method _convert_string_arguments (line 241) | def _convert_string_arguments(self, kwargs: dict[str, Any]) -> dict[st... method render (line 285) | async def render( method register_with_docket (line 335) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 345) | async def add_to_docket( function prompt (line 372) | def prompt(fn: F) -> F: ... function prompt (line 374) | def prompt( function prompt (line 387) | def prompt( function prompt (line 402) | def prompt( FILE: src/fastmcp/resources/base.py class ResourceContent (line 37) | class ResourceContent(pydantic.BaseModel): method __init__ (line 63) | def __init__( method to_mcp_resource_contents (line 92) | def to_mcp_resource_contents( class ResourceResult (line 119) | class ResourceResult(pydantic.BaseModel): method __init__ (line 158) | def __init__( method _normalize_contents (line 173) | def _normalize_contents( method to_mcp_result (line 194) | def to_mcp_result(self, uri: AnyUrl | str) -> mcp.types.ReadResourceRe... class Resource (line 210) | class Resource(FastMCPComponent): method from_function (line 235) | def from_function( method set_default_mime_type (line 274) | def set_default_mime_type(cls, mime_type: str | None) -> str: method set_default_name (line 281) | def set_default_name(self) -> Self: method read (line 291) | async def read( method convert_result (line 303) | def convert_result(self, raw_value: Any) -> ResourceResult: method _read (line 335) | async def _read(self, task_meta: None = None) -> ResourceResult: ... method _read (line 338) | async def _read(self, task_meta: TaskMeta) -> mcp.types.CreateTaskResu... method _read (line 340) | async def _read( method to_mcp_resource (line 374) | def to_mcp_resource( method __repr__ (line 393) | def __repr__(self) -> str: method key (line 397) | def key(self) -> str: method register_with_docket (line 402) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 408) | async def add_to_docket( # type: ignore[override] method get_span_attributes (line 429) | def get_span_attributes(self) -> dict[str, Any]: function __getattr__ (line 443) | def __getattr__(name: str) -> Any: FILE: src/fastmcp/resources/function_resource.py class DecoratedResource (line 40) | class DecoratedResource(Protocol): method __call__ (line 45) | def __call__(self, *args: Any, **kwargs: Any) -> Any: ... class ResourceMeta (line 49) | class ResourceMeta: class FunctionResource (line 68) | class FunctionResource(Resource): method from_function (line 84) | def from_function( method read (line 208) | async def read( method register_with_docket (line 229) | def register_with_docket(self, docket: Docket) -> None: function resource (line 240) | def resource( FILE: src/fastmcp/resources/template.py function extract_query_params (line 39) | def extract_query_params(uri_template: str) -> set[str]: function build_regex (line 47) | def build_regex(template: str) -> re.Pattern[str] | None: function match_uri_template (line 79) | def match_uri_template(uri: str, uri_template: str) -> dict[str, str] | ... class ResourceTemplate (line 112) | class ResourceTemplate(FastMCPComponent): method __repr__ (line 135) | def __repr__(self) -> str: method from_function (line 139) | def from_function( method set_default_mime_type (line 172) | def set_default_mime_type(cls, mime_type: str | None) -> str: method matches (line 178) | def matches(self, uri: str) -> dict[str, Any] | None: method read (line 182) | async def read(self, arguments: dict[str, Any]) -> str | bytes | Resou... method convert_result (line 188) | def convert_result(self, raw_value: Any) -> ResourceResult: method _read (line 205) | async def _read( method _read (line 210) | async def _read( method _read (line 214) | async def _read( method create_resource (line 252) | async def create_resource(self, uri: str, params: dict[str, Any]) -> R... method to_mcp_template (line 263) | def to_mcp_template( method from_mcp_template (line 283) | def from_mcp_template(cls, mcp_template: SDKResourceTemplate) -> Resou... method key (line 296) | def key(self) -> str: method register_with_docket (line 301) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 307) | async def add_to_docket( # type: ignore[override] method get_span_attributes (line 330) | def get_span_attributes(self) -> dict[str, Any]: class FunctionResourceTemplate (line 337) | class FunctionResourceTemplate(ResourceTemplate): method _read (line 343) | async def _read( method _read (line 348) | async def _read( method _read (line 352) | async def _read( method create_resource (line 383) | async def create_resource(self, uri: str, params: dict[str, Any]) -> R... method read (line 402) | async def read(self, arguments: dict[str, Any]) -> str | bytes | Resou... method register_with_docket (line 441) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 451) | async def add_to_docket( method from_function (line 477) | def from_function( FILE: src/fastmcp/resources/types.py class TextResource (line 21) | class TextResource(Resource): method read (line 26) | async def read(self) -> ResourceResult: class BinaryResource (line 37) | class BinaryResource(Resource): method read (line 42) | async def read(self) -> ResourceResult: class FileResource (line 53) | class FileResource(Resource): method _async_path (line 70) | def _async_path(self) -> AsyncPath: method validate_absolute_path (line 75) | def validate_absolute_path(cls, path: Path) -> Path: method set_binary_from_mime_type (line 83) | def set_binary_from_mime_type(cls, is_binary: bool, info: ValidationIn... method read (line 91) | async def read(self) -> ResourceResult: class HttpResource (line 105) | class HttpResource(Resource): method read (line 114) | async def read(self) -> ResourceResult: class DirectoryResource (line 126) | class DirectoryResource(Resource): method _async_path (line 141) | def _async_path(self) -> AsyncPath: method validate_absolute_path (line 146) | def validate_absolute_path(cls, path: Path) -> Path: method list_files (line 152) | async def list_files(self) -> list[Path]: method read (line 168) | async def read(self) -> ResourceResult: FILE: src/fastmcp/server/__init__.py function __getattr__ (line 7) | def __getattr__(name: str) -> object: FILE: src/fastmcp/server/app.py function get_global_tool (line 61) | def get_global_tool(name: str) -> Tool | None: function _make_global_key (line 71) | def _make_global_key(name: str) -> str: function _register_global_key (line 76) | def _register_global_key(tool: Tool, fn: Any, global_key: str) -> None: function _stamp_global_key (line 82) | def _stamp_global_key(tool: Tool, global_key: str) -> None: function _resolve_tool_ref (line 96) | def _resolve_tool_ref(fn: Any) -> Any: function _dispatch_decorator (line 132) | def _dispatch_decorator( class FastMCPApp (line 167) | class FastMCPApp(Provider): method __init__ (line 176) | def __init__(self, name: str) -> None: method __repr__ (line 181) | def __repr__(self) -> str: method tool (line 189) | def tool( method tool (line 201) | def tool( method tool (line 212) | def tool( method ui (line 274) | def ui( method ui (line 289) | def ui( method ui (line 303) | def ui( method add_tool (line 389) | def add_tool( method _list_tools (line 428) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 431) | async def _get_tool(self, name: str, version: Any = None) -> Tool | None: method _list_resources (line 434) | async def _list_resources(self) -> Sequence[Any]: method _get_resource (line 437) | async def _get_resource(self, uri: str, version: Any = None) -> Any | ... method _list_resource_templates (line 440) | async def _list_resource_templates(self) -> Sequence[Any]: method _get_resource_template (line 443) | async def _get_resource_template(self, uri: str, version: Any = None) ... method _list_prompts (line 446) | async def _list_prompts(self) -> Sequence[Any]: method _get_prompt (line 449) | async def _get_prompt(self, name: str, version: Any = None) -> Any | N... method lifespan (line 453) | async def lifespan(self) -> AsyncIterator[None]: method run (line 461) | def run( FILE: src/fastmcp/server/apps.py class ResourceCSP (line 18) | class ResourceCSP(BaseModel): class ResourcePermissions (line 50) | class ResourcePermissions(BaseModel): class AppConfig (line 77) | class AppConfig(BaseModel): function app_config_to_meta_dict (line 115) | def app_config_to_meta_dict(app: AppConfig | dict[str, Any]) -> dict[str... function resolve_ui_mime_type (line 122) | def resolve_ui_mime_type(uri: str, explicit_mime_type: str | None) -> st... FILE: src/fastmcp/server/auth/__init__.py function __getattr__ (line 34) | def __getattr__(name: str) -> object: FILE: src/fastmcp/server/auth/auth.py class AccessToken (line 54) | class AccessToken(_SDKAccessToken): class TokenHandler (line 60) | class TokenHandler(_SDKTokenHandler): method handle (line 76) | async def handle(self, request: Any): class PrivateKeyJWTClientAuthenticator (line 126) | class PrivateKeyJWTClientAuthenticator(_SDKClientAuthenticator): method __init__ (line 139) | def __init__( method authenticate_request (line 156) | async def authenticate_request( class AuthProvider (line 207) | class AuthProvider(TokenVerifierProtocol): method __init__ (line 216) | def __init__( method verify_token (line 236) | async def verify_token(self, token: str) -> AccessToken | None: method set_mcp_path (line 249) | def set_mcp_path(self, mcp_path: str | None) -> None: method get_routes (line 263) | def get_routes( method get_well_known_routes (line 286) | def get_well_known_routes( method get_middleware (line 318) | def get_middleware(self) -> list: method _get_resource_url (line 333) | def _get_resource_url(self, path: str | None = None) -> AnyHttpUrl | N... class TokenVerifier (line 352) | class TokenVerifier(AuthProvider): method __init__ (line 359) | def __init__( method scopes_supported (line 374) | def scopes_supported(self) -> list[str]: method verify_token (line 384) | async def verify_token(self, token: str) -> AccessToken | None: class RemoteAuthProvider (line 389) | class RemoteAuthProvider(AuthProvider): method __init__ (line 404) | def __init__( method verify_token (line 436) | async def verify_token(self, token: str) -> AccessToken | None: method get_routes (line 440) | def get_routes( class MultiAuth (line 472) | class MultiAuth(AuthProvider): method __init__ (line 495) | def __init__( method verify_token (line 537) | async def verify_token(self, token: str) -> AccessToken | None: method set_mcp_path (line 558) | def set_mcp_path(self, mcp_path: str | None) -> None: method get_routes (line 566) | def get_routes(self, mcp_path: str | None = None) -> list[Route]: method get_well_known_routes (line 572) | def get_well_known_routes(self, mcp_path: str | None = None) -> list[R... class OAuthProvider (line 583) | class OAuthProvider( method __init__ (line 593) | def __init__( method verify_token (line 646) | async def verify_token(self, token: str) -> AccessToken | None: method get_routes (line 661) | def get_routes( method get_well_known_routes (line 740) | def get_well_known_routes( FILE: src/fastmcp/server/auth/authorization.py class AuthContext (line 48) | class AuthContext: method tool (line 64) | def tool(self) -> Tool | None: function require_scopes (line 78) | def require_scopes(*scopes: str) -> AuthCheck: function restrict_tag (line 106) | def restrict_tag(tag: str, *, scopes: list[str]) -> AuthCheck: function run_auth_checks (line 134) | async def run_auth_checks( FILE: src/fastmcp/server/auth/cimd.py class CIMDDocument (line 45) | class CIMDDocument(BaseModel): method validate_auth_method (line 125) | def validate_auth_method(cls, v: str) -> str: method validate_redirect_uris (line 137) | def validate_redirect_uris(cls, v: list[str]) -> list[str]: class CIMDValidationError (line 154) | class CIMDValidationError(Exception): class CIMDFetchError (line 158) | class CIMDFetchError(Exception): class _CIMDCacheEntry (line 163) | class _CIMDCacheEntry: class _CIMDCachePolicy (line 175) | class _CIMDCachePolicy: class CIMDFetcher (line 186) | class CIMDFetcher: method __init__ (line 200) | def __init__( method _parse_cache_policy (line 212) | def _parse_cache_policy( method _has_freshness_headers (line 265) | def _has_freshness_headers(self, headers: Mapping[str, str]) -> bool: method is_cimd_client_id (line 270) | def is_cimd_client_id(self, client_id: str) -> bool: method fetch (line 287) | async def fetch(self, client_id_url: str) -> CIMDDocument: method validate_redirect_uri (line 422) | def validate_redirect_uri(self, doc: CIMDDocument, redirect_uri: str) ... class CIMDAssertionValidator (line 452) | class CIMDAssertionValidator: method __init__ (line 467) | def __init__(self): method _cleanup_expired_jtis (line 479) | def _cleanup_expired_jtis(self) -> None: method _maybe_cleanup (line 488) | def _maybe_cleanup(self) -> None: method validate_assertion (line 495) | async def validate_assertion( method _extract_public_key_from_jwks (line 621) | def _extract_public_key_from_jwks(self, token: str, jwks: dict) -> str: class CIMDClientManager (line 677) | class CIMDClientManager: method __init__ (line 690) | def __init__( method is_cimd_client_id (line 711) | def is_cimd_client_id(self, client_id: str) -> bool: method get_client (line 722) | async def get_client(self, client_id_url: str): method validate_private_key_jwt (line 771) | async def validate_private_key_jwt( FILE: src/fastmcp/server/auth/handlers/authorize.py function create_unregistered_client_html (line 41) | def create_unregistered_client_html( class AuthorizationHandler (line 161) | class AuthorizationHandler(SDKAuthorizationHandler): method __init__ (line 176) | def __init__( method handle (line 196) | async def handle(self, request: Request) -> Response: method _create_enhanced_error_response (line 245) | async def _create_enhanced_error_response( FILE: src/fastmcp/server/auth/jwt_issuer.py function derive_jwt_key (line 30) | def derive_jwt_key(*, high_entropy_material: str, salt: str) -> bytes: function derive_jwt_key (line 35) | def derive_jwt_key(*, low_entropy_material: str, salt: str) -> bytes: function derive_jwt_key (line 39) | def derive_jwt_key( class JWTIssuer (line 79) | class JWTIssuer: method __init__ (line 87) | def __init__( method issue_access_token (line 105) | def issue_access_token( method issue_refresh_token (line 157) | def issue_refresh_token( method verify_token (line 210) | def verify_token( FILE: src/fastmcp/server/auth/middleware.py class RequireAuthMiddleware (line 22) | class RequireAuthMiddleware(SDKRequireAuthMiddleware): method _send_auth_error (line 30) | async def _send_auth_error( FILE: src/fastmcp/server/auth/oauth_proxy/consent.py class ConsentMixin (line 35) | class ConsentMixin: method _normalize_uri (line 45) | def _normalize_uri(self, uri: str) -> str: method _make_client_key (line 54) | def _make_client_key(self, client_id: str, redirect_uri: str | AnyUrl)... method _cookie_name (line 59) | def _cookie_name(self: OAuthProxy, base_name: str) -> str: method _cookie_signing_key (line 65) | def _cookie_signing_key(self: OAuthProxy) -> bytes: method _sign_cookie (line 76) | def _sign_cookie(self: OAuthProxy, payload: str) -> str: method _verify_cookie (line 86) | def _verify_cookie(self: OAuthProxy, signed_value: str) -> str | None: method _decode_list_cookie (line 109) | def _decode_list_cookie( method _encode_list_cookie (line 138) | def _encode_list_cookie(self: OAuthProxy, values: list[str]) -> str: method _set_list_cookie (line 147) | def _set_list_cookie( method _read_consent_bindings (line 165) | def _read_consent_bindings(self: OAuthProxy, request: Request) -> dict... method _write_consent_bindings (line 190) | def _write_consent_bindings( method _set_consent_binding_cookie (line 221) | def _set_consent_binding_cookie( method _clear_consent_binding_cookie (line 238) | def _clear_consent_binding_cookie( method _verify_consent_binding_cookie (line 249) | def _verify_consent_binding_cookie( method _build_upstream_authorize_url (line 262) | def _build_upstream_authorize_url( method _handle_consent (line 298) | async def _handle_consent( method _show_consent_page (line 306) | async def _show_consent_page( method _submit_consent (line 415) | async def _submit_consent( FILE: src/fastmcp/server/auth/oauth_proxy/models.py class OAuthTransaction (line 40) | class OAuthTransaction(BaseModel): class ClientCode (line 62) | class ClientCode(BaseModel): class UpstreamTokenSet (line 80) | class UpstreamTokenSet(BaseModel): class JTIMapping (line 102) | class JTIMapping(BaseModel): class RefreshTokenMetadata (line 114) | class RefreshTokenMetadata(BaseModel): function _hash_token (line 127) | def _hash_token(token: str) -> str: class ProxyDCRClient (line 136) | class ProxyDCRClient(OAuthClientInformationFull): method validate_redirect_uri (line 167) | def validate_redirect_uri(self, redirect_uri: AnyUrl | None) -> AnyUrl: FILE: src/fastmcp/server/auth/oauth_proxy/proxy.py function _normalize_resource_url (line 95) | def _normalize_resource_url(url: str) -> str: function _server_url_has_query (line 114) | def _server_url_has_query(url: str) -> bool: class OAuthProxy (line 119) | class OAuthProxy(OAuthProvider, ConsentMixin): method __init__ (line 229) | def __init__( method set_mcp_path (line 558) | def set_mcp_path(self, mcp_path: str | None) -> None: method jwt_issuer (line 582) | def jwt_issuer(self) -> JWTIssuer: method _create_upstream_oauth_client (line 599) | def _create_upstream_oauth_client(self) -> AsyncOAuth2Client: method _generate_pkce_pair (line 622) | def _generate_pkce_pair(self) -> tuple[str, str]: method get_client (line 642) | async def get_client(self, client_id: str) -> OAuthClientInformationFu... method register_client (line 686) | async def register_client(self, client_info: OAuthClientInformationFul... method authorize (line 739) | async def authorize( method load_authorization_code (line 858) | async def load_authorization_code( method exchange_authorization_code (line 906) | async def exchange_authorization_code( method _prepare_scopes_for_token_exchange (line 1106) | def _prepare_scopes_for_token_exchange(self, scopes: list[str]) -> lis... method _prepare_scopes_for_upstream_refresh (line 1120) | def _prepare_scopes_for_upstream_refresh(self, scopes: list[str]) -> l... method _extract_upstream_claims (line 1137) | async def _extract_upstream_claims( method load_refresh_token (line 1164) | async def load_refresh_token( method exchange_refresh_token (line 1193) | async def exchange_refresh_token( method _get_verification_token (line 1433) | def _get_verification_token( method _uses_alternate_verification (line 1444) | def _uses_alternate_verification(self) -> bool: method load_access_token (line 1460) | async def load_access_token(self, token: str) -> AccessToken | None: ... method revoke_token (line 1539) | async def revoke_token(self, token: AccessToken | RefreshToken) -> None: method get_routes (line 1585) | def get_routes( method _handle_idp_callback (line 1717) | async def _handle_idp_callback( FILE: src/fastmcp/server/auth/oauth_proxy/ui.py function create_consent_html (line 20) | def create_consent_html( function create_error_html (line 215) | def create_error_html( FILE: src/fastmcp/server/auth/oidc_proxy.py class OIDCConfiguration (line 29) | class OIDCConfiguration(BaseModel): method _enforce_strict (line 111) | def _enforce_strict(self) -> Self: method get_oidc_configuration (line 144) | def get_oidc_configuration( class OIDCProxy (line 174) | class OIDCProxy(OAuthProxy): method __init__ (line 199) | def __init__( method _get_verification_token (line 423) | def _get_verification_token( method _uses_alternate_verification (line 441) | def _uses_alternate_verification(self) -> bool: method get_oidc_configuration (line 450) | def get_oidc_configuration( method get_token_verifier (line 467) | def get_token_verifier( FILE: src/fastmcp/server/auth/providers/auth0.py class Auth0Provider (line 36) | class Auth0Provider(OIDCProxy): method __init__ (line 60) | def __init__( FILE: src/fastmcp/server/auth/providers/aws.py class AWSCognitoTokenVerifier (line 40) | class AWSCognitoTokenVerifier(JWTVerifier): method verify_token (line 43) | async def verify_token(self, token: str) -> AccessToken | None: class AWSCognitoProvider (line 67) | class AWSCognitoProvider(OIDCProxy): method __init__ (line 98) | def __init__( method get_token_verifier (line 178) | def get_token_verifier( FILE: src/fastmcp/server/auth/providers/azure.py class AzureProvider (line 35) | class AzureProvider(OAuthProxy): method __init__ (line 95) | def __init__( method authorize (line 259) | async def authorize( method _prefix_scopes_for_azure (line 296) | def _prefix_scopes_for_azure(self, scopes: list[str]) -> list[str]: method _build_upstream_authorize_url (line 331) | def _build_upstream_authorize_url( method _prepare_scopes_for_token_exchange (line 356) | def _prepare_scopes_for_token_exchange(self, scopes: list[str]) -> lis... method _prepare_scopes_for_upstream_refresh (line 382) | def _prepare_scopes_for_upstream_refresh(self, scopes: list[str]) -> l... method _extract_upstream_claims (line 413) | async def _extract_upstream_claims( method get_obo_credential (line 485) | async def get_obo_credential(self, user_assertion: str) -> OnBehalfOfC... method close_obo_credentials (line 536) | async def close_obo_credentials(self) -> None: class AzureJWTVerifier (line 547) | class AzureJWTVerifier(JWTVerifier): method __init__ (line 580) | def __init__( method scopes_supported (line 627) | def scopes_supported(self) -> list[str]: function _require_azure_identity (line 651) | def _require_azure_identity(feature: str) -> None: class _EntraOBOToken (line 662) | class _EntraOBOToken(Dependency[str]): method __init__ (line 671) | def __init__(self, scopes: list[str]): method __aenter__ (line 674) | async def __aenter__(self) -> str: function EntraOBOToken (line 700) | def EntraOBOToken(scopes: list[str]) -> str: FILE: src/fastmcp/server/auth/providers/debug.py class DebugTokenVerifier (line 40) | class DebugTokenVerifier(TokenVerifier): method __init__ (line 55) | def __init__( method verify_token (line 77) | async def verify_token(self, token: str) -> AccessToken | None: FILE: src/fastmcp/server/auth/providers/descope.py class DescopeProvider (line 25) | class DescopeProvider(RemoteAuthProvider): method __init__ (line 63) | def __init__( method get_routes (line 165) | def get_routes( FILE: src/fastmcp/server/auth/providers/discord.py class DiscordTokenVerifier (line 42) | class DiscordTokenVerifier(TokenVerifier): method __init__ (line 49) | def __init__( method verify_token (line 72) | async def verify_token(self, token: str) -> AccessToken | None: class DiscordProvider (line 165) | class DiscordProvider(OAuthProxy): method __init__ (line 193) | def __init__( FILE: src/fastmcp/server/auth/providers/github.py class GitHubTokenVerifier (line 41) | class GitHubTokenVerifier(TokenVerifier): method __init__ (line 52) | def __init__( method verify_token (line 82) | async def verify_token(self, token: str) -> AccessToken | None: class GitHubProvider (line 178) | class GitHubProvider(OAuthProxy): method __init__ (line 206) | def __init__( FILE: src/fastmcp/server/auth/providers/google.py function _normalize_google_scope (line 47) | def _normalize_google_scope(scope: str) -> str: class GoogleTokenVerifier (line 57) | class GoogleTokenVerifier(TokenVerifier): method __init__ (line 64) | def __init__( method verify_token (line 89) | async def verify_token(self, token: str) -> AccessToken | None: class GoogleProvider (line 190) | class GoogleProvider(OAuthProxy): method __init__ (line 218) | def __init__( FILE: src/fastmcp/server/auth/providers/in_memory.py class InMemoryOAuthProvider (line 31) | class InMemoryOAuthProvider(OAuthProvider): method __init__ (line 37) | def __init__( method get_client (line 65) | async def get_client(self, client_id: str) -> OAuthClientInformationFu... method register_client (line 68) | async def register_client(self, client_info: OAuthClientInformationFul... method authorize (line 92) | async def authorize( method load_authorization_code (line 149) | async def load_authorization_code( method exchange_authorization_code (line 162) | async def exchange_authorization_code( method load_refresh_token (line 215) | async def load_refresh_token( method exchange_refresh_token (line 230) | async def exchange_refresh_token( method load_access_token (line 287) | async def load_access_token(self, token: str) -> AccessToken | None: ... method verify_token (line 298) | async def verify_token(self, token: str) -> AccessToken | None: # typ... method _revoke_internal (line 313) | def _revoke_internal( method revoke_token (line 355) | async def revoke_token( FILE: src/fastmcp/server/auth/providers/introspection.py class IntrospectionTokenVerifier (line 45) | class IntrospectionTokenVerifier(TokenVerifier): method __init__ (line 80) | def __init__( method _create_basic_auth_header (line 150) | def _create_basic_auth_header(self) -> str: method _extract_scopes (line 156) | def _extract_scopes(self, introspection_response: dict[str, Any]) -> l... method verify_token (line 179) | async def verify_token(self, token: str) -> AccessToken | None: FILE: src/fastmcp/server/auth/providers/jwt.py class JWKData (line 27) | class JWKData(TypedDict, total=False): class JWKSData (line 40) | class JWKSData(TypedDict): class RSAKeyPair (line 47) | class RSAKeyPair: method generate (line 54) | def generate(cls) -> RSAKeyPair: method create_token (line 89) | def create_token( function _looks_like_pem_public_key (line 142) | def _looks_like_pem_public_key(key: str | bytes) -> bool: class JWTVerifier (line 156) | class JWTVerifier(TokenVerifier): method __init__ (line 175) | def __init__( method _get_verification_key (line 279) | async def _get_verification_key(self, token: str) -> str | bytes: method _get_jwks_key (line 293) | async def _get_jwks_key(self, kid: str | None) -> str: method _fetch_jwks (line 357) | async def _fetch_jwks(self) -> dict[str, Any]: method _extract_scopes (line 380) | def _extract_scopes(self, claims: dict[str, Any]) -> list[str]: method load_access_token (line 397) | async def load_access_token(self, token: str) -> AccessToken | None: method verify_token (line 515) | async def verify_token(self, token: str) -> AccessToken | None: class StaticTokenVerifier (line 531) | class StaticTokenVerifier(TokenVerifier): method __init__ (line 549) | def __init__( method verify_token (line 565) | async def verify_token(self, token: str) -> AccessToken | None: FILE: src/fastmcp/server/auth/providers/oci.py class OCIProvider (line 92) | class OCIProvider(OIDCProxy): method __init__ (line 119) | def __init__( FILE: src/fastmcp/server/auth/providers/propelauth.py class PropelAuthTokenIntrospectionOverrides (line 36) | class PropelAuthTokenIntrospectionOverrides(TypedDict, total=False): class PropelAuthProvider (line 43) | class PropelAuthProvider(RemoteAuthProvider): method __init__ (line 75) | def __init__( method get_routes (line 141) | def get_routes( method verify_token (line 185) | async def verify_token(self, token: str) -> AccessToken | None: method _create_token_verifier (line 202) | def _create_token_verifier( FILE: src/fastmcp/server/auth/providers/scalekit.py class ScalekitProvider (line 23) | class ScalekitProvider(RemoteAuthProvider): method __init__ (line 63) | def __init__( method get_routes (line 156) | def get_routes( FILE: src/fastmcp/server/auth/providers/supabase.py class SupabaseProvider (line 25) | class SupabaseProvider(RemoteAuthProvider): method __init__ (line 71) | def __init__( method get_routes (line 137) | def get_routes( FILE: src/fastmcp/server/auth/providers/workos.py class WorkOSTokenVerifier (line 31) | class WorkOSTokenVerifier(TokenVerifier): method __init__ (line 38) | def __init__( method verify_token (line 61) | async def verify_token(self, token: str) -> AccessToken | None: class WorkOSProvider (line 126) | class WorkOSProvider(OAuthProxy): method __init__ (line 160) | def __init__( class AuthKitProvider (line 249) | class AuthKitProvider(RemoteAuthProvider): method __init__ (line 285) | def __init__( method get_routes (line 347) | def get_routes( FILE: src/fastmcp/server/auth/redirect_validation.py function _parse_host_port (line 13) | def _parse_host_port(netloc: str) -> tuple[str | None, str | None]: function _match_host (line 45) | def _match_host(uri_host: str | None, pattern_host: str | None) -> bool: function _match_port (line 71) | def _match_port( function _match_path (line 98) | def _match_path(uri_path: str, pattern_path: str) -> bool: function matches_allowed_pattern (line 121) | def matches_allowed_pattern(uri: str, pattern: str) -> bool: function validate_redirect_uri (line 175) | def validate_redirect_uri( FILE: src/fastmcp/server/auth/ssrf.py function format_ip_for_url (line 26) | def format_ip_for_url(ip_str: str) -> str: class SSRFError (line 47) | class SSRFError(Exception): class SSRFFetchError (line 51) | class SSRFFetchError(Exception): function is_ip_allowed (line 55) | def is_ip_allowed(ip_str: str) -> bool: function resolve_hostname (line 98) | async def resolve_hostname(hostname: str, port: int = 443) -> list[str]: class ValidatedURL (line 128) | class ValidatedURL: class SSRFFetchResponse (line 139) | class SSRFFetchResponse: function validate_url (line 147) | async def validate_url(url: str, require_path: bool = False) -> Validate... function ssrf_safe_fetch (line 196) | async def ssrf_safe_fetch( function ssrf_safe_fetch_response (line 239) | async def ssrf_safe_fetch_response( FILE: src/fastmcp/server/context.py function set_transport (line 88) | def set_transport( function reset_transport (line 95) | def reset_transport(token: Token[TransportType | None]) -> None: class LogData (line 101) | class LogData: function set_context (line 125) | def set_context(context: Context) -> Generator[Context, None, None]: class Context (line 134) | class Context: method __init__ (line 189) | def __init__( method is_background_task (line 207) | def is_background_task(self) -> bool: method task_id (line 226) | def task_id(self) -> str | None: method origin_request_id (line 234) | def origin_request_id(self) -> str | None: method fastmcp (line 246) | def fastmcp(self) -> FastMCP: method __aenter__ (line 253) | async def __aenter__(self) -> Context: method __aexit__ (line 292) | async def __aexit__(self, exc_type, exc_val, exc_tb) -> None: method request_context (line 321) | def request_context(self) -> RequestContext[ServerSession, Any, Reques... method lifespan_context (line 350) | def lifespan_context(self) -> dict[str, Any]: method report_progress (line 381) | async def report_progress( method _paginate_list (line 443) | async def _paginate_list( method list_resources (line 474) | async def list_resources(self) -> list[SDKResource]: method list_prompts (line 490) | async def list_prompts(self) -> list[SDKPrompt]: method get_prompt (line 506) | async def get_prompt( method read_resource (line 525) | async def read_resource(self, uri: str | AnyUrl) -> ResourceResult: method log (line 541) | async def log( method transport (line 571) | def transport(self) -> TransportType | None: method client_supports_extension (line 579) | def client_supports_extension(self, extension_id: str) -> bool: method client_id (line 607) | def client_id(self) -> str | None: method request_id (line 616) | def request_id(self) -> str: method session_id (line 629) | def session_id(self) -> str: method session (line 686) | def session(self) -> ServerSession: method debug (line 712) | async def debug( method info (line 728) | async def info( method warning (line 744) | async def warning( method error (line 760) | async def error( method list_roots (line 776) | async def list_roots(self) -> list[Root]: method send_notification (line 781) | async def send_notification( method close_sse_stream (line 791) | async def close_sse_stream(self) -> None: method sample_step (line 830) | async def sample_step( method sample (line 909) | async def sample( method sample (line 925) | async def sample( method sample (line 940) | async def sample( method elicit (line 1015) | async def elicit( method elicit (line 1027) | async def elicit( method elicit (line 1037) | async def elicit( method elicit (line 1047) | async def elicit( method elicit (line 1057) | async def elicit( method elicit (line 1069) | async def elicit( method elicit (line 1081) | async def elicit( method _elicit_for_task (line 1151) | async def _elicit_for_task( method _make_state_key (line 1191) | def _make_state_key(self, key: str) -> str: method set_state (line 1195) | async def set_state( method get_state (line 1237) | async def get_state(self, key: str) -> Any: method delete_state (line 1251) | async def delete_state(self, key: str) -> None: method _get_visibility_rules (line 1264) | async def _get_visibility_rules(self) -> list[dict[str, Any]]: method _get_session_transforms (line 1268) | async def _get_session_transforms(self) -> list[Visibility]: method enable_components (line 1272) | async def enable_components( method disable_components (line 1310) | async def disable_components( method reset_visibility (line 1348) | async def reset_visibility(self) -> None: function _log_to_server_and_client (line 1371) | async def _log_to_server_and_client( FILE: src/fastmcp/server/dependencies.py class TaskContextInfo (line 87) | class TaskContextInfo: function get_task_context (line 101) | def get_task_context() -> TaskContextInfo | None: function register_task_session (line 139) | def register_task_session(session_id: str, session: ServerSession) -> None: function get_task_session (line 153) | def get_task_session(session_id: str) -> ServerSession | None: function is_docket_available (line 189) | def is_docket_available() -> bool: function require_docket (line 202) | def require_docket(feature: str) -> None: function transform_context_annotations (line 227) | def transform_context_annotations(fn: Callable[..., Any]) -> Callable[..... function _clear_signature_caches (line 352) | def _clear_signature_caches(fn: Callable[..., Any]) -> None: function get_context (line 368) | def get_context() -> Context: function get_server (line 378) | def get_server() -> FastMCP: function get_http_request (line 396) | def get_http_request() -> Request: function get_http_headers (line 416) | def get_http_headers( function get_access_token (line 473) | def get_access_token() -> AccessToken | None: function without_injected_parameters (line 545) | def without_injected_parameters(fn: Callable[..., Any]) -> Callable[...,... function _resolve_fastmcp_dependencies (line 625) | async def _resolve_fastmcp_dependencies( function resolve_dependencies (line 694) | async def resolve_dependencies( function _restore_task_access_token (line 741) | async def _restore_task_access_token( function _restore_task_origin_request_id (line 774) | async def _restore_task_origin_request_id(session_id: str, task_id: str)... class _CurrentContext (line 804) | class _CurrentContext(Dependency["Context"]): method __aenter__ (line 815) | async def __aenter__(self) -> Context: method __aexit__ (line 858) | async def __aexit__( class _OptionalCurrentContext (line 874) | class _OptionalCurrentContext(Dependency["Context | None"]): method __aenter__ (line 884) | async def __aenter__(self) -> Context | None: method __aexit__ (line 895) | async def __aexit__( function CurrentContext (line 907) | def CurrentContext() -> Context: function OptionalCurrentContext (line 932) | def OptionalCurrentContext() -> Context | None: class _CurrentDocket (line 937) | class _CurrentDocket(Dependency["Docket"]): method __aenter__ (line 940) | async def __aenter__(self) -> Docket: method __aexit__ (line 951) | async def __aexit__( function CurrentDocket (line 960) | def CurrentDocket() -> Docket: class _CurrentWorker (line 987) | class _CurrentWorker(Dependency["Worker"]): method __aenter__ (line 990) | async def __aenter__(self) -> Worker: method __aexit__ (line 1001) | async def __aexit__( function CurrentWorker (line 1010) | def CurrentWorker() -> Worker: class _CurrentFastMCP (line 1036) | class _CurrentFastMCP(Dependency["FastMCP"]): method __aenter__ (line 1039) | async def __aenter__(self) -> FastMCP: method __aexit__ (line 1048) | async def __aexit__( function CurrentFastMCP (line 1057) | def CurrentFastMCP() -> FastMCP: class _CurrentRequest (line 1082) | class _CurrentRequest(Dependency[Request]): method __aenter__ (line 1085) | async def __aenter__(self) -> Request: method __aexit__ (line 1088) | async def __aexit__( function CurrentRequest (line 1097) | def CurrentRequest() -> Request: class _CurrentHeaders (line 1123) | class _CurrentHeaders(Dependency[dict[str, str]]): method __aenter__ (line 1126) | async def __aenter__(self) -> dict[str, str]: method __aexit__ (line 1129) | async def __aexit__( function CurrentHeaders (line 1138) | def CurrentHeaders() -> dict[str, str]: class ProgressLike (line 1166) | class ProgressLike(Protocol): method current (line 1174) | def current(self) -> int | None: method total (line 1179) | def total(self) -> int: method message (line 1184) | def message(self) -> str | None: method set_total (line 1188) | async def set_total(self, total: int) -> None: method increment (line 1192) | async def increment(self, amount: int = 1) -> None: method set_message (line 1196) | async def set_message(self, message: str | None) -> None: class InMemoryProgress (line 1201) | class InMemoryProgress: method __init__ (line 1209) | def __init__(self) -> None: method __aenter__ (line 1214) | async def __aenter__(self) -> InMemoryProgress: method __aexit__ (line 1217) | async def __aexit__( method current (line 1226) | def current(self) -> int | None: method total (line 1230) | def total(self) -> int: method message (line 1234) | def message(self) -> str | None: method set_total (line 1237) | async def set_total(self, total: int) -> None: method increment (line 1243) | async def increment(self, amount: int = 1) -> None: method set_message (line 1252) | async def set_message(self, message: str | None) -> None: class Progress (line 1257) | class Progress(Dependency["Progress"]): method __aenter__ (line 1272) | async def __aenter__(self) -> Progress: method __aexit__ (line 1290) | async def __aexit__( method current (line 1299) | def current(self) -> int | None: method total (line 1305) | def total(self) -> int: method message (line 1311) | def message(self) -> str | None: method set_total (line 1316) | async def set_total(self, total: int) -> None: method increment (line 1321) | async def increment(self, amount: int = 1) -> None: method set_message (line 1326) | async def set_message(self, message: str | None) -> None: class _CurrentAccessToken (line 1335) | class _CurrentAccessToken(Dependency[AccessToken]): method __aenter__ (line 1340) | async def __aenter__(self) -> AccessToken: method __aexit__ (line 1361) | async def __aexit__( function CurrentAccessToken (line 1372) | def CurrentAccessToken() -> AccessToken: class _TokenClaim (line 1400) | class _TokenClaim(Dependency[str]): method __init__ (line 1403) | def __init__(self, claim_name: str): method __aenter__ (line 1406) | async def __aenter__(self) -> str: method __aexit__ (line 1420) | async def __aexit__( function TokenClaim (line 1429) | def TokenClaim(name: str) -> str: FILE: src/fastmcp/server/elicitation.py class ElicitationJsonSchema (line 36) | class ElicitationJsonSchema(GenerateJsonSchema): method generate_inner (line 44) | def generate_inner(self, schema: core_schema.CoreSchema) -> JsonSchema... method list_schema (line 57) | def list_schema(self, schema: core_schema.ListSchema) -> JsonSchemaValue: method enum_schema (line 94) | def enum_schema(self, schema: core_schema.EnumSchema) -> JsonSchemaValue: class AcceptedElicitation (line 105) | class AcceptedElicitation(BaseModel, Generic[T]): class ScalarElicitationType (line 113) | class ScalarElicitationType(Generic[T]): class ElicitConfig (line 118) | class ElicitConfig: function parse_elicit_response_type (line 132) | def parse_elicit_response_type(response_type: Any) -> ElicitConfig: function _is_scalar_type (line 173) | def _is_scalar_type(response_type: Any) -> bool: function _parse_dict_syntax (line 182) | def _parse_dict_syntax(d: dict[str, Any]) -> ElicitConfig: function _parse_list_syntax (line 198) | def _parse_list_syntax(lst: list[Any]) -> ElicitConfig: function _parse_generic_list (line 245) | def _parse_generic_list(response_type: Any) -> ElicitConfig: function _parse_scalar_type (line 255) | def _parse_scalar_type(response_type: Any) -> ElicitConfig: function handle_elicit_accept (line 265) | def handle_elicit_accept( function _dict_to_enum_schema (line 299) | def _dict_to_enum_schema( function get_elicitation_schema (line 324) | def get_elicitation_schema(response_type: type[T]) -> dict[str, Any]: function validate_elicitation_json_schema (line 343) | def validate_elicitation_json_schema(schema: dict[str, Any]) -> None: FILE: src/fastmcp/server/event_store.py class EventEntry (line 26) | class EventEntry(FastMCPBaseModel): class StreamEventList (line 34) | class StreamEventList(FastMCPBaseModel): class EventStore (line 40) | class EventStore(SDKEventStore): method __init__ (line 70) | def __init__( method store_event (line 94) | async def store_event( method replay_events_after (line 135) | async def replay_events_after( FILE: src/fastmcp/server/http.py class StreamableHTTPASGIApp (line 32) | class StreamableHTTPASGIApp: method __init__ (line 35) | def __init__(self, session_manager): method __call__ (line 38) | async def __call__(self, scope: Scope, receive: Receive, send: Send) -... class StarletteWithLifespan (line 70) | class StarletteWithLifespan(Starlette): method lifespan (line 72) | def lifespan(self) -> Lifespan[Starlette]: function set_http_request (line 77) | def set_http_request(request: Request) -> Generator[Request, None, None]: class RequestContextMiddleware (line 85) | class RequestContextMiddleware: method __init__ (line 90) | def __init__(self, app): method __call__ (line 93) | async def __call__(self, scope, receive, send): function create_base_app (line 110) | def create_base_app( function create_sse_app (line 139) | def create_sse_app( function create_streamable_http_app (line 266) | def create_streamable_http_app( FILE: src/fastmcp/server/lifespan.py class Lifespan (line 61) | class Lifespan: method __init__ (line 68) | def __init__(self, fn: LifespanFn) -> None: method __call__ (line 78) | async def __call__(self, server: FastMCP[Any]) -> AsyncIterator[dict[s... method __or__ (line 90) | def __or__(self, other: Lifespan) -> ComposedLifespan: class ContextManagerLifespan (line 110) | class ContextManagerLifespan(Lifespan): method __init__ (line 118) | def __init__(self, fn: LifespanContextManagerFn) -> None: method __call__ (line 123) | async def __call__(self, server: FastMCP[Any]) -> AsyncIterator[dict[s... class ComposedLifespan (line 137) | class ComposedLifespan(Lifespan): method __init__ (line 144) | def __init__(self, left: Lifespan, right: Lifespan) -> None: method __call__ (line 156) | async def __call__(self, server: FastMCP[Any]) -> AsyncIterator[dict[s... function lifespan (line 172) | def lifespan(fn: LifespanFn) -> Lifespan: FILE: src/fastmcp/server/low_level.py class MiddlewareServerSession (line 36) | class MiddlewareServerSession(ServerSession): method __init__ (line 39) | def __init__(self, fastmcp: FastMCP, *args, **kwargs): method fastmcp (line 48) | def fastmcp(self) -> FastMCP: method client_supports_extension (line 55) | def client_supports_extension(self, extension_id: str) -> bool: method _received_request (line 74) | async def _received_request( class LowLevelServer (line 155) | class LowLevelServer(_Server[LifespanResultT, RequestT]): method __init__ (line 156) | def __init__(self, fastmcp: FastMCP, *args: Any, **kwargs: Any): method fastmcp (line 169) | def fastmcp(self) -> FastMCP: method create_initialization_options (line 176) | def create_initialization_options( method get_capabilities (line 191) | def get_capabilities( method run (line 225) | async def run( method read_resource (line 261) | def read_resource( method get_prompt (line 305) | def get_prompt( FILE: src/fastmcp/server/middleware/authorization.py class AuthMiddleware (line 51) | class AuthMiddleware(Middleware): method __init__ (line 82) | def __init__(self, auth: AuthCheck | list[AuthCheck]) -> None: method on_list_tools (line 85) | async def on_list_tools( method on_call_tool (line 113) | async def on_call_tool( method on_list_resources (line 156) | async def on_list_resources( method on_read_resource (line 183) | async def on_read_resource( method on_list_resource_templates (line 226) | async def on_list_resource_templates( method on_list_prompts (line 255) | async def on_list_prompts( method on_get_prompt (line 282) | async def on_get_prompt( FILE: src/fastmcp/server/middleware/caching.py class CachableResourceContent (line 39) | class CachableResourceContent(FastMCPBaseModel): class CachableResourceResult (line 47) | class CachableResourceResult(FastMCPBaseModel): method get_size (line 53) | def get_size(self) -> int: method wrap (line 57) | def wrap(cls, value: ResourceResult) -> Self: method unwrap (line 68) | def unwrap(self) -> ResourceResult: class CachableToolResult (line 80) | class CachableToolResult(FastMCPBaseModel): method wrap (line 86) | def wrap(cls, value: ToolResult) -> Self: method unwrap (line 93) | def unwrap(self) -> ToolResult: class CachableMessage (line 101) | class CachableMessage(FastMCPBaseModel): class CachablePromptResult (line 113) | class CachablePromptResult(FastMCPBaseModel): method get_size (line 120) | def get_size(self) -> int: method wrap (line 124) | def wrap(cls, value: PromptResult) -> Self: method unwrap (line 133) | def unwrap(self) -> PromptResult: class SharedMethodSettings (line 144) | class SharedMethodSettings(TypedDict): class ListToolsSettings (line 151) | class ListToolsSettings(SharedMethodSettings): class ListResourcesSettings (line 155) | class ListResourcesSettings(SharedMethodSettings): class ListPromptsSettings (line 159) | class ListPromptsSettings(SharedMethodSettings): class CallToolSettings (line 163) | class CallToolSettings(SharedMethodSettings): class ReadResourceSettings (line 170) | class ReadResourceSettings(SharedMethodSettings): class GetPromptSettings (line 174) | class GetPromptSettings(SharedMethodSettings): class ResponseCachingStatistics (line 178) | class ResponseCachingStatistics(FastMCPBaseModel): class ResponseCachingMiddleware (line 187) | class ResponseCachingMiddleware(Middleware): method __init__ (line 200) | def __init__( method on_list_tools (line 291) | async def on_list_tools( method on_list_resources (line 330) | async def on_list_resources( method on_list_prompts (line 369) | async def on_list_prompts( method on_call_tool (line 406) | async def on_call_tool( method on_read_resource (line 439) | async def on_read_resource( method on_get_prompt (line 467) | async def on_get_prompt( method _matches_tool_cache_settings (line 492) | def _matches_tool_cache_settings(self, tool_name: str) -> bool: method statistics (line 505) | def statistics(self) -> ResponseCachingStatistics: function _get_arguments_str (line 517) | def _get_arguments_str(arguments: dict[str, Any] | None) -> str: function _hash_cache_key (line 530) | def _hash_cache_key(value: str) -> str: function _make_call_tool_cache_key (line 536) | def _make_call_tool_cache_key(msg: mcp.types.CallToolRequestParams) -> str: function _make_read_resource_cache_key (line 542) | def _make_read_resource_cache_key(msg: mcp.types.ReadResourceRequestPara... function _make_get_prompt_cache_key (line 548) | def _make_get_prompt_cache_key(msg: mcp.types.GetPromptRequestParams) ->... FILE: src/fastmcp/server/middleware/dereference.py class DereferenceRefsMiddleware (line 15) | class DereferenceRefsMiddleware(Middleware): method on_list_tools (line 24) | async def on_list_tools( method on_list_resource_templates (line 33) | async def on_list_resource_templates( function _dereference_tool (line 44) | def _dereference_tool(tool: Tool) -> Tool: function _dereference_resource_template (line 58) | def _dereference_resource_template(template: ResourceTemplate) -> Resour... function _has_ref (line 67) | def _has_ref(schema: dict[str, Any]) -> bool: FILE: src/fastmcp/server/middleware/error_handling.py class ErrorHandlingMiddleware (line 18) | class ErrorHandlingMiddleware(Middleware): method __init__ (line 37) | def __init__( method _log_error (line 58) | def _log_error(self, error: Exception, context: MiddlewareContext) -> ... method _transform_error (line 81) | def _transform_error( method on_message (line 120) | async def on_message(self, context: MiddlewareContext, call_next: Call... method get_error_stats (line 131) | def get_error_stats(self) -> dict[str, int]: class RetryMiddleware (line 136) | class RetryMiddleware(Middleware): method __init__ (line 157) | def __init__( method _should_retry (line 183) | def _should_retry(self, error: Exception) -> bool: method _calculate_delay (line 187) | def _calculate_delay(self, attempt: int) -> float: method on_request (line 192) | async def on_request(self, context: MiddlewareContext, call_next: Call... FILE: src/fastmcp/server/middleware/logging.py function default_serializer (line 15) | def default_serializer(data: Any) -> str: class BaseLoggingMiddleware (line 20) | class BaseLoggingMiddleware(Middleware): method _serialize_payload (line 33) | def _serialize_payload(self, context: MiddlewareContext[Any]) -> str: method _format_message (line 49) | def _format_message(self, message: dict[str, str | int | float]) -> str: method _create_before_message (line 56) | def _create_before_message( method _create_error_message (line 89) | def _create_error_message( method _create_after_message (line 105) | def _create_after_message( method _log_message (line 119) | def _log_message( method on_message (line 124) | async def on_message( class LoggingMiddleware (line 148) | class LoggingMiddleware(BaseLoggingMiddleware): method __init__ (line 167) | def __init__( class StructuredLoggingMiddleware (line 203) | class StructuredLoggingMiddleware(BaseLoggingMiddleware): method __init__ (line 219) | def __init__( function _get_duration_ms (line 255) | def _get_duration_ms(start_time: float, /) -> float: FILE: src/fastmcp/server/middleware/middleware.py class CallNext (line 42) | class CallNext(Protocol[T, R]): method __call__ (line 43) | def __call__(self, context: MiddlewareContext[T]) -> Awaitable[R]: ... class MiddlewareContext (line 47) | class MiddlewareContext(Generic[T]): method copy (line 62) | def copy(self, **kwargs: Any) -> MiddlewareContext[T]: function make_middleware_wrapper (line 66) | def make_middleware_wrapper( class Middleware (line 79) | class Middleware: method __call__ (line 82) | async def __call__( method _dispatch_handler (line 94) | async def _dispatch_handler( method on_message (line 128) | async def on_message( method on_request (line 135) | async def on_request( method on_notification (line 142) | async def on_notification( method on_initialize (line 149) | async def on_initialize( method on_call_tool (line 156) | async def on_call_tool( method on_read_resource (line 163) | async def on_read_resource( method on_get_prompt (line 170) | async def on_get_prompt( method on_list_tools (line 177) | async def on_list_tools( method on_list_resources (line 184) | async def on_list_resources( method on_list_resource_templates (line 191) | async def on_list_resource_templates( method on_list_prompts (line 200) | async def on_list_prompts( FILE: src/fastmcp/server/middleware/ping.py class PingMiddleware (line 10) | class PingMiddleware(Middleware): method __init__ (line 27) | def __init__(self, interval_ms: int = 30000): method on_message (line 42) | async def on_message(self, context: MiddlewareContext, call_next: Call... method _ping_loop (line 63) | async def _ping_loop(self, session: Any, session_id: int) -> None: FILE: src/fastmcp/server/middleware/rate_limiting.py class RateLimitError (line 15) | class RateLimitError(McpError): method __init__ (line 18) | def __init__(self, message: str = "Rate limit exceeded"): class TokenBucketRateLimiter (line 22) | class TokenBucketRateLimiter: method __init__ (line 25) | def __init__(self, capacity: int, refill_rate: float): method consume (line 38) | async def consume(self, tokens: int = 1) -> bool: class SlidingWindowRateLimiter (line 61) | class SlidingWindowRateLimiter: method __init__ (line 64) | def __init__(self, max_requests: int, window_seconds: int): method is_allowed (line 76) | async def is_allowed(self) -> bool: class RateLimitingMiddleware (line 92) | class RateLimitingMiddleware(Middleware): method __init__ (line 113) | def __init__( method _get_client_identifier (line 146) | def _get_client_identifier(self, context: MiddlewareContext) -> str: method on_request (line 152) | async def on_request(self, context: MiddlewareContext, call_next: Call... class SlidingWindowRateLimitingMiddleware (line 170) | class SlidingWindowRateLimitingMiddleware(Middleware): method __init__ (line 191) | def __init__( method _get_client_identifier (line 213) | def _get_client_identifier(self, context: MiddlewareContext) -> str: method on_request (line 219) | async def on_request(self, context: MiddlewareContext, call_next: Call... FILE: src/fastmcp/server/middleware/response_limiting.py class ResponseLimitingMiddleware (line 20) | class ResponseLimitingMiddleware(Middleware): method __init__ (line 49) | def __init__( method _truncate_to_result (line 70) | def _truncate_to_result(self, text: str) -> ToolResult: method on_call_tool (line 93) | async def on_call_tool( FILE: src/fastmcp/server/middleware/timing.py class TimingMiddleware (line 10) | class TimingMiddleware(Middleware): method __init__ (line 27) | def __init__( method on_request (line 39) | async def on_request(self, context: MiddlewareContext, call_next: Call... class DetailedTimingMiddleware (line 60) | class DetailedTimingMiddleware(Middleware): method __init__ (line 79) | def __init__( method _time_operation (line 91) | async def _time_operation( method on_call_tool (line 111) | async def on_call_tool( method on_read_resource (line 118) | async def on_read_resource( method on_get_prompt (line 127) | async def on_get_prompt( method on_list_tools (line 134) | async def on_list_tools( method on_list_resources (line 140) | async def on_list_resources( method on_list_resource_templates (line 146) | async def on_list_resource_templates( method on_list_prompts (line 152) | async def on_list_prompts( FILE: src/fastmcp/server/middleware/tool_injection.py class ToolInjectionMiddleware (line 23) | class ToolInjectionMiddleware(Middleware): method __init__ (line 26) | def __init__(self, tools: Sequence[Tool]): method on_list_tools (line 34) | async def on_list_tools( method on_call_tool (line 43) | async def on_call_tool( function list_prompts (line 56) | async def list_prompts(context: Context) -> list[Prompt]: function get_prompt (line 66) | async def get_prompt( class PromptToolMiddleware (line 82) | class PromptToolMiddleware(ToolInjectionMiddleware): method __init__ (line 89) | def __init__(self) -> None: function list_resources (line 101) | async def list_resources(context: Context) -> list[mcp.types.Resource]: function read_resource (line 111) | async def read_resource( class ResourceToolMiddleware (line 124) | class ResourceToolMiddleware(ToolInjectionMiddleware): method __init__ (line 131) | def __init__(self) -> None: FILE: src/fastmcp/server/mixins/lifespan.py class LifespanMixin (line 25) | class LifespanMixin: method docket (line 29) | def docket(self: FastMCP) -> Docket | None: method _docket_lifespan (line 37) | async def _docket_lifespan(self: FastMCP) -> AsyncIterator[None]: method _lifespan_manager (line 140) | async def _lifespan_manager(self: FastMCP) -> AsyncIterator[None]: method _setup_task_protocol_handlers (line 192) | def _setup_task_protocol_handlers(self: FastMCP) -> None: FILE: src/fastmcp/server/mixins/mcp_operations.py function _apply_pagination (line 27) | def _apply_pagination( class MCPOperationsMixin (line 44) | class MCPOperationsMixin: method _setup_handlers (line 54) | def _setup_handlers(self: FastMCP) -> None: method _wrap_list_handler (line 87) | def _wrap_list_handler( method _list_tools_mcp (line 98) | async def _list_tools_mcp( method _list_resources_mcp (line 120) | async def _list_resources_mcp( method _list_resource_templates_mcp (line 143) | async def _list_resource_templates_mcp( method _list_prompts_mcp (line 168) | async def _list_prompts_mcp( method _call_tool_mcp (line 188) | async def _call_tool_mcp( method _read_resource_mcp (line 248) | async def _read_resource_mcp( method _get_prompt_mcp (line 304) | async def _get_prompt_mcp( method _set_logging_level_mcp (line 357) | async def _set_logging_level_mcp(self, level: mcp.types.LoggingLevel) ... FILE: src/fastmcp/server/mixins/transport.py class TransportMixin (line 37) | class TransportMixin: method run_async (line 43) | async def run_async( method run (line 77) | def run( method custom_route (line 100) | def custom_route( method _get_additional_http_routes (line 150) | def _get_additional_http_routes(self: FastMCP) -> list[BaseRoute]: method run_stdio_async (line 184) | async def run_stdio_async( method run_http_async (line 226) | async def run_http_async( method http_app (line 305) | def http_app( FILE: src/fastmcp/server/openapi/server.py class FastMCPOpenAPI (line 30) | class FastMCPOpenAPI(FastMCP): method __init__ (line 60) | def __init__( FILE: src/fastmcp/server/providers/__init__.py function __getattr__ (line 61) | def __getattr__(name: str): FILE: src/fastmcp/server/providers/aggregate.py class AggregateProvider (line 46) | class AggregateProvider(Provider): method __init__ (line 68) | def __init__(self, providers: Sequence[Provider] | None = None) -> None: method add_provider (line 78) | def add_provider(self, provider: Provider, *, namespace: str = "") -> ... method _collect_list_results (line 106) | def _collect_list_results( method _get_highest_version_result (line 121) | def _get_highest_version_result( method __repr__ (line 146) | def __repr__(self) -> str: method _list_tools (line 153) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 161) | async def _get_tool( method _list_resources (line 175) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 183) | async def _get_resource( method _list_resource_templates (line 197) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 205) | async def _get_resource_template( method _list_prompts (line 221) | async def _list_prompts(self) -> Sequence[Prompt]: method _get_prompt (line 229) | async def _get_prompt( method get_tasks (line 243) | async def get_tasks(self) -> Sequence[FastMCPComponent]: method lifespan (line 256) | async def lifespan(self) -> AsyncIterator[None]: FILE: src/fastmcp/server/providers/base.py class Provider (line 51) | class Provider: method __init__ (line 69) | def __init__(self) -> None: method __repr__ (line 72) | def __repr__(self) -> str: method transforms (line 76) | def transforms(self) -> list[Transform]: method add_transform (line 80) | def add_transform(self, transform: Transform) -> None: method wrap_transform (line 100) | def wrap_transform(self, transform: Transform) -> Provider: method list_tools (line 136) | async def list_tools(self) -> Sequence[Tool]: method get_tool (line 152) | async def get_tool( method list_resources (line 178) | async def list_resources(self) -> Sequence[Resource]: method get_resource (line 188) | async def get_resource( method list_resource_templates (line 213) | async def list_resource_templates(self) -> Sequence[ResourceTemplate]: method get_resource_template (line 223) | async def get_resource_template( method list_prompts (line 250) | async def list_prompts(self) -> Sequence[Prompt]: method get_prompt (line 260) | async def get_prompt( method _list_tools (line 289) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 297) | async def _get_tool( method _list_resources (line 321) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 329) | async def _get_resource( method _list_resource_templates (line 352) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 360) | async def _get_resource_template( method _list_prompts (line 383) | async def _list_prompts(self) -> Sequence[Prompt]: method _get_prompt (line 391) | async def _get_prompt( method get_tasks (line 418) | async def get_tasks(self) -> Sequence[FastMCPComponent]: method lifespan (line 463) | async def lifespan(self) -> AsyncIterator[None]: method enable (line 492) | def enable( method disable (line 541) | def disable( FILE: src/fastmcp/server/providers/fastmcp_provider.py function _expand_uri_template (line 39) | def _expand_uri_template(template: str, params: dict[str, Any]) -> str: class FastMCPProviderTool (line 72) | class FastMCPProviderTool(Tool): method __init__ (line 83) | def __init__( method wrap (line 94) | def wrap(cls, server: Any, tool: Tool) -> FastMCPProviderTool: method _run (line 113) | async def _run( method _run (line 120) | async def _run( method _run (line 126) | async def _run( method run (line 147) | async def run(self, arguments: dict[str, Any]) -> ToolResult: method get_span_attributes (line 166) | def get_span_attributes(self) -> dict[str, Any]: class FastMCPProviderResource (line 173) | class FastMCPProviderResource(Resource): method __init__ (line 183) | def __init__( method wrap (line 194) | def wrap(cls, server: Any, resource: Resource) -> FastMCPProviderResou... method _read (line 213) | async def _read(self, task_meta: None = None) -> ResourceResult: ... method _read (line 216) | async def _read(self, task_meta: TaskMeta) -> mcp.types.CreateTaskResu... method _read (line 218) | async def _read( method get_span_attributes (line 237) | def get_span_attributes(self) -> dict[str, Any]: class FastMCPProviderPrompt (line 244) | class FastMCPProviderPrompt(Prompt): method __init__ (line 254) | def __init__( method wrap (line 265) | def wrap(cls, server: Any, prompt: Prompt) -> FastMCPProviderPrompt: method _render (line 282) | async def _render( method _render (line 289) | async def _render( method _render (line 295) | async def _render( method render (line 316) | async def render(self, arguments: dict[str, Any] | None = None) -> Pro... method get_span_attributes (line 335) | def get_span_attributes(self) -> dict[str, Any]: class FastMCPProviderResourceTemplate (line 342) | class FastMCPProviderResourceTemplate(ResourceTemplate): method __init__ (line 353) | def __init__( method wrap (line 364) | def wrap( method create_resource (line 385) | async def create_resource(self, uri: str, params: dict[str, Any]) -> R... method _read (line 404) | async def _read( method _read (line 409) | async def _read( method _read (line 413) | async def _read( method read (line 435) | async def read(self, arguments: dict[str, Any]) -> str | bytes | Resou... method register_with_docket (line 456) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 459) | async def add_to_docket( method get_span_attributes (line 478) | def get_span_attributes(self) -> dict[str, Any]: class FastMCPProvider (line 490) | class FastMCPProvider(Provider): method __init__ (line 528) | def __init__(self, server: FastMCP[Any]): method _list_tools (line 541) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 551) | async def _get_tool( method _list_resources (line 569) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 579) | async def _get_resource( method _list_resource_templates (line 597) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 609) | async def _get_resource_template( method _list_prompts (line 627) | async def _list_prompts(self) -> Sequence[Prompt]: method _get_prompt (line 637) | async def _get_prompt( method get_tasks (line 655) | async def get_tasks(self) -> Sequence[FastMCPComponent]: method lifespan (line 696) | async def lifespan(self) -> AsyncIterator[None]: FILE: src/fastmcp/server/providers/filesystem.py class FileSystemProvider (line 47) | class FileSystemProvider(LocalProvider): method __init__ (line 85) | def __init__( method _load_components (line 103) | def _load_components(self) -> None: method _register_component (line 144) | def _register_component(self, component: FastMCPComponent) -> None: method _ensure_loaded (line 157) | async def _ensure_loaded(self) -> None: method _list_tools (line 177) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 182) | async def _get_tool( method _list_resources (line 189) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 194) | async def _get_resource( method _list_resource_templates (line 201) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 206) | async def _get_resource_template( method _list_prompts (line 213) | async def _list_prompts(self) -> Sequence[Prompt]: method _get_prompt (line 218) | async def _get_prompt( method __repr__ (line 225) | def __repr__(self) -> str: FILE: src/fastmcp/server/providers/filesystem_discovery.py class DiscoveryResult (line 24) | class DiscoveryResult: function discover_files (line 32) | def discover_files(root: Path) -> list[Path]: function _is_package_dir (line 66) | def _is_package_dir(directory: Path) -> bool: function _find_package_root (line 71) | def _find_package_root(file_path: Path) -> Path | None: function _compute_module_name (line 92) | def _compute_module_name(file_path: Path, package_root: Path) -> str: function import_module_from_file (line 109) | def import_module_from_file(file_path: Path) -> ModuleType: function extract_components (line 175) | def extract_components(module: ModuleType) -> list[FastMCPComponent]: function discover_and_import (line 299) | def discover_and_import(root: Path) -> DiscoveryResult: FILE: src/fastmcp/server/providers/local_provider/decorators/prompts.py class PromptDecoratorMixin (line 29) | class PromptDecoratorMixin: method add_prompt (line 37) | def add_prompt(self: LocalProvider, prompt: Prompt | Callable[..., Any... method prompt (line 74) | def prompt( method prompt (line 91) | def prompt( method prompt (line 107) | def prompt( FILE: src/fastmcp/server/providers/local_provider/decorators/resources.py class ResourceDecoratorMixin (line 29) | class ResourceDecoratorMixin: method add_resource (line 38) | def add_resource( method add_template (line 101) | def add_template( method resource (line 107) | def resource( FILE: src/fastmcp/server/providers/local_provider/decorators/tools.py function _is_prefab_type (line 55) | def _is_prefab_type(tp: Any) -> bool: function _has_prefab_return_type (line 65) | def _has_prefab_return_type(tool: Tool) -> bool: function _ensure_prefab_renderer (line 75) | def _ensure_prefab_renderer(provider: LocalProvider) -> None: function _expand_prefab_ui_meta (line 108) | def _expand_prefab_ui_meta(tool: Tool) -> None: function _maybe_apply_prefab_ui (line 127) | def _maybe_apply_prefab_ui(provider: LocalProvider, tool: Tool) -> None: class ToolDecoratorMixin (line 146) | class ToolDecoratorMixin: method add_tool (line 154) | def add_tool(self: LocalProvider, tool: Tool | Callable[..., Any]) -> ... method tool (line 206) | def tool( method tool (line 228) | def tool( method tool (line 253) | def tool( FILE: src/fastmcp/server/providers/local_provider/local_provider.py class LocalProvider (line 51) | class LocalProvider( method __init__ (line 91) | def __init__( method _get_component_identity (line 113) | def _get_component_identity(self, component: FastMCPComponent) -> tupl... method _check_version_mixing (line 134) | def _check_version_mixing(self, component: _C) -> None: method _add_component (line 178) | def _add_component(self, component: _C) -> _C: method _remove_component (line 203) | def _remove_component(self, key: str) -> None: method _get_component (line 218) | def _get_component(self, key: str) -> FastMCPComponent | None: method remove_tool (line 229) | def remove_tool(self, name: str, version: str | None = None) -> None: method remove_resource (line 257) | def remove_resource(self, uri: str, version: str | None = None) -> None: method remove_template (line 285) | def remove_template(self, uri_template: str, version: str | None = Non... method remove_prompt (line 315) | def remove_prompt(self, name: str, version: str | None = None) -> None: method _list_tools (line 347) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 351) | async def _get_tool( method _list_resources (line 371) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 375) | async def _get_resource( method _list_resource_templates (line 395) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 399) | async def _get_resource_template( method _list_prompts (line 421) | async def _list_prompts(self) -> Sequence[Prompt]: method _get_prompt (line 425) | async def _get_prompt( method get_tasks (line 449) | async def get_tasks(self) -> Sequence[FastMCPComponent]: FILE: src/fastmcp/server/providers/openapi/components.py function _redact_headers (line 47) | def _redact_headers(headers: httpx.Headers) -> dict[str, str]: function _extract_mime_type_from_route (line 64) | def _extract_mime_type_from_route(route: HTTPRoute) -> str: function _slugify (line 114) | def _slugify(text: str) -> str: class OpenAPITool (line 137) | class OpenAPITool(Tool): method __init__ (line 142) | def __init__( method __repr__ (line 176) | def __repr__(self) -> str: method run (line 179) | async def run(self, arguments: dict[str, Any]) -> ToolResult: class OpenAPIResource (line 256) | class OpenAPIResource(Resource): method __init__ (line 261) | def __init__( method __repr__ (line 283) | def __repr__(self) -> str: method read (line 286) | async def read(self) -> ResourceResult: class OpenAPIResourceTemplate (line 370) | class OpenAPIResourceTemplate(ResourceTemplate): method __init__ (line 375) | def __init__( method __repr__ (line 399) | def __repr__(self) -> str: method create_resource (line 402) | async def create_resource( FILE: src/fastmcp/server/providers/openapi/provider.py class OpenAPIProvider (line 51) | class OpenAPIProvider(Provider): method __init__ (line 71) | def __init__( method _create_default_client (line 169) | def _create_default_client(cls, openapi_spec: dict[str, Any]) -> httpx... method lifespan (line 181) | async def lifespan(self) -> AsyncIterator[None]: method _generate_default_name (line 189) | def _generate_default_name( method _get_unique_name (line 210) | def _get_unique_name( method _create_openapi_tool (line 226) | def _create_openapi_tool( method _create_openapi_resource (line 278) | def _create_openapi_resource( method _create_openapi_template (line 313) | def _create_openapi_template( method _list_tools (line 380) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 384) | async def _get_tool( method _list_resources (line 395) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 399) | async def _get_resource( method _list_resource_templates (line 410) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 414) | async def _get_resource_template( method _list_prompts (line 427) | async def _list_prompts(self) -> Sequence[Prompt]: method get_tasks (line 431) | async def get_tasks(self) -> Sequence[FastMCPComponent]: FILE: src/fastmcp/server/providers/openapi/routing.py class MCPType (line 42) | class MCPType(enum.Enum): class RouteMap (line 59) | class RouteMap: function _determine_route_type (line 86) | def _determine_route_type( FILE: src/fastmcp/server/providers/proxy.py class ProxyTool (line 69) | class ProxyTool(Tool): method __init__ (line 75) | def __init__(self, client_factory: ClientFactoryT, **kwargs: Any): method _get_client (line 79) | async def _get_client(self) -> Client: method model_copy (line 86) | def model_copy(self, **kwargs: Any) -> ProxyTool: method from_mcp_tool (line 96) | def from_mcp_tool( method run (line 113) | async def run( method get_span_attributes (line 168) | def get_span_attributes(self) -> dict[str, Any]: class ProxyResource (line 175) | class ProxyResource(Resource): method __init__ (line 182) | def __init__( method _get_client (line 193) | async def _get_client(self) -> Client: method model_copy (line 200) | def model_copy(self, **kwargs: Any) -> ProxyResource: method from_mcp_resource (line 210) | def from_mcp_resource( method read (line 230) | async def read(self) -> ResourceResult: method get_span_attributes (line 275) | def get_span_attributes(self) -> dict[str, Any]: class ProxyTemplate (line 282) | class ProxyTemplate(ResourceTemplate): method __init__ (line 288) | def __init__(self, client_factory: ClientFactoryT, **kwargs: Any): method _get_client (line 292) | async def _get_client(self) -> Client: method model_copy (line 299) | def model_copy(self, **kwargs: Any) -> ProxyTemplate: method from_mcp_template (line 309) | def from_mcp_template( # type: ignore[override] method create_resource (line 328) | async def create_resource( method get_span_attributes (line 390) | def get_span_attributes(self) -> dict[str, Any]: class ProxyPrompt (line 397) | class ProxyPrompt(Prompt): method __init__ (line 403) | def __init__(self, client_factory: ClientFactoryT, **kwargs): method _get_client (line 407) | async def _get_client(self) -> Client: method model_copy (line 414) | def model_copy(self, **kwargs: Any) -> ProxyPrompt: method from_mcp_prompt (line 424) | def from_mcp_prompt( method render (line 448) | async def render(self, arguments: dict[str, Any]) -> PromptResult: # ... method get_span_attributes (line 470) | def get_span_attributes(self) -> dict[str, Any]: class _CacheEntry (line 482) | class _CacheEntry: method __init__ (line 487) | def __init__(self, items: Sequence[Any], timestamp: float): method is_fresh (line 491) | def is_fresh(self, ttl: float) -> bool: class ProxyProvider (line 498) | class ProxyProvider(Provider): method __init__ (line 533) | def __init__( method _get_client (line 556) | async def _get_client(self) -> Client: method _list_tools (line 567) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 584) | async def _get_tool( method _list_resources (line 603) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 621) | async def _get_resource( method _list_resource_templates (line 640) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 658) | async def _get_resource_template( method _list_prompts (line 677) | async def _list_prompts(self) -> Sequence[Prompt]: method _get_prompt (line 695) | async def _get_prompt( method get_tasks (line 714) | async def get_tasks(self) -> Sequence[FastMCPComponent]: function _create_client_factory (line 732) | def _create_client_factory( class FastMCPProxy (line 795) | class FastMCPProxy(FastMCP): method __init__ (line 814) | def __init__( function default_proxy_roots_handler (line 842) | async def default_proxy_roots_handler( function default_proxy_sampling_handler (line 850) | async def default_proxy_sampling_handler( function default_proxy_elicitation_handler (line 873) | async def default_proxy_elicitation_handler( function default_proxy_log_handler (line 895) | async def default_proxy_log_handler(message: LogMessage) -> None: function default_proxy_progress_handler (line 903) | async def default_proxy_progress_handler( function _restore_request_context (line 913) | def _restore_request_context( function _make_restoring_handler (line 952) | def _make_restoring_handler(handler: Callable, rc_ref: list[Any]) -> Cal... class ProxyClient (line 967) | class ProxyClient(Client[ClientTransportT]): method __init__ (line 973) | def __init__( class StatefulProxyClient (line 1000) | class StatefulProxyClient(ProxyClient[ClientTransportT]): method __init__ (line 1028) | def __init__(self, *args: Any, **kwargs: Any): method __aexit__ (line 1045) | async def __aexit__(self, exc_type, exc_value, traceback) -> None: # ... method clear (line 1051) | async def clear(self): method new_stateful (line 1057) | def new_stateful(self) -> Client[ClientTransportT]: FILE: src/fastmcp/server/providers/skills/_common.py class SkillFileInfo (line 13) | class SkillFileInfo: class SkillInfo (line 22) | class SkillInfo: function parse_frontmatter (line 33) | def parse_frontmatter(content: str) -> tuple[dict[str, Any], str]: function compute_file_hash (line 77) | def compute_file_hash(path: Path) -> str: function scan_skill_files (line 86) | def scan_skill_files(skill_dir: Path) -> list[SkillFileInfo]: FILE: src/fastmcp/server/providers/skills/claude_provider.py class ClaudeSkillsProvider (line 11) | class ClaudeSkillsProvider(SkillsDirectoryProvider): method __init__ (line 32) | def __init__( FILE: src/fastmcp/server/providers/skills/directory_provider.py class SkillsDirectoryProvider (line 19) | class SkillsDirectoryProvider(AggregateProvider): method __init__ (line 55) | def __init__( method _discover_skills (line 76) | def _discover_skills(self) -> None: method _ensure_discovered (line 122) | async def _ensure_discovered(self) -> None: method _list_resources (line 128) | async def _list_resources(self) -> Sequence[Resource]: method _list_resource_templates (line 132) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource (line 136) | async def _get_resource( method _get_resource_template (line 142) | async def _get_resource_template( method __repr__ (line 148) | def __repr__(self) -> str: FILE: src/fastmcp/server/providers/skills/skill_provider.py class SkillResource (line 35) | class SkillResource(Resource): method get_meta (line 41) | def get_meta(self) -> dict[str, Any]: method read (line 50) | async def read(self) -> str | bytes | ResourceResult: method _generate_manifest (line 58) | def _generate_manifest(self) -> str: class SkillFileTemplate (line 70) | class SkillFileTemplate(ResourceTemplate): method read (line 75) | async def read(self, arguments: dict[str, Any]) -> str | bytes | Resou... method _read (line 101) | async def _read( # type: ignore[override] method create_resource (line 115) | async def create_resource(self, uri: str, params: dict[str, Any]) -> R... class SkillFileResource (line 141) | class SkillFileResource(Resource): method get_meta (line 147) | def get_meta(self) -> dict[str, Any]: method read (line 155) | async def read(self) -> str | bytes | ResourceResult: class SkillProvider (line 179) | class SkillProvider(Provider): method __init__ (line 213) | def __init__( method _load_skill (line 228) | def _load_skill(self) -> None: method skill_info (line 271) | def skill_info(self) -> SkillInfo: method _list_resources (line 281) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 331) | async def _get_resource( method _list_resource_templates (line 384) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 406) | async def _get_resource_template( method __repr__ (line 445) | def __repr__(self) -> str: FILE: src/fastmcp/server/providers/skills/vendor_providers.py class CursorSkillsProvider (line 11) | class CursorSkillsProvider(SkillsDirectoryProvider): method __init__ (line 14) | def __init__( class VSCodeSkillsProvider (line 29) | class VSCodeSkillsProvider(SkillsDirectoryProvider): method __init__ (line 32) | def __init__( class CodexSkillsProvider (line 47) | class CodexSkillsProvider(SkillsDirectoryProvider): method __init__ (line 54) | def __init__( class GeminiSkillsProvider (line 73) | class GeminiSkillsProvider(SkillsDirectoryProvider): method __init__ (line 76) | def __init__( class GooseSkillsProvider (line 91) | class GooseSkillsProvider(SkillsDirectoryProvider): method __init__ (line 94) | def __init__( class CopilotSkillsProvider (line 109) | class CopilotSkillsProvider(SkillsDirectoryProvider): method __init__ (line 112) | def __init__( class OpenCodeSkillsProvider (line 127) | class OpenCodeSkillsProvider(SkillsDirectoryProvider): method __init__ (line 130) | def __init__( FILE: src/fastmcp/server/providers/wrapped_provider.py class _WrappedProvider (line 25) | class _WrappedProvider(Provider): method __init__ (line 36) | def __init__(self, inner: Provider, transform: Transform) -> None: method __repr__ (line 49) | def __repr__(self) -> str: method _list_tools (line 56) | async def _list_tools(self) -> Sequence[Tool]: method _get_tool (line 60) | async def _get_tool( method _list_resources (line 66) | async def _list_resources(self) -> Sequence[Resource]: method _get_resource (line 70) | async def _get_resource( method _list_resource_templates (line 76) | async def _list_resource_templates(self) -> Sequence[ResourceTemplate]: method _get_resource_template (line 80) | async def _get_resource_template( method _list_prompts (line 86) | async def _list_prompts(self) -> Sequence[Prompt]: method _get_prompt (line 90) | async def _get_prompt( method get_tasks (line 96) | async def get_tasks(self) -> Sequence[FastMCPComponent]: method lifespan (line 137) | async def lifespan(self) -> AsyncIterator[None]: FILE: src/fastmcp/server/sampling/run.py class SamplingResult (line 54) | class SamplingResult(Generic[ResultT]): class SampleStep (line 69) | class SampleStep: method is_tool_use (line 79) | def is_tool_use(self) -> bool: method text (line 86) | def text(self) -> str | None: method tool_calls (line 99) | def tool_calls(self) -> list[ToolUseContent]: function _parse_model_preferences (line 109) | def _parse_model_preferences( function determine_handler_mode (line 132) | def determine_handler_mode(context: Context, needs_tools: bool) -> bool: function call_sampling_handler (line 191) | async def call_sampling_handler( function execute_tools (line 244) | async def execute_tools( function prepare_messages (line 354) | def prepare_messages( function prepare_tools (line 373) | def prepare_tools( function extract_tool_calls (line 409) | def extract_tool_calls( function create_final_response_tool (line 421) | def create_final_response_tool(result_type: type) -> SamplingTool: function sample_step_impl (line 457) | async def sample_step_impl( function sample_impl (line 574) | async def sample_impl( FILE: src/fastmcp/server/sampling/sampling_tool.py class SamplingTool (line 23) | class SamplingTool(FastMCPBaseModel): method run (line 54) | async def run(self, arguments: dict[str, Any] | None = None) -> Any: method _to_sdk_tool (line 71) | def _to_sdk_tool(self) -> SDKTool: method from_function (line 84) | def from_function( method from_callable_tool (line 126) | def from_callable_tool( FILE: src/fastmcp/server/server.py function _check_removed_kwargs (line 127) | def _check_removed_kwargs(kwargs: dict[str, Any]) -> None: function _get_auth_context (line 151) | def _get_auth_context() -> tuple[bool, Any]: function default_lifespan (line 171) | async def default_lifespan(server: FastMCP[LifespanResultT]) -> AsyncIte... function _lifespan_proxy (line 183) | def _lifespan_proxy( class StateValue (line 207) | class StateValue(FastMCPBaseModel): class FastMCP (line 213) | class FastMCP( method __init__ (line 220) | def __init__( method __repr__ (line 359) | def __repr__(self) -> str: method name (line 363) | def name(self) -> str: method instructions (line 367) | def instructions(self) -> str | None: method instructions (line 371) | def instructions(self, value: str | None) -> None: method version (line 375) | def version(self) -> str | None: method website_url (line 379) | def website_url(self) -> str | None: method icons (line 383) | def icons(self) -> list[mcp.types.Icon]: method local_provider (line 390) | def local_provider(self) -> LocalProvider: method _run_middleware (line 401) | async def _run_middleware( method add_middleware (line 412) | def add_middleware(self, middleware: Middleware) -> None: method add_provider (line 415) | def add_provider(self, provider: Provider, *, namespace: str = "") -> ... method get_tasks (line 437) | async def get_tasks(self) -> Sequence[FastMCPComponent]: method add_transform (line 466) | def add_transform(self, transform: Transform) -> None: method add_tool_transformation (line 486) | def add_tool_transformation( method remove_tool_transformation (line 503) | def remove_tool_transformation(self, _tool_name: str) -> None: method list_tools (line 518) | async def list_tools(self, *, run_middleware: bool = True) -> Sequence... method _get_tool (line 557) | async def _get_tool( method get_tool (line 588) | async def get_tool( method list_resources (line 641) | async def list_resources( method _get_resource (line 682) | async def _get_resource( method get_resource (line 713) | async def get_resource( method list_resource_templates (line 763) | async def list_resource_templates( method _get_resource_template (line 806) | async def _get_resource_template( method get_resource_template (line 837) | async def get_resource_template( method list_prompts (line 891) | async def list_prompts(self, *, run_middleware: bool = True) -> Sequen... method _get_prompt (line 930) | async def _get_prompt( method get_prompt (line 961) | async def get_prompt( method call_tool (line 1012) | async def call_tool( method call_tool (line 1023) | async def call_tool( method call_tool (line 1033) | async def call_tool( method read_resource (line 1148) | async def read_resource( method read_resource (line 1158) | async def read_resource( method read_resource (line 1167) | async def read_resource( method render_prompt (line 1301) | async def render_prompt( method render_prompt (line 1312) | async def render_prompt( method render_prompt (line 1322) | async def render_prompt( method add_tool (line 1398) | def add_tool(self, tool: Tool | Callable[..., Any]) -> Tool: method remove_tool (line 1412) | def remove_tool(self, name: str, version: str | None = None) -> None: method tool (line 1442) | def tool( method tool (line 1463) | def tool( method tool (line 1483) | def tool( method add_resource (line 1582) | def add_resource( method add_template (line 1595) | def add_template(self, template: ResourceTemplate) -> ResourceTemplate: method resource (line 1606) | def resource( method add_prompt (line 1725) | def add_prompt(self, prompt: Prompt | Callable[..., Any]) -> Prompt: method prompt (line 1737) | def prompt( method prompt (line 1753) | def prompt( method prompt (line 1768) | def prompt( method mount (line 1868) | def mount( method import_server (line 1962) | async def import_server( method from_openapi (line 2062) | def from_openapi( method from_fastapi (line 2113) | def from_fastapi( method as_proxy (line 2168) | def as_proxy( method generate_name (line 2205) | def generate_name(cls, name: str | None = None) -> str: function create_proxy (line 2219) | def create_proxy( FILE: src/fastmcp/server/tasks/capabilities.py function _is_docket_available (line 15) | def _is_docket_available() -> bool: function get_task_capabilities (line 20) | def get_task_capabilities() -> ServerTasksCapability | None: FILE: src/fastmcp/server/tasks/config.py class TaskMeta (line 28) | class TaskMeta: class TaskConfig (line 44) | class TaskConfig: method from_bool (line 82) | def from_bool(cls, value: bool) -> TaskConfig: method supports_tasks (line 93) | def supports_tasks(self) -> bool: method validate_function (line 101) | def validate_function(self, fn: Callable[..., Any], name: str) -> None: FILE: src/fastmcp/server/tasks/elicitation.py function elicit_for_task (line 42) | async def elicit_for_task( function relay_elicitation (line 234) | async def relay_elicitation( function handle_task_input (line 290) | async def handle_task_input( FILE: src/fastmcp/server/tasks/handlers.py function submit_to_docket (line 34) | async def submit_to_docket( FILE: src/fastmcp/server/tasks/keys.py function build_task_key (line 15) | def build_task_key( function parse_task_key (line 47) | def parse_task_key(task_key: str) -> dict[str, str]: function get_client_task_id_from_key (line 78) | def get_client_task_id_from_key(task_key: str) -> str: FILE: src/fastmcp/server/tasks/notifications.py function push_notification (line 48) | async def push_notification( function notification_subscriber_loop (line 76) | async def notification_subscriber_loop( function _send_mcp_notification (line 165) | async def _send_mcp_notification( function ensure_subscriber_running (line 238) | async def ensure_subscriber_running( function stop_subscriber (line 278) | async def stop_subscriber(session_id: str) -> None: function get_subscriber_count (line 298) | def get_subscriber_count() -> int: FILE: src/fastmcp/server/tasks/requests.py function _parse_key_version (line 52) | def _parse_key_version(key_suffix: str) -> tuple[str, str | None]: function _lookup_task_execution (line 71) | async def _lookup_task_execution( function tasks_get_handler (line 137) | async def tasks_get_handler(server: FastMCP, params: dict[str, Any]) -> ... function tasks_result_handler (line 222) | async def tasks_result_handler(server: FastMCP, params: dict[str, Any]) ... function tasks_list_handler (line 403) | async def tasks_list_handler( function tasks_cancel_handler (line 421) | async def tasks_cancel_handler( FILE: src/fastmcp/server/tasks/routing.py function check_background_task (line 26) | async def check_background_task( FILE: src/fastmcp/server/tasks/subscriptions.py function subscribe_to_task_updates (line 31) | async def subscribe_to_task_updates( function _send_status_notification (line 93) | async def _send_status_notification( function _send_progress_notification (line 163) | async def _send_progress_notification( FILE: src/fastmcp/server/telemetry.py function get_auth_span_attributes (line 13) | def get_auth_span_attributes() -> dict[str, str]: function get_session_span_attributes (line 30) | def get_session_span_attributes() -> dict[str, str]: function _get_parent_trace_context (line 44) | def _get_parent_trace_context() -> Context | None: function server_span (line 56) | def server_span( function delegate_span (line 100) | def delegate_span( FILE: src/fastmcp/server/transforms/__init__.py class GetToolNext (line 36) | class GetToolNext(Protocol): method __call__ (line 39) | def __call__( class GetResourceNext (line 44) | class GetResourceNext(Protocol): method __call__ (line 47) | def __call__( class GetResourceTemplateNext (line 52) | class GetResourceTemplateNext(Protocol): method __call__ (line 55) | def __call__( class GetPromptNext (line 60) | class GetPromptNext(Protocol): method __call__ (line 63) | def __call__( class Transform (line 68) | class Transform: method __repr__ (line 88) | def __repr__(self) -> str: method list_tools (line 95) | async def list_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 106) | async def get_tool( method list_resources (line 125) | async def list_resources(self, resources: Sequence[Resource]) -> Seque... method get_resource (line 136) | async def get_resource( method list_resource_templates (line 159) | async def list_resource_templates( method get_resource_template (line 172) | async def get_resource_template( method list_prompts (line 195) | async def list_prompts(self, prompts: Sequence[Prompt]) -> Sequence[Pr... method get_prompt (line 206) | async def get_prompt( FILE: src/fastmcp/server/transforms/catalog.py class CatalogTransform (line 65) | class CatalogTransform(Transform): method __init__ (line 79) | def __init__(self) -> None: method list_tools (line 89) | async def list_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method list_resources (line 94) | async def list_resources(self, resources: Sequence[Resource]) -> Seque... method list_resource_templates (line 99) | async def list_resource_templates( method list_prompts (line 106) | async def list_prompts(self, prompts: Sequence[Prompt]) -> Sequence[Pr... method transform_tools (line 115) | async def transform_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method transform_resources (line 127) | async def transform_resources( method transform_resource_templates (line 141) | async def transform_resource_templates( method transform_prompts (line 155) | async def transform_prompts(self, prompts: Sequence[Prompt]) -> Sequen... method get_tool_catalog (line 171) | async def get_tool_catalog( method get_resource_catalog (line 193) | async def get_resource_catalog( method get_prompt_catalog (line 210) | async def get_prompt_catalog( method get_resource_template_catalog (line 227) | async def get_resource_template_catalog( FILE: src/fastmcp/server/transforms/namespace.py class Namespace (line 28) | class Namespace(Transform): method __init__ (line 44) | def __init__(self, prefix: str) -> None: method __repr__ (line 53) | def __repr__(self) -> str: method _transform_name (line 60) | def _transform_name(self, name: str) -> str: method _reverse_name (line 64) | def _reverse_name(self, name: str) -> str | None: method _transform_uri (line 74) | def _transform_uri(self, uri: str) -> str: method _reverse_uri (line 82) | def _reverse_uri(self, uri: str) -> str | None: method list_tools (line 97) | async def list_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 103) | async def get_tool( method list_resources (line 119) | async def list_resources(self, resources: Sequence[Resource]) -> Seque... method get_resource (line 126) | async def get_resource( method list_resource_templates (line 146) | async def list_resource_templates( method get_resource_template (line 155) | async def get_resource_template( method list_prompts (line 177) | async def list_prompts(self, prompts: Sequence[Prompt]) -> Sequence[Pr... method get_prompt (line 183) | async def get_prompt( FILE: src/fastmcp/server/transforms/prompts_as_tools.py class PromptsAsTools (line 38) | class PromptsAsTools(Transform): method __init__ (line 60) | def __init__(self, provider: Provider) -> None: method __repr__ (line 72) | def __repr__(self) -> str: method list_tools (line 75) | async def list_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 83) | async def get_tool( method _make_list_prompts_tool (line 93) | def _make_list_prompts_tool(self) -> Tool: method _make_get_prompt_tool (line 126) | def _make_get_prompt_tool(self) -> Tool: function _format_prompt_result (line 149) | def _format_prompt_result(result: Any) -> str: FILE: src/fastmcp/server/transforms/resources_as_tools.py class ResourcesAsTools (line 41) | class ResourcesAsTools(Transform): method __init__ (line 63) | def __init__(self, provider: Provider) -> None: method __repr__ (line 75) | def __repr__(self) -> str: method list_tools (line 78) | async def list_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 86) | async def get_tool( method _make_list_resources_tool (line 96) | def _make_list_resources_tool(self) -> Tool: method _make_read_resource_tool (line 135) | def _make_read_resource_tool(self) -> Tool: function _format_result (line 156) | def _format_result(result: Any) -> str: FILE: src/fastmcp/server/transforms/search/base.py function _extract_searchable_text (line 41) | def _extract_searchable_text(tool: Tool) -> str: function serialize_tools_for_output_json (line 60) | def serialize_tools_for_output_json(tools: Sequence[Tool]) -> list[dict[... function _invoke_serializer (line 70) | async def _invoke_serializer( function _union_type (line 80) | def _union_type(branches: list[Any]) -> str: function _schema_type (line 90) | def _schema_type(schema: Any) -> str: function _schema_section (line 114) | def _schema_section(schema: dict[str, Any] | None, title: str) -> list[s... function serialize_tools_for_output_markdown (line 138) | def serialize_tools_for_output_markdown(tools: Sequence[Tool]) -> str: class BaseSearchTransform (line 154) | class BaseSearchTransform(CatalogTransform): method __init__ (line 177) | def __init__( method transform_tools (line 199) | async def transform_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 204) | async def get_tool( method _make_search_tool (line 219) | def _make_search_tool(self) -> Tool: method _make_call_tool (line 223) | def _make_call_tool(self) -> Tool: method _render_results (line 250) | async def _render_results(self, tools: Sequence[Tool]) -> Any: method _get_visible_tools (line 257) | async def _get_visible_tools(self, ctx: Context) -> Sequence[Tool]: method _search (line 267) | async def _search(self, tools: Sequence[Tool], query: str) -> Sequence... FILE: src/fastmcp/server/transforms/search/bm25.py function _tokenize (line 18) | def _tokenize(text: str) -> list[str]: class _BM25Index (line 23) | class _BM25Index: method __init__ (line 26) | def __init__(self, k1: float = 1.5, b: float = 0.75) -> None: method build (line 36) | def build(self, documents: list[str]) -> None: method query (line 54) | def query(self, text: str, top_k: int) -> list[int]: function _catalog_hash (line 80) | def _catalog_hash(tools: Sequence[Tool]) -> str: class BM25SearchTransform (line 86) | class BM25SearchTransform(BaseSearchTransform): method __init__ (line 93) | def __init__( method _make_search_tool (line 113) | def _make_search_tool(self) -> Tool: method _search (line 131) | async def _search(self, tools: Sequence[Tool], query: str) -> Sequence... FILE: src/fastmcp/server/transforms/search/regex.py class RegexSearchTransform (line 15) | class RegexSearchTransform(BaseSearchTransform): method _make_search_tool (line 22) | def _make_search_tool(self) -> Tool: method _search (line 42) | async def _search(self, tools: Sequence[Tool], query: str) -> Sequence... FILE: src/fastmcp/server/transforms/tool_transform.py class ToolTransform (line 16) | class ToolTransform(Transform): method __init__ (line 33) | def __init__(self, transforms: dict[str, ToolTransformConfig]) -> None: method __repr__ (line 58) | def __repr__(self) -> str: method list_tools (line 64) | async def list_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 75) | async def get_tool( FILE: src/fastmcp/server/transforms/version_filter.py class VersionFilter (line 24) | class VersionFilter(Transform): method __init__ (line 50) | def __init__( method __repr__ (line 66) | def __repr__(self) -> str: method list_tools (line 80) | async def list_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 87) | async def get_tool( method list_resources (line 96) | async def list_resources(self, resources: Sequence[Resource]) -> Seque... method get_resource (line 103) | async def get_resource( method list_resource_templates (line 116) | async def list_resource_templates( method get_resource_template (line 125) | async def get_resource_template( method list_prompts (line 138) | async def list_prompts(self, prompts: Sequence[Prompt]) -> Sequence[Pr... method get_prompt (line 145) | async def get_prompt( FILE: src/fastmcp/server/transforms/visibility.py class Visibility (line 39) | class Visibility(Transform): method __init__ (line 60) | def __init__( method __repr__ (line 92) | def __repr__(self) -> str: method _matches (line 111) | def _matches(self, component: FastMCPComponent) -> bool: method _mark_component (line 173) | def _mark_component(self, component: T) -> T: method list_tools (line 196) | async def list_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 200) | async def get_tool( method list_resources (line 213) | async def list_resources(self, resources: Sequence[Resource]) -> Seque... method get_resource (line 217) | async def get_resource( method list_resource_templates (line 234) | async def list_resource_templates( method get_resource_template (line 240) | async def get_resource_template( method list_prompts (line 257) | async def list_prompts(self, prompts: Sequence[Prompt]) -> Sequence[Pr... method get_prompt (line 261) | async def get_prompt( function is_enabled (line 271) | def is_enabled(component: FastMCPComponent) -> bool: function get_visibility_rules (line 300) | async def get_visibility_rules(context: Context) -> list[dict[str, Any]]: function save_visibility_rules (line 305) | async def save_visibility_rules( function create_visibility_transforms (line 332) | def create_visibility_transforms(rules: list[dict[str, Any]]) -> list[Vi... function get_session_transforms (line 360) | async def get_session_transforms(context: Context) -> list[Visibility]: function enable_components (line 372) | async def enable_components( function disable_components (line 426) | async def disable_components( function reset_visibility (line 480) | async def reset_visibility(context: Context) -> None: function apply_session_transforms (line 497) | async def apply_session_transforms( FILE: src/fastmcp/settings.py class DocketSettings (line 33) | class DocketSettings(BaseSettings): class Settings (line 136) | class Settings(BaseSettings): method get_setting (line 148) | def get_setting(self, attr: str) -> Any: method set_setting (line 161) | def set_setting(self, attr: str, value: Any) -> None: method normalize_log_level (line 183) | def normalize_log_level(cls, v): FILE: src/fastmcp/telemetry.py function get_tracer (line 38) | def get_tracer(version: str | None = None) -> Tracer: function inject_trace_context (line 50) | def inject_trace_context( function record_span_error (line 76) | def record_span_error(span: Span, exception: BaseException) -> None: function extract_trace_context (line 82) | def extract_trace_context(meta: dict[str, Any] | None) -> Context: FILE: src/fastmcp/tools/base.py function default_serializer (line 64) | def default_serializer(data: Any) -> str: class ToolResult (line 68) | class ToolResult(BaseModel): method __init__ (line 79) | def __init__( method to_mcp_result (line 123) | def to_mcp_result( class Tool (line 139) | class Tool(FastMCPComponent): method _validate_tool_name (line 176) | def _validate_tool_name(self) -> Tool: method to_mcp_tool (line 181) | def to_mcp_tool( method from_function (line 208) | def from_function( method run (line 248) | async def run(self, arguments: dict[str, Any]) -> ToolResult: method convert_result (line 260) | def convert_result(self, raw_value: Any) -> ToolResult: method _run (line 308) | async def _run( method _run (line 315) | async def _run( method _run (line 321) | async def _run( method register_with_docket (line 359) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 365) | async def add_to_docket( # type: ignore[override] method from_tool (line 389) | def from_tool( method _ensure_tool (line 423) | def _ensure_tool(cls, tool: Tool | Callable[..., Any]) -> Tool: method get_span_attributes (line 437) | def get_span_attributes(self) -> dict[str, Any]: function _serialize_with_fallback (line 444) | def _serialize_with_fallback( function _convert_to_single_content_block (line 460) | def _convert_to_single_content_block( function _get_tool_resolver (line 485) | def _get_tool_resolver() -> Callable[..., str] | None: function _prefab_to_json (line 495) | def _prefab_to_json(app: Any) -> dict[str, Any]: function _prefab_to_tool_result (line 500) | def _prefab_to_tool_result(app: Any) -> ToolResult: function _convert_to_content (line 508) | def _convert_to_content( function __getattr__ (line 540) | def __getattr__(name: str) -> Any: FILE: src/fastmcp/tools/function_parsing.py function _contains_prefab_type (line 42) | def _contains_prefab_type(tp: Any) -> bool: class _WrappedResult (line 58) | class _WrappedResult(Generic[T]): class _UnserializableType (line 64) | class _UnserializableType: function _is_object_schema (line 68) | def _is_object_schema( class ParsedFunction (line 117) | class ParsedFunction: method from_function (line 126) | def from_function( FILE: src/fastmcp/tools/function_tool.py class DecoratedTool (line 59) | class DecoratedTool(Protocol): method __call__ (line 64) | def __call__(self, *args: Any, **kwargs: Any) -> Any: ... class ToolMeta (line 68) | class ToolMeta: class FunctionTool (line 90) | class FunctionTool(Tool): method to_mcp_tool (line 94) | def to_mcp_tool( method from_function (line 113) | def from_function( method run (line 256) | async def run(self, arguments: dict[str, Any]) -> ToolResult: method register_with_docket (line 301) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 311) | async def add_to_docket( function tool (line 338) | def tool(fn: F) -> F: ... function tool (line 340) | def tool( function tool (line 358) | def tool( function tool (line 378) | def tool( FILE: src/fastmcp/tools/tool_transform.py function forward (line 41) | async def forward(**kwargs: Any) -> ToolResult: function forward_raw (line 71) | async def forward_raw(**kwargs: Any) -> ToolResult: class ArgTransform (line 98) | class ArgTransform: method __post_init__ (line 176) | def __post_init__(self): class ArgTransformConfig (line 212) | class ArgTransformConfig(FastMCPBaseModel): method to_arg_transform (line 230) | def to_arg_transform(self) -> ArgTransform: class TransformedTool (line 236) | class TransformedTool(Tool): method run (line 265) | async def run(self, arguments: dict[str, Any]) -> ToolResult: method from_tool (line 361) | def from_tool( method _create_forwarding_transform (line 609) | def _create_forwarding_transform( method _apply_single_transform (line 732) | def _apply_single_transform( method _merge_schema_with_precedence (line 801) | def _merge_schema_with_precedence( method _function_has_kwargs (line 880) | def _function_has_kwargs(fn: Callable[..., Any]) -> bool: function _set_visibility_metadata (line 898) | def _set_visibility_metadata(tool: Tool, *, enabled: bool) -> None: class ToolTransformConfig (line 921) | class ToolTransformConfig(FastMCPBaseModel): method apply (line 954) | def apply(self, tool: Tool) -> TransformedTool: function apply_transformations_to_tools (line 975) | def apply_transformations_to_tools( FILE: src/fastmcp/utilities/async_utils.py function is_coroutine_function (line 15) | def is_coroutine_function(fn: Any) -> bool: function call_sync_fn_in_threadpool (line 27) | async def call_sync_fn_in_threadpool( function gather (line 39) | async def gather( function gather (line 46) | async def gather( function gather (line 52) | async def gather( FILE: src/fastmcp/utilities/auth.py function _decode_jwt_part (line 10) | def _decode_jwt_part(token: str, part_index: int) -> dict[str, Any]: function decode_jwt_header (line 32) | def decode_jwt_header(token: str) -> dict[str, Any]: function decode_jwt_payload (line 49) | def decode_jwt_payload(token: str) -> dict[str, Any]: function parse_scopes (line 66) | def parse_scopes(value: Any) -> list[str] | None: FILE: src/fastmcp/utilities/cli.py function is_already_in_uv_subprocess (line 28) | def is_already_in_uv_subprocess() -> bool: function load_and_merge_config (line 33) | def load_and_merge_config( function log_server_banner (line 201) | def log_server_banner(server: FastMCP[Any]) -> None: FILE: src/fastmcp/utilities/components.py class FastMCPMeta (line 20) | class FastMCPMeta(TypedDict, total=False): function get_fastmcp_metadata (line 26) | def get_fastmcp_metadata(meta: dict[str, Any] | None) -> FastMCPMeta: function _convert_set_default_none (line 43) | def _convert_set_default_none(maybe_set: set[T] | Sequence[T] | None) ->... function _coerce_version (line 52) | def _coerce_version(v: str | int | float | None) -> str | None: class FastMCPComponent (line 74) | class FastMCPComponent(FastMCPBaseModel): method __init_subclass__ (line 79) | def __init_subclass__(cls, **kwargs: Any) -> None: method make_key (line 125) | def make_key(cls, identifier: str) -> str: method key (line 139) | def key(self) -> str: method get_meta (line 154) | def get_meta(self) -> dict[str, Any]: method __eq__ (line 182) | def __eq__(self, other: object) -> bool: method __repr__ (line 189) | def __repr__(self) -> str: method enable (line 202) | def enable(self) -> None: method disable (line 209) | def disable(self) -> None: method copy (line 216) | def copy(self) -> Self: # type: ignore[override] method register_with_docket (line 220) | def register_with_docket(self, docket: Docket) -> None: method add_to_docket (line 228) | async def add_to_docket( method get_span_attributes (line 250) | def get_span_attributes(self) -> dict[str, Any]: FILE: src/fastmcp/utilities/exceptions.py function iter_exc (line 12) | def iter_exc(group: BaseExceptionGroup): function _exception_handler (line 20) | def _exception_handler(group: BaseExceptionGroup): function get_catch_handlers (line 42) | def get_catch_handlers() -> Mapping[ FILE: src/fastmcp/utilities/http.py function find_available_port (line 4) | def find_available_port() -> int: FILE: src/fastmcp/utilities/inspect.py class ToolInfo (line 19) | class ToolInfo: class PromptInfo (line 35) | class PromptInfo: class ResourceInfo (line 49) | class ResourceInfo: class TemplateInfo (line 65) | class TemplateInfo: class FastMCPInfo (line 82) | class FastMCPInfo: function inspect_fastmcp_v2 (line 100) | async def inspect_fastmcp_v2(mcp: FastMCP[Any]) -> FastMCPInfo: function inspect_fastmcp_v1 (line 236) | async def inspect_fastmcp_v1(mcp: FastMCP1x) -> FastMCPInfo: function inspect_fastmcp (line 378) | async def inspect_fastmcp(mcp: FastMCP[Any] | FastMCP1x) -> FastMCPInfo: class InspectFormat (line 396) | class InspectFormat(str, Enum): function format_fastmcp_info (line 403) | def format_fastmcp_info(info: FastMCPInfo) -> bytes: function format_mcp_info (line 432) | async def format_mcp_info(mcp: FastMCP[Any] | FastMCP1x) -> bytes: function format_info (line 465) | async def format_info( FILE: src/fastmcp/utilities/json_schema.py function _defs_have_cycles (line 9) | def _defs_have_cycles(defs: dict[str, Any]) -> bool: function _strip_remote_refs (line 56) | def _strip_remote_refs(obj: Any) -> Any: function dereference_refs (line 76) | def dereference_refs(schema: dict[str, Any]) -> dict[str, Any]: function _merge_ref_siblings (line 146) | def _merge_ref_siblings( function resolve_root_ref (line 213) | def resolve_root_ref(schema: dict[str, Any]) -> dict[str, Any]: function _prune_param (line 252) | def _prune_param(schema: dict[str, Any], param: str) -> dict[str, Any]: function _single_pass_optimize (line 273) | def _single_pass_optimize( function compress_schema (line 446) | def compress_schema( FILE: src/fastmcp/utilities/json_schema_type.py class JSONSchema (line 78) | class JSONSchema(TypedDict): function json_schema_to_type (line 111) | def json_schema_to_type( function _hash_schema (line 195) | def _hash_schema(schema: Mapping[str, Any]) -> str: function _resolve_ref (line 200) | def _resolve_ref(ref: str, schemas: Mapping[str, Any]) -> Mapping[str, A... function _create_string_type (line 209) | def _create_string_type(schema: Mapping[str, Any]) -> type | Annotated[A... function _create_numeric_type (line 234) | def _create_numeric_type( function _create_enum (line 256) | def _create_enum(name: str, values: list[Any]) -> type: function _create_array_type (line 262) | def _create_array_type( function _return_Any (line 290) | def _return_Any() -> Any: function _get_from_type_handler (line 294) | def _get_from_type_handler( function _schema_to_type (line 315) | def _schema_to_type( function _sanitize_name (line 400) | def _sanitize_name(name: str) -> str: function _get_default_value (line 418) | def _get_default_value( function _create_field_with_default (line 433) | def _create_field_with_default( function _create_pydantic_model (line 447) | def _create_pydantic_model( function _create_dataclass (line 505) | def _create_dataclass( function _merge_defaults (line 590) | def _merge_defaults( FILE: src/fastmcp/utilities/lifespan.py function combine_lifespans (line 12) | def combine_lifespans( FILE: src/fastmcp/utilities/logging.py function get_logger (line 14) | def get_logger(name: str) -> logging.Logger: function configure_logging (line 29) | def configure_logging( function temporary_log_level (line 111) | def temporary_log_level( class _ClampedLogFilter (line 174) | class _ClampedLogFilter(logging.Filter): method __init__ (line 178) | def __init__( method filter (line 196) | def filter(self, record: logging.LogRecord) -> bool: function _clamp_logger (line 215) | def _clamp_logger( function _unclamp_logger (line 234) | def _unclamp_logger(logger: logging.Logger) -> None: FILE: src/fastmcp/utilities/mcp_server_config/v1/environments/base.py class Environment (line 7) | class Environment(BaseModel, ABC): method build_command (line 13) | def build_command(self, command: list[str]) -> list[str]: method prepare (line 23) | async def prepare(self, output_dir: Path | None = None) -> None: FILE: src/fastmcp/utilities/mcp_server_config/v1/environments/uv.py class UVEnvironment (line 14) | class UVEnvironment(Environment): method build_command (line 49) | def build_command(self, command: list[str]) -> list[str]: method _must_run_with_uv (line 93) | def _must_run_with_uv(self) -> bool: method prepare (line 109) | async def prepare(self, output_dir: Path | None = None) -> None: FILE: src/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py class Deployment (line 36) | class Deployment(BaseModel): method apply_runtime_settings (line 85) | def apply_runtime_settings(self, config_path: Path | None = None) -> N... method _interpolate_env_vars (line 112) | def _interpolate_env_vars(self, value: str) -> str: class MCPServerConfig (line 134) | class MCPServerConfig(BaseModel): method __init__ (line 174) | def __init__(self, *, source: dict | FileSystemSource, **data) -> None... method __init__ (line 176) | def __init__(self, *, environment: dict | UVEnvironment, **data) -> No... method __init__ (line 178) | def __init__(self, *, deployment: dict | Deployment, **data) -> None: ... method __init__ (line 179) | def __init__(self, **data) -> None: ... method validate_source (line 183) | def validate_source(cls, v: dict | Source) -> SourceType: method validate_environment (line 199) | def validate_environment(cls, v: dict | Any) -> EnvironmentType: method validate_deployment (line 210) | def validate_deployment(cls, v: dict | Deployment) -> Deployment: method from_file (line 223) | def from_file(cls, file_path: Path) -> MCPServerConfig: method from_cli_args (line 246) | def from_cli_args( method find_config (line 323) | def find_config(cls, start_path: Path | None = None) -> Path | None: method prepare (line 342) | async def prepare( method prepare_environment (line 363) | async def prepare_environment(self, output_dir: Path | None = None) ->... method prepare_source (line 374) | async def prepare_source(self) -> None: method run_server (line 381) | async def run_server(self, **kwargs: Any) -> None: function generate_schema (line 416) | def generate_schema(output_path: Path | str | None = None) -> dict[str, ... FILE: src/fastmcp/utilities/mcp_server_config/v1/sources/base.py class Source (line 7) | class Source(BaseModel, ABC): method prepare (line 12) | async def prepare(self) -> None: method load_server (line 22) | async def load_server(self) -> Any: FILE: src/fastmcp/utilities/mcp_server_config/v1/sources/filesystem.py class FileSystemSource (line 16) | class FileSystemSource(Source): method parse_path_with_object (line 29) | def parse_path_with_object(cls, v: str) -> str: method __init__ (line 46) | def __init__(self, **data: Any) -> None: method load_server (line 64) | async def load_server(self) -> Any: method _import_module (line 83) | def _import_module(self, file_path: Path) -> Any: method _find_server_object (line 109) | async def _find_server_object(self, module: Any, file_path: Path) -> Any: method _resolve_factory (line 169) | async def _resolve_factory(self, obj: Any, file_path: Path, name: str)... FILE: src/fastmcp/utilities/openapi/director.py class RequestDirector (line 16) | class RequestDirector: method __init__ (line 19) | def __init__(self, spec: SchemaPath): method build (line 23) | def build( method _unflatten_arguments (line 80) | def _unflatten_arguments( method _build_url (line 194) | def _build_url( FILE: src/fastmcp/utilities/openapi/formatters.py function format_array_parameter (line 12) | def format_array_parameter( function format_deep_object_parameter (line 66) | def format_deep_object_parameter( function generate_example_from_schema (line 100) | def generate_example_from_schema(schema: JsonSchema | None) -> Any: function format_json_for_description (line 183) | def format_json_for_description(data: Any, indent: int = 2) -> str: function format_description_with_responses (line 192) | def format_description_with_responses( FILE: src/fastmcp/utilities/openapi/json_schema_converter.py function convert_openapi_schema_to_json_schema (line 38) | def convert_openapi_schema_to_json_schema( function _convert_nullable_field (line 150) | def _convert_nullable_field(schema: dict[str, Any]) -> dict[str, Any]: function _has_read_only_properties (line 186) | def _has_read_only_properties(schema: dict[str, Any]) -> bool: function _has_write_only_properties (line 196) | def _has_write_only_properties(schema: dict[str, Any]) -> bool: function _needs_recursive_processing (line 206) | def _needs_recursive_processing( function _filter_properties_by_access (line 287) | def _filter_properties_by_access( function convert_schema_definitions (line 322) | def convert_schema_definitions( FILE: src/fastmcp/utilities/openapi/models.py class ParameterInfo (line 17) | class ParameterInfo(FastMCPBaseModel): class RequestBodyInfo (line 29) | class RequestBodyInfo(FastMCPBaseModel): class ResponseInfo (line 39) | class ResponseInfo(FastMCPBaseModel): class HTTPRoute (line 47) | class HTTPRoute(FastMCPBaseModel): FILE: src/fastmcp/utilities/openapi/parser.py function parse_openapi_to_http_routes (line 55) | def parse_openapi_to_http_routes(openapi_dict: dict[str, Any]) -> list[H... class OpenAPIParser (line 109) | class OpenAPIParser( method __init__ (line 123) | def __init__( method _convert_to_parameter_location (line 146) | def _convert_to_parameter_location(self, param_in: str) -> ParameterLo... method _resolve_ref (line 153) | def _resolve_ref(self, item: Any) -> Any: method _extract_schema_as_dict (line 208) | def _extract_schema_as_dict(self, schema_obj: Any) -> JsonSchema: method _extract_parameters (line 240) | def _extract_parameters( method _extract_request_body (line 339) | def _extract_request_body(self, request_body_or_ref: Any) -> RequestBo... method _is_success_status_code (line 405) | def _is_success_status_code(self, status_code: str) -> bool: method _get_primary_success_response (line 414) | def _get_primary_success_response( method _extract_responses (line 437) | def _extract_responses( method _extract_schema_dependencies (line 535) | def _extract_schema_dependencies( method _extract_input_schema_dependencies (line 586) | def _extract_input_schema_dependencies( method _extract_output_schema_dependencies (line 622) | def _extract_output_schema_dependencies( method parse (line 663) | def parse(self) -> list[HTTPRoute]: FILE: src/fastmcp/utilities/openapi/schemas.py function clean_schema_for_display (line 12) | def clean_schema_for_display(schema: JsonSchema | None) -> JsonSchema | ... function _replace_ref_with_defs (line 74) | def _replace_ref_with_defs( function _make_optional_parameter_nullable (line 144) | def _make_optional_parameter_nullable(schema: dict[str, Any]) -> dict[st... function _combine_schemas_and_map_params (line 222) | def _combine_schemas_and_map_params( function _combine_schemas (line 457) | def _combine_schemas(route: HTTPRoute) -> dict[str, Any]: function extract_output_schema_from_responses (line 474) | def extract_output_schema_from_responses( FILE: src/fastmcp/utilities/pagination.py class CursorState (line 16) | class CursorState: method encode (line 25) | def encode(self) -> str: method decode (line 31) | def decode(cls, cursor: str) -> CursorState: function paginate_sequence (line 50) | def paginate_sequence( FILE: src/fastmcp/utilities/skills.py class SkillSummary (line 18) | class SkillSummary: class SkillFile (line 27) | class SkillFile: class SkillManifest (line 36) | class SkillManifest: function list_skills (line 43) | async def list_skills(client: Client) -> list[SkillSummary]: function get_skill_manifest (line 87) | async def get_skill_manifest(client: Client, skill_name: str) -> SkillMa... function download_skill (line 127) | async def download_skill( function sync_skills (line 218) | async def sync_skills( FILE: src/fastmcp/utilities/tests.py function temporary_settings (line 24) | def temporary_settings(**kwargs: Any): function _run_server (line 56) | def _run_server(mcp_server: FastMCP, transport: Literal["sse"], port: in... function run_server_in_process (line 75) | def run_server_in_process( function run_server_async (line 143) | async def run_server_async( class HeadlessOAuth (line 225) | class HeadlessOAuth(OAuth): method __init__ (line 233) | def __init__(self, mcp_url: str, **kwargs): method redirect_handler (line 238) | async def redirect_handler(self, authorization_url: str) -> None: method callback_handler (line 244) | async def callback_handler(self) -> tuple[str, str | None]: FILE: src/fastmcp/utilities/timeout.py function normalize_timeout_to_timedelta (line 8) | def normalize_timeout_to_timedelta( function normalize_timeout_to_seconds (line 28) | def normalize_timeout_to_seconds( FILE: src/fastmcp/utilities/token_cache.py class _CacheEntry (line 39) | class _CacheEntry: class TokenCache (line 46) | class TokenCache: method __init__ (line 62) | def __init__( method enabled (line 89) | def enabled(self) -> bool: method get (line 95) | def get(self, token: str) -> tuple[bool, AccessToken | None]: method set (line 118) | def set(self, token: str, result: AccessToken) -> None: method _hash_token (line 146) | def _hash_token(token: str) -> str: method _cleanup_expired (line 150) | def _cleanup_expired(self) -> None: method _maybe_cleanup (line 159) | def _maybe_cleanup(self) -> None: method _enforce_size_limit (line 166) | def _enforce_size_limit(self) -> None: FILE: src/fastmcp/utilities/types.py function get_fn_name (line 34) | def get_fn_name(fn: Callable[..., Any]) -> str: class FastMCPBaseModel (line 38) | class FastMCPBaseModel(BaseModel): function get_cached_typeadapter (line 45) | def get_cached_typeadapter(cls: T) -> TypeAdapter[T]: function issubclass_safe (line 123) | def issubclass_safe(cls: type, base: type) -> bool: function is_class_member_of_type (line 133) | def is_class_member_of_type(cls: Any, base: type) -> bool: function find_kwarg_by_type (line 155) | def find_kwarg_by_type(fn: Callable, kwarg_type: type) -> str | None: function create_function_without_params (line 181) | def create_function_without_params( class Image (line 238) | class Image: method __init__ (line 241) | def __init__( method _get_expanded_path (line 260) | def _get_expanded_path(path: str | Path | None) -> Path | None: method _get_mime_type (line 264) | def _get_mime_type(self) -> str: method _get_data (line 278) | def _get_data(self) -> str: method to_image_content (line 289) | def to_image_content( method to_data_uri (line 304) | def to_data_uri(self, mime_type: str | None = None) -> str: class Audio (line 310) | class Audio: method __init__ (line 313) | def __init__( method _get_mime_type (line 331) | def _get_mime_type(self) -> str: method to_audio_content (line 347) | def to_audio_content( class File (line 368) | class File: method __init__ (line 371) | def __init__( method _get_mime_type (line 391) | def _get_mime_type(self) -> str: method to_resource_content (line 407) | def to_resource_content( function replace_type (line 454) | def replace_type(type_, type_map: dict[type, type]): class ContextSamplingFallbackProtocol (line 491) | class ContextSamplingFallbackProtocol(Protocol): method __call__ (line 492) | async def __call__( FILE: src/fastmcp/utilities/ui.py function create_page (line 453) | def create_page( function create_logo (line 501) | def create_logo(icon_url: str | None = None, alt_text: str = "FastMCP") ... function create_status_message (line 516) | def create_status_message(message: str, is_success: bool = True) -> str: function create_info_box (line 539) | def create_info_box( function create_detail_box (line 568) | def create_detail_box(rows: list[tuple[str, str]]) -> str: function create_button_group (line 591) | def create_button_group(buttons: list[tuple[str, str, str]]) -> str: function create_secure_html_response (line 609) | def create_secure_html_response(html: str, status_code: int = 200) -> HT... FILE: src/fastmcp/utilities/version_check.py function _get_cache_path (line 21) | def _get_cache_path(include_prereleases: bool = False) -> Path: function _read_cache (line 29) | def _read_cache(include_prereleases: bool = False) -> tuple[str | None, ... function _write_cache (line 46) | def _write_cache(latest_version: str, include_prereleases: bool = False)... function _fetch_latest_version (line 59) | def _fetch_latest_version(include_prereleases: bool = False) -> str | None: function get_latest_version (line 98) | def get_latest_version(include_prereleases: bool = False) -> str | None: function check_for_newer_version (line 124) | def check_for_newer_version() -> str | None: FILE: src/fastmcp/utilities/versions.py class VersionSpec (line 31) | class VersionSpec: method matches (line 48) | def matches(self, version: str | None, *, match_none: bool = True) -> ... method intersect (line 81) | def intersect(self, other: VersionSpec | None) -> VersionSpec: class VersionKey (line 117) | class VersionKey: method __init__ (line 129) | def __init__(self, version: str | None) -> None: method __eq__ (line 145) | def __eq__(self, other: object) -> bool: method __lt__ (line 160) | def __lt__(self, other: object) -> bool: method __repr__ (line 186) | def __repr__(self) -> str: function parse_version_key (line 190) | def parse_version_key(version: str | None) -> VersionKey: function version_sort_key (line 202) | def version_sort_key(component: FastMCPComponent) -> VersionKey: function compare_versions (line 222) | def compare_versions(a: str | None, b: str | None) -> int: function is_version_greater (line 244) | def is_version_greater(a: str | None, b: str | None) -> bool: function max_version (line 257) | def max_version(a: str | None, b: str | None) -> str | None: function min_version (line 274) | def min_version(a: str | None, b: str | None) -> str | None: function dedupe_with_versions (line 291) | def dedupe_with_versions( FILE: tests/cli/test_cimd_cli.py class TestCIMDCreateCommand (line 15) | class TestCIMDCreateCommand: method test_minimal_output (line 18) | def test_minimal_output(self, capsys: pytest.CaptureFixture[str]): method test_with_client_id (line 32) | def test_with_client_id(self, capsys: pytest.CaptureFixture[str]): method test_with_output_file (line 41) | def test_with_output_file(self, tmp_path): method test_relative_path_resolved (line 53) | def test_relative_path_resolved(self, tmp_path, monkeypatch): method test_with_scope (line 66) | def test_with_scope(self, capsys: pytest.CaptureFixture[str]): method test_with_client_uri (line 75) | def test_with_client_uri(self, capsys: pytest.CaptureFixture[str]): method test_with_logo_uri (line 84) | def test_with_logo_uri(self, capsys: pytest.CaptureFixture[str]): method test_multiple_redirect_uris (line 93) | def test_multiple_redirect_uris(self, capsys: pytest.CaptureFixture[st... method test_no_pretty (line 104) | def test_no_pretty(self, capsys: pytest.CaptureFixture[str]): method test_placeholder_warning_on_stderr (line 116) | def test_placeholder_warning_on_stderr(self, capsys: pytest.CaptureFix... method test_no_warning_with_client_id (line 128) | def test_no_warning_with_client_id(self, capsys: pytest.CaptureFixture... method test_optional_fields_omitted_when_none (line 138) | def test_optional_fields_omitted_when_none( class TestCIMDValidateCommand (line 152) | class TestCIMDValidateCommand: method test_invalid_url_format (line 155) | def test_invalid_url_format(self, capsys: pytest.CaptureFixture[str]): method test_root_path_rejected (line 161) | def test_root_path_rejected(self, capsys: pytest.CaptureFixture[str]): method test_success (line 167) | def test_success(self, capsys: pytest.CaptureFixture[str]): method test_fetch_error (line 188) | def test_fetch_error(self, capsys: pytest.CaptureFixture[str]): method test_validation_error (line 199) | def test_validation_error(self, capsys: pytest.CaptureFixture[str]): FILE: tests/cli/test_cli.py class TestMainCLI (line 10) | class TestMainCLI: method test_app_exists (line 13) | def test_app_exists(self): method test_parse_env_var_valid (line 21) | def test_parse_env_var_valid(self): method test_parse_env_var_invalid (line 31) | def test_parse_env_var_invalid(self): class TestVersionCommand (line 39) | class TestVersionCommand: method test_version_command_execution (line 43) | def test_version_command_execution(self, mock_check): method test_version_command_parsing (line 49) | def test_version_command_parsing(self): method test_version_command_with_copy_flag (line 57) | def test_version_command_with_copy_flag(self): method test_version_command_copy_functionality (line 66) | def test_version_command_copy_functionality( class TestDevCommand (line 91) | class TestDevCommand: method test_dev_inspector_command_parsing (line 94) | def test_dev_inspector_command_parsing(self): method test_dev_inspector_command_parsing_with_new_options (line 119) | def test_dev_inspector_command_parsing_with_new_options(self): class TestRunCommand (line 144) | class TestRunCommand: method test_run_command_parsing_basic (line 147) | def test_run_command_parsing_basic(self): method test_run_command_parsing_with_options (line 161) | def test_run_command_parsing_with_options(self): method test_run_command_parsing_partial_options (line 190) | def test_run_command_parsing_partial_options(self): method test_run_command_parsing_with_new_options (line 212) | def test_run_command_parsing_with_new_options(self): method test_run_command_transport_aliases (line 238) | def test_run_command_transport_aliases(self): method test_run_command_parsing_with_server_args (line 264) | def test_run_command_parsing_with_server_args(self): method test_run_command_parsing_with_mixed_args (line 282) | def test_run_command_parsing_with_mixed_args(self): method test_run_command_parsing_with_positional_server_args (line 306) | def test_run_command_parsing_with_positional_server_args(self): method test_run_command_parsing_server_args_require_delimiter (line 324) | def test_run_command_parsing_server_args_require_delimiter(self): method test_run_command_parsing_project_flag (line 337) | def test_run_command_parsing_project_flag(self): method test_run_command_parsing_skip_source_flag (line 351) | def test_run_command_parsing_skip_source_flag(self): method test_run_command_parsing_project_and_skip_source (line 364) | def test_run_command_parsing_project_and_skip_source(self): method test_show_server_banner_setting (line 380) | def test_show_server_banner_setting(self): class TestWindowsSpecific (line 405) | class TestWindowsSpecific: method test_get_npx_command_windows_cmd (line 409) | def test_get_npx_command_windows_cmd(self, mock_run): method test_get_npx_command_windows_exe (line 427) | def test_get_npx_command_windows_exe(self, mock_run): method test_get_npx_command_windows_cmd_missing (line 444) | def test_get_npx_command_windows_cmd_missing(self, mock_run): method test_get_npx_command_windows_fallback (line 461) | def test_get_npx_command_windows_fallback(self, mock_run): method test_get_npx_command_windows_not_found (line 479) | def test_get_npx_command_windows_not_found(self, mock_run): method test_get_npx_command_unix (line 493) | def test_get_npx_command_unix(self, mock_run): method test_windows_path_parsing_with_colon (line 503) | def test_windows_path_parsing_with_colon(self, tmp_path): class TestInspectCommand (line 528) | class TestInspectCommand: method test_inspect_command_parsing_basic (line 531) | def test_inspect_command_parsing_basic(self): method test_inspect_command_parsing_with_output (line 540) | def test_inspect_command_parsing_with_output(self, tmp_path): method test_inspect_command_text_summary (line 558) | async def test_inspect_command_text_summary(self, tmp_path, capsys): method test_inspect_command_with_real_server (line 594) | async def test_inspect_command_with_real_server(self, tmp_path): FILE: tests/cli/test_client_commands.py class TestCoerceValue (line 35) | class TestCoerceValue: method test_integer (line 36) | def test_integer(self): method test_integer_negative (line 39) | def test_integer_negative(self): method test_integer_invalid (line 42) | def test_integer_invalid(self): method test_number (line 46) | def test_number(self): method test_number_integer_value (line 49) | def test_number_integer_value(self): method test_number_invalid (line 52) | def test_number_invalid(self): method test_boolean_true_variants (line 56) | def test_boolean_true_variants(self): method test_boolean_false_variants (line 60) | def test_boolean_false_variants(self): method test_boolean_invalid (line 64) | def test_boolean_invalid(self): method test_array (line 68) | def test_array(self): method test_array_invalid (line 71) | def test_array_invalid(self): method test_object (line 75) | def test_object(self): method test_string (line 78) | def test_string(self): method test_string_default (line 81) | def test_string_default(self): method test_string_preserves_numeric_looking_values (line 85) | def test_string_preserves_numeric_looking_values(self): class TestParseToolArguments (line 94) | class TestParseToolArguments: method test_basic_key_value (line 105) | def test_basic_key_value(self): method test_input_json_only (line 109) | def test_input_json_only(self): method test_key_value_overrides_input_json (line 113) | def test_key_value_overrides_input_json(self): method test_value_containing_equals (line 119) | def test_value_containing_equals(self): method test_invalid_arg_format_exits (line 123) | def test_invalid_arg_format_exits(self): method test_invalid_input_json_exits (line 127) | def test_invalid_input_json_exits(self): method test_input_json_non_object_exits (line 131) | def test_input_json_non_object_exits(self): method test_single_json_object_as_positional (line 135) | def test_single_json_object_as_positional(self): method test_json_positional_ignored_when_input_json_set (line 141) | def test_json_positional_ignored_when_input_json_set(self): method test_coercion_error_exits (line 146) | def test_coercion_error_exits(self): class TestFormatToolSignature (line 156) | class TestFormatToolSignature: method _make_tool (line 157) | def _make_tool( method test_no_params (line 177) | def test_no_params(self): method test_required_param (line 181) | def test_required_param(self): method test_optional_param_with_default (line 188) | def test_optional_param_with_default(self): method test_optional_param_without_default (line 194) | def test_optional_param_without_default(self): method test_mixed_required_and_optional (line 200) | def test_mixed_required_and_optional(self): method test_with_output_schema (line 211) | def test_with_output_schema(self): method test_anyof_type (line 219) | def test_anyof_type(self): class TestResolveServerSpec (line 232) | class TestResolveServerSpec: method test_http_url (line 233) | def test_http_url(self): method test_https_url (line 239) | def test_https_url(self): method test_python_file_existing (line 244) | def test_python_file_existing(self, tmp_path: Path): method test_json_mcp_config (line 252) | def test_json_mcp_config(self, tmp_path: Path): method test_json_fastmcp_config_exits (line 260) | def test_json_fastmcp_config_exits(self, tmp_path: Path): method test_json_not_found_exits (line 266) | def test_json_not_found_exits(self, tmp_path: Path): method test_directory_exits (line 270) | def test_directory_exits(self, tmp_path: Path): method test_unrecognised_exits (line 275) | def test_unrecognised_exits(self): method test_command_returns_stdio_transport (line 279) | def test_command_returns_stdio_transport(self): method test_command_single_word (line 285) | def test_command_single_word(self): method test_server_spec_and_command_exits (line 291) | def test_server_spec_and_command_exits(self): method test_neither_server_spec_nor_command_exits (line 295) | def test_neither_server_spec_nor_command_exits(self): method test_transport_sse_rewrites_url (line 299) | def test_transport_sse_rewrites_url(self): method test_transport_sse_no_duplicate_suffix (line 303) | def test_transport_sse_no_duplicate_suffix(self): method test_transport_sse_trailing_slash (line 307) | def test_transport_sse_trailing_slash(self): method test_transport_http_leaves_url_unchanged (line 311) | def test_transport_http_leaves_url_unchanged(self): class TestBuildStdioFromCommand (line 321) | class TestBuildStdioFromCommand: method test_simple_command (line 322) | def test_simple_command(self): method test_quoted_args (line 327) | def test_quoted_args(self): method test_empty_command_exits (line 332) | def test_empty_command_exits(self): method test_invalid_shell_syntax_exits (line 336) | def test_invalid_shell_syntax_exits(self): class TestIsHttpTarget (line 346) | class TestIsHttpTarget: method test_http_url (line 347) | def test_http_url(self): method test_https_url (line 350) | def test_https_url(self): method test_file_path (line 353) | def test_file_path(self): method test_stdio_transport (line 356) | def test_stdio_transport(self): method test_mcp_config_dict (line 359) | def test_mcp_config_dict(self): class TestBuildClient (line 369) | class TestBuildClient: method test_http_target_gets_oauth_by_default (line 370) | def test_http_target_gets_oauth_by_default(self): method test_stdio_target_no_auth (line 375) | def test_stdio_target_no_auth(self): method test_explicit_auth_none_disables_oauth (line 381) | def test_explicit_auth_none_disables_oauth(self): method test_mcp_config_no_auth (line 386) | def test_mcp_config_no_auth(self): function _build_test_server (line 398) | def _build_test_server() -> FastMCP: function _patch_client (line 426) | def _patch_client(): class TestListCommandCLI (line 444) | class TestListCommandCLI: method test_list_tools (line 446) | async def test_list_tools(self, capsys: pytest.CaptureFixture[str]): method test_list_json (line 453) | async def test_list_json(self, capsys: pytest.CaptureFixture[str]): method test_list_resources (line 462) | async def test_list_resources(self, capsys: pytest.CaptureFixture[str]): method test_list_prompts (line 468) | async def test_list_prompts(self, capsys: pytest.CaptureFixture[str]): class TestCallCommandCLI (line 474) | class TestCallCommandCLI: method test_call_tool (line 476) | async def test_call_tool(self, capsys: pytest.CaptureFixture[str]): method test_call_tool_json (line 482) | async def test_call_tool_json(self, capsys: pytest.CaptureFixture[str]): method test_call_tool_not_found (line 489) | async def test_call_tool_not_found(self): method test_call_tool_missing_args (line 494) | async def test_call_tool_missing_args(self): method test_call_resource_by_uri (line 499) | async def test_call_resource_by_uri(self, capsys: pytest.CaptureFixtur... method test_call_resource_json (line 505) | async def test_call_resource_json(self, capsys: pytest.CaptureFixture[... method test_call_prompt (line 513) | async def test_call_prompt(self, capsys: pytest.CaptureFixture[str]): method test_call_prompt_json (line 519) | async def test_call_prompt_json(self, capsys: pytest.CaptureFixture[st... method test_call_prompt_not_found (line 528) | async def test_call_prompt_not_found(self): method test_call_missing_target (line 532) | async def test_call_missing_target(self): class TestFormatCallResult (line 542) | class TestFormatCallResult: method test_structured_content_uses_dict_not_data (line 543) | def test_structured_content_uses_dict_not_data( method test_escapes_rich_markup_and_control_chars (line 560) | def test_escapes_rich_markup_and_control_chars( class TestSanitizeUntrustedText (line 578) | class TestSanitizeUntrustedText: method test_sanitize_untrusted_text (line 579) | def test_sanitize_untrusted_text(self): FILE: tests/cli/test_config.py class TestFileSystemSource (line 18) | class TestFileSystemSource: method test_dict_source_minimal (line 21) | def test_dict_source_minimal(self): method test_dict_source_with_entrypoint (line 30) | def test_dict_source_with_entrypoint(self): method test_filesystem_source_entrypoint (line 39) | def test_filesystem_source_entrypoint(self): class TestEnvironment (line 50) | class TestEnvironment: method test_environment_config_fields (line 53) | def test_environment_config_fields(self): method test_needs_uv (line 74) | def test_needs_uv(self): method test_build_uv_run_command (line 96) | def test_build_uv_run_command(self): class TestDeployment (line 132) | class TestDeployment: method test_deployment_config_fields (line 135) | def test_deployment_config_fields(self): method test_apply_runtime_settings (line 161) | def test_apply_runtime_settings(self, tmp_path): method test_env_var_interpolation (line 197) | def test_env_var_interpolation(self, tmp_path): class TestMCPServerConfig (line 246) | class TestMCPServerConfig: method test_minimal_config (line 249) | def test_minimal_config(self): method test_nested_structure (line 265) | def test_nested_structure(self): method test_from_file (line 285) | def test_from_file(self, tmp_path): method test_from_file_with_string_entrypoint (line 308) | def test_from_file_with_string_entrypoint(self, tmp_path): method test_string_entrypoint_with_entrypoint_and_environment (line 324) | def test_string_entrypoint_with_entrypoint_and_environment(self, tmp_p... method test_find_config_in_current_dir (line 350) | def test_find_config_in_current_dir(self, tmp_path): method test_find_config_not_in_parent_dir (line 363) | def test_find_config_not_in_parent_dir(self, tmp_path): method test_find_config_in_specified_dir (line 375) | def test_find_config_in_specified_dir(self, tmp_path): method test_find_config_not_found (line 384) | def test_find_config_not_found(self, tmp_path): method test_invalid_transport (line 389) | def test_invalid_transport(self, tmp_path): method test_optional_sections (line 402) | def test_optional_sections(self): class TestMCPServerConfigRoundtrip (line 437) | class TestMCPServerConfigRoundtrip: method test_roundtrip_preserves_schema (line 443) | def test_roundtrip_preserves_schema(self): method test_roundtrip_with_all_fields (line 450) | def test_roundtrip_with_all_fields(self): FILE: tests/cli/test_cursor.py class TestCursorDeeplinkGeneration (line 18) | class TestCursorDeeplinkGeneration: method test_generate_deeplink_basic (line 21) | def test_generate_deeplink_basic(self): method test_generate_deeplink_with_env_vars (line 49) | def test_generate_deeplink_with_env_vars(self): method test_generate_deeplink_special_characters (line 66) | def test_generate_deeplink_special_characters(self): method test_generate_deeplink_empty_config (line 81) | def test_generate_deeplink_empty_config(self): method test_generate_deeplink_complex_args (line 95) | def test_generate_deeplink_complex_args(self): method test_generate_deeplink_url_injection_protection (line 122) | def test_generate_deeplink_url_injection_protection(self): class TestOpenDeeplink (line 165) | class TestOpenDeeplink: method test_open_deeplink_macos (line 169) | def test_open_deeplink_macos(self, mock_run): method test_open_deeplink_windows (line 181) | def test_open_deeplink_windows(self): method test_open_deeplink_linux (line 193) | def test_open_deeplink_linux(self, mock_run): method test_open_deeplink_failure (line 206) | def test_open_deeplink_failure(self, mock_run): method test_open_deeplink_command_not_found (line 218) | def test_open_deeplink_command_not_found(self, mock_run): method test_open_deeplink_invalid_scheme (line 227) | def test_open_deeplink_invalid_scheme(self): method test_open_deeplink_valid_cursor_scheme (line 238) | def test_open_deeplink_valid_cursor_scheme(self): method test_open_deeplink_empty_url (line 246) | def test_open_deeplink_empty_url(self): method test_open_deeplink_windows_oserror (line 251) | def test_open_deeplink_windows_oserror(self): class TestInstallCursor (line 262) | class TestInstallCursor: method test_install_cursor_success (line 267) | def test_install_cursor_success(self, mock_print, mock_open_deeplink): method test_install_cursor_with_packages (line 286) | def test_install_cursor_with_packages(self, mock_print, mock_open_deep... method test_install_cursor_with_editable (line 315) | def test_install_cursor_with_editable(self, mock_print, mock_open_deep... method test_install_cursor_failure (line 346) | def test_install_cursor_failure(self, mock_print, mock_open_deeplink): method test_install_cursor_workspace_path_is_file (line 360) | def test_install_cursor_workspace_path_is_file(self, tmp_path): method test_install_cursor_deduplicate_packages (line 374) | def test_install_cursor_deduplicate_packages(self): class TestCursorCommand (line 398) | class TestCursorCommand: method test_cursor_command_basic (line 403) | async def test_cursor_command_basic(self, mock_process_args, mock_inst... method test_cursor_command_failure (line 433) | async def test_cursor_command_failure(self, mock_process_args, mock_in... FILE: tests/cli/test_discovery.py function _write_config (line 56) | def _write_config(path: Path, data: dict[str, Any]) -> None: class TestDiscoveredServer (line 66) | class TestDiscoveredServer: method test_qualified_name (line 67) | def test_qualified_name(self): method test_transport_summary_stdio (line 76) | def test_transport_summary_stdio(self): method test_transport_summary_remote (line 85) | def test_transport_summary_remote(self): method test_transport_summary_remote_sse (line 94) | def test_transport_summary_remote_sse(self): class TestParseMcpConfig (line 109) | class TestParseMcpConfig: method test_valid_config (line 110) | def test_valid_config(self, tmp_path: Path): method test_missing_file (line 120) | def test_missing_file(self, tmp_path: Path): method test_invalid_json (line 125) | def test_invalid_json(self, tmp_path: Path): method test_no_mcp_servers_key (line 131) | def test_no_mcp_servers_key(self, tmp_path: Path): method test_empty_mcp_servers (line 137) | def test_empty_mcp_servers(self, tmp_path: Path): method test_remote_server (line 143) | def test_remote_server(self, tmp_path: Path): class TestScanClaudeDesktop (line 157) | class TestScanClaudeDesktop: method test_finds_config (line 158) | def test_finds_config(self, tmp_path: Path, monkeypatch: pytest.Monkey... method test_missing_config (line 177) | def test_missing_config(self, tmp_path: Path, monkeypatch: pytest.Monk... class TestNormalizeServerEntry (line 189) | class TestNormalizeServerEntry: method test_remote_type_becomes_transport (line 190) | def test_remote_type_becomes_transport(self): method test_remote_with_transport_unchanged (line 196) | def test_remote_with_transport_unchanged(self): method test_stdio_type_unchanged (line 201) | def test_stdio_type_unchanged(self): method test_gemini_http_url_becomes_url (line 207) | def test_gemini_http_url_becomes_url(self): method test_gemini_http_url_does_not_override_url (line 213) | def test_gemini_http_url_does_not_override_url(self): function _claude_code_config (line 224) | def _claude_code_config( class TestScanClaudeCode (line 239) | class TestScanClaudeCode: method test_global_servers (line 240) | def test_global_servers(self, tmp_path: Path, monkeypatch: pytest.Monk... method test_project_servers (line 251) | def test_project_servers(self, tmp_path: Path, monkeypatch: pytest.Mon... method test_global_and_project_combined (line 267) | def test_global_and_project_combined( method test_type_normalized_to_transport (line 286) | def test_type_normalized_to_transport( method test_missing_file (line 308) | def test_missing_file(self, tmp_path: Path, monkeypatch: pytest.Monkey... method test_no_matching_project (line 313) | def test_no_matching_project(self, tmp_path: Path, monkeypatch: pytest... class TestScanCursorWorkspace (line 332) | class TestScanCursorWorkspace: method test_finds_config_in_cwd (line 333) | def test_finds_config_in_cwd(self, tmp_path: Path): method test_finds_config_in_parent (line 340) | def test_finds_config_in_parent(self, tmp_path: Path): method test_stops_at_home (line 348) | def test_stops_at_home(self, tmp_path: Path, monkeypatch: pytest.Monke... method test_no_config (line 358) | def test_no_config(self, tmp_path: Path, monkeypatch: pytest.MonkeyPat... class TestScanProjectMcpJson (line 370) | class TestScanProjectMcpJson: method test_finds_config (line 371) | def test_finds_config(self, tmp_path: Path): method test_no_config (line 378) | def test_no_config(self, tmp_path: Path): class TestScanGemini (line 388) | class TestScanGemini: method test_user_level_config (line 389) | def test_user_level_config(self, tmp_path: Path, monkeypatch: pytest.M... method test_project_level_config (line 397) | def test_project_level_config( method test_http_url_normalized (line 408) | def test_http_url_normalized(self, tmp_path: Path, monkeypatch: pytest... method test_missing_config (line 425) | def test_missing_config(self, tmp_path: Path, monkeypatch: pytest.Monk... class TestScanGoose (line 459) | class TestScanGoose: method test_finds_stdio_extensions (line 460) | def test_finds_stdio_extensions( method test_skips_builtin_and_disabled (line 478) | def test_skips_builtin_and_disabled( method test_missing_config (line 493) | def test_missing_config(self, tmp_path: Path, monkeypatch: pytest.Monk... function _suppress_user_scanners (line 505) | def _suppress_user_scanners(monkeypatch: pytest.MonkeyPatch) -> None: class TestDiscoverServers (line 513) | class TestDiscoverServers: method test_combines_sources (line 514) | def test_combines_sources(self, tmp_path: Path, monkeypatch: pytest.Mo... method test_preserves_duplicates (line 531) | def test_preserves_duplicates( class TestResolveName (line 554) | class TestResolveName: method _isolate_scanners (line 556) | def _isolate_scanners(self, tmp_path: Path, monkeypatch: pytest.Monkey... method test_unique_match (line 561) | def test_unique_match(self, tmp_path: Path): method test_qualified_match (line 567) | def test_qualified_match(self, tmp_path: Path): method test_not_found_with_servers (line 573) | def test_not_found_with_servers(self, tmp_path: Path): method test_not_found_no_servers (line 579) | def test_not_found_no_servers(self, tmp_path: Path): method test_ambiguous_name (line 583) | def test_ambiguous_name(self, tmp_path: Path): method test_ambiguous_resolved_by_qualified (line 591) | def test_ambiguous_resolved_by_qualified(self, tmp_path: Path): method test_qualified_not_found (line 599) | def test_qualified_not_found(self, tmp_path: Path): method test_remote_server_resolves_to_http_transport (line 607) | def test_remote_server_resolves_to_http_transport(self, tmp_path: Path): class TestResolveServerSpecNameFallback (line 619) | class TestResolveServerSpecNameFallback: method test_bare_name_resolves (line 620) | def test_bare_name_resolves(self, tmp_path: Path, monkeypatch: pytest.... method test_url_takes_priority_over_name (line 637) | def test_url_takes_priority_over_name(self): class TestIsHttpTargetTransports (line 648) | class TestIsHttpTargetTransports: method test_streamable_http_transport (line 649) | def test_streamable_http_transport(self): method test_sse_transport (line 653) | def test_sse_transport(self): method test_stdio_transport (line 657) | def test_stdio_transport(self): method test_string_url (line 661) | def test_string_url(self): method test_string_non_url (line 664) | def test_string_non_url(self): method test_dict_config (line 667) | def test_dict_config(self): FILE: tests/cli/test_generate_cli.py class TestSchemaToPythonType (line 33) | class TestSchemaToPythonType: method test_simple_string (line 34) | def test_simple_string(self): method test_simple_integer (line 39) | def test_simple_integer(self): method test_simple_number (line 44) | def test_simple_number(self): method test_simple_boolean (line 49) | def test_simple_boolean(self): method test_array_of_strings (line 54) | def test_array_of_strings(self): method test_array_of_integers (line 61) | def test_array_of_integers(self): method test_complex_object (line 68) | def test_complex_object(self): method test_complex_nested_array (line 73) | def test_complex_nested_array(self): method test_union_of_simple_types (line 80) | def test_union_of_simple_types(self): class TestToPythonIdentifier (line 91) | class TestToPythonIdentifier: method test_plain_name (line 92) | def test_plain_name(self): method test_hyphens (line 95) | def test_hyphens(self): method test_dots_and_slashes (line 98) | def test_dots_and_slashes(self): method test_leading_digit (line 101) | def test_leading_digit(self): method test_spaces (line 104) | def test_spaces(self): method test_empty_string (line 107) | def test_empty_string(self): class TestSerializeTransport (line 116) | class TestSerializeTransport: method test_url_string (line 117) | def test_url_string(self): method test_stdio_transport_basic (line 122) | def test_stdio_transport_basic(self): method test_stdio_transport_with_env (line 130) | def test_stdio_transport_with_env(self): method test_dict_passthrough (line 137) | def test_dict_passthrough(self): class TestToolFunctionSource (line 149) | class TestToolFunctionSource: method test_required_param (line 150) | def test_required_param(self): method test_optional_param (line 164) | def test_optional_param(self): method test_param_with_default (line 180) | def test_param_with_default(self): method test_no_params (line 199) | def test_no_params(self): method test_preserves_underscores (line 208) | def test_preserves_underscores(self): method test_sanitizes_tool_name (line 219) | def test_sanitizes_tool_name(self): method test_sanitizes_param_name (line 228) | def test_sanitizes_param_name(self): method test_description_in_docstring (line 240) | def test_description_in_docstring(self): method test_description_with_quotes (line 252) | def test_description_with_quotes(self): method test_array_of_strings_parameter (line 267) | def test_array_of_strings_parameter(self): method test_complex_object_parameter (line 287) | def test_complex_object_parameter(self): method test_nested_array_parameter (line 320) | def test_nested_array_parameter(self): method test_complex_type_with_default (line 347) | def test_complex_type_with_default(self): method test_name_collision_detection (line 368) | def test_name_collision_detection(self): class TestDeriveServerName (line 389) | class TestDeriveServerName: method test_bare_name (line 390) | def test_bare_name(self): method test_qualified_name (line 393) | def test_qualified_name(self): method test_python_file (line 396) | def test_python_file(self): method test_url (line 399) | def test_url(self): method test_trailing_colon (line 402) | def test_trailing_colon(self): class TestGenerateCliScript (line 411) | class TestGenerateCliScript: method _make_tools (line 412) | def _make_tools(self) -> list[mcp.types.Tool]: method test_compiles (line 437) | def test_compiles(self): method test_contains_tool_functions (line 447) | def test_contains_tool_functions(self): method test_contains_generic_commands (line 458) | def test_contains_generic_commands(self): method test_embeds_transport (line 472) | def test_embeds_transport(self): method test_no_tools_still_valid (line 483) | def test_no_tools_still_valid(self): method test_server_name_with_quotes (line 494) | def test_server_name_with_quotes(self): method test_compiles_with_unusual_names (line 508) | def test_compiles_with_unusual_names(self): method test_compiles_with_stdio_transport (line 530) | def test_compiles_with_stdio_transport(self): function _build_test_server (line 548) | def _build_test_server() -> FastMCP: function _patch_client (line 576) | def _patch_client(): class TestGenerateCliCommand (line 593) | class TestGenerateCliCommand: method test_writes_file (line 595) | async def test_writes_file(self, tmp_path: Path): method test_contains_tools (line 603) | async def test_contains_tools(self, tmp_path: Path): method test_default_output_path (line 611) | async def test_default_output_path( method test_error_if_exists (line 619) | async def test_error_if_exists(self, tmp_path: Path): method test_force_overwrites (line 626) | async def test_force_overwrites(self, tmp_path: Path): method test_file_is_executable (line 638) | async def test_file_is_executable(self, tmp_path: Path): method test_writes_skill_file (line 644) | async def test_writes_skill_file(self, tmp_path: Path): method test_skill_contains_tools (line 654) | async def test_skill_contains_tools(self, tmp_path: Path): method test_no_skill_flag (line 664) | async def test_no_skill_flag(self, tmp_path: Path): method test_error_if_skill_exists (line 670) | async def test_error_if_skill_exists(self, tmp_path: Path): method test_force_overwrites_skill (line 677) | async def test_force_overwrites_skill(self, tmp_path: Path): method test_skill_references_cli_filename (line 686) | async def test_skill_references_cli_filename(self, tmp_path: Path): class TestParamToCliFlag (line 698) | class TestParamToCliFlag: method test_simple_name (line 699) | def test_simple_name(self): method test_underscore_name (line 702) | def test_underscore_name(self): method test_hyphenated_name (line 705) | def test_hyphenated_name(self): method test_digit_prefix (line 709) | def test_digit_prefix(self): method test_trailing_underscore (line 713) | def test_trailing_underscore(self): method test_camel_case (line 717) | def test_camel_case(self): method test_pascal_case (line 721) | def test_pascal_case(self): class TestSchemaTypeLabel (line 730) | class TestSchemaTypeLabel: method test_simple_string (line 731) | def test_simple_string(self): method test_integer (line 734) | def test_integer(self): method test_array_of_strings (line 737) | def test_array_of_strings(self): method test_union_types (line 743) | def test_union_types(self): method test_object (line 748) | def test_object(self): method test_missing_type (line 751) | def test_missing_type(self): class TestGenerateSkillContent (line 760) | class TestGenerateSkillContent: method test_frontmatter (line 761) | def test_frontmatter(self): method test_no_tools (line 767) | def test_no_tools(self): method test_tool_sections (line 772) | def test_tool_sections(self): method test_frontmatter_with_tools_starts_at_column_zero (line 795) | def test_frontmatter_with_tools_starts_at_column_zero(self): method test_optional_param (line 805) | def test_optional_param(self): method test_complex_json_param (line 825) | def test_complex_json_param(self): method test_no_params_tool (line 845) | def test_no_params_tool(self): method test_cli_filename_in_utility_commands (line 859) | def test_cli_filename_in_utility_commands(self): method test_pipe_in_description_escaped (line 864) | def test_pipe_in_description_escaped(self): method test_union_type_pipes_escaped (line 880) | def test_union_type_pipes_escaped(self): method test_boolean_param_no_value_placeholder (line 897) | def test_boolean_param_no_value_placeholder(self): method test_server_name_in_header (line 915) | def test_server_name_in_header(self): FILE: tests/cli/test_goose.py class TestSlugify (line 16) | class TestSlugify: method test_simple_name (line 17) | def test_simple_name(self): method test_special_characters (line 20) | def test_special_characters(self): method test_already_slugified (line 23) | def test_already_slugified(self): method test_empty_string (line 26) | def test_empty_string(self): method test_only_special_chars (line 29) | def test_only_special_chars(self): method test_consecutive_hyphens_collapsed (line 32) | def test_consecutive_hyphens_collapsed(self): method test_leading_trailing_stripped (line 35) | def test_leading_trailing_stripped(self): class TestBuildUvxCommand (line 39) | class TestBuildUvxCommand: method test_basic (line 40) | def test_basic(self): method test_with_python_version (line 44) | def test_with_python_version(self): method test_with_packages (line 55) | def test_with_packages(self): method test_fastmcp_not_in_with (line 61) | def test_fastmcp_not_in_with(self): method test_packages_sorted_and_deduplicated (line 68) | def test_packages_sorted_and_deduplicated(self): method test_server_spec_with_object (line 76) | def test_server_spec_with_object(self): class TestGooseDeeplinkGeneration (line 81) | class TestGooseDeeplinkGeneration: method test_basic_deeplink (line 82) | def test_basic_deeplink(self): method test_special_characters_in_name (line 95) | def test_special_characters_in_name(self): method test_url_injection_protection (line 106) | def test_url_injection_protection(self): method test_dangerous_characters_encoded (line 117) | def test_dangerous_characters_encoded(self): method test_custom_description (line 139) | def test_custom_description(self): method test_args_with_special_characters (line 150) | def test_args_with_special_characters(self): method test_empty_args (line 167) | def test_empty_args(self): method test_command_with_path (line 174) | def test_command_with_path(self): class TestInstallGoose (line 185) | class TestInstallGoose: method test_success (line 188) | def test_success(self, mock_print, mock_open): method test_success_uses_uvx (line 203) | def test_success_uses_uvx(self, mock_print, mock_open): method test_failure (line 218) | def test_failure(self, mock_print, mock_open): method test_with_server_object (line 229) | def test_with_server_object(self, mock_print, mock_open): method test_with_packages (line 244) | def test_with_packages(self, mock_print, mock_open): method test_fallback_message_on_failure (line 261) | def test_fallback_message_on_failure(self, mock_print, mock_open): class TestGooseCommand (line 276) | class TestGooseCommand: method test_basic (line 279) | async def test_basic(self, mock_process, mock_install): method test_failure_exits (line 293) | async def test_failure_exits(self, mock_process, mock_install): FILE: tests/cli/test_install.py class TestInstallApp (line 10) | class TestInstallApp: method test_install_app_exists (line 13) | def test_install_app_exists(self): method test_install_commands_registered (line 19) | def test_install_commands_registered(self): class TestClaudeCodeInstall (line 40) | class TestClaudeCodeInstall: method test_claude_code_basic (line 43) | def test_claude_code_basic(self): method test_claude_code_with_options (line 55) | def test_claude_code_with_options(self): method test_claude_code_with_new_options (line 75) | def test_claude_code_with_new_options(self): class TestClaudeDesktopInstall (line 97) | class TestClaudeDesktopInstall: method test_claude_desktop_basic (line 100) | def test_claude_desktop_basic(self): method test_claude_desktop_with_env_vars (line 110) | def test_claude_desktop_with_env_vars(self): method test_claude_desktop_with_new_options (line 127) | def test_claude_desktop_with_new_options(self): method test_claude_desktop_with_config_path (line 148) | def test_claude_desktop_with_config_path(self): method test_claude_desktop_without_config_path (line 156) | def test_claude_desktop_without_config_path(self): class TestCursorInstall (line 163) | class TestCursorInstall: method test_cursor_basic (line 166) | def test_cursor_basic(self): method test_cursor_with_options (line 176) | def test_cursor_with_options(self): class TestGooseInstall (line 186) | class TestGooseInstall: method test_goose_basic (line 189) | def test_goose_basic(self): method test_goose_with_options (line 199) | def test_goose_with_options(self): method test_goose_with_python (line 219) | def test_goose_with_python(self): class TestMcpJsonInstall (line 233) | class TestMcpJsonInstall: method test_mcp_json_basic (line 236) | def test_mcp_json_basic(self): method test_mcp_json_with_copy (line 246) | def test_mcp_json_with_copy(self): class TestStdioInstall (line 255) | class TestStdioInstall: method test_stdio_basic (line 258) | def test_stdio_basic(self): method test_stdio_with_copy (line 265) | def test_stdio_with_copy(self): method test_stdio_with_packages (line 271) | def test_stdio_with_packages(self): method test_install_stdio_generates_command (line 279) | def test_install_stdio_generates_command(self, tmp_path: Path): method test_install_stdio_with_object (line 302) | def test_install_stdio_with_object(self, tmp_path: Path): class TestGeminiCliInstall (line 323) | class TestGeminiCliInstall: method test_gemini_cli_basic (line 326) | def test_gemini_cli_basic(self): method test_gemini_cli_with_options (line 338) | def test_gemini_cli_with_options(self): method test_gemini_cli_with_new_options (line 358) | def test_gemini_cli_with_new_options(self): class TestInstallCommandParsing (line 380) | class TestInstallCommandParsing: method test_install_minimal_args (line 383) | def test_install_minimal_args(self): method test_mcp_json_minimal (line 400) | def test_mcp_json_minimal(self): method test_stdio_minimal (line 407) | def test_stdio_minimal(self): method test_python_option (line 413) | def test_python_option(self): method test_with_requirements_option (line 430) | def test_with_requirements_option(self): method test_project_option (line 446) | def test_project_option(self): class TestServerNameValidation (line 463) | class TestServerNameValidation: method test_valid_names (line 476) | def test_valid_names(self, name: str): method test_rejects_shell_metacharacters (line 492) | def test_rejects_shell_metacharacters(self, name: str): FILE: tests/cli/test_mcp_server_config_integration.py function server_with_config (line 14) | def server_with_config(tmp_path): class TestConfigFileDetection (line 55) | class TestConfigFileDetection: method test_detect_standard_fastmcp_json (line 58) | def test_detect_standard_fastmcp_json(self, tmp_path): method test_detect_prefixed_fastmcp_json (line 67) | def test_detect_prefixed_fastmcp_json(self, tmp_path): method test_detect_test_fastmcp_json (line 75) | def test_detect_test_fastmcp_json(self, tmp_path): class TestConfigWithClient (line 84) | class TestConfigWithClient: method test_config_server_with_client (line 87) | async def test_config_server_with_client(self, server_with_config): class TestEnvironmentExecution (line 132) | class TestEnvironmentExecution: method test_needs_uv_with_dependencies (line 135) | def test_needs_uv_with_dependencies(self): method test_needs_uv_with_python_version (line 145) | def test_needs_uv_with_python_version(self): method test_no_uv_needed_without_environment (line 155) | def test_no_uv_needed_without_environment(self): method test_no_uv_needed_with_empty_environment (line 163) | def test_no_uv_needed_with_empty_environment(self): class TestPathResolution (line 174) | class TestPathResolution: method test_source_path_resolution (line 177) | def test_source_path_resolution(self, tmp_path): method test_cwd_path_resolution (line 195) | def test_cwd_path_resolution(self, tmp_path): method test_requirements_path_resolution (line 221) | def test_requirements_path_resolution(self, tmp_path): class TestConfigValidation (line 243) | class TestConfigValidation: method test_invalid_transport_rejected (line 246) | def test_invalid_transport_rejected(self): method test_streamable_http_transport_accepted (line 254) | def test_streamable_http_transport_accepted(self): method test_invalid_log_level_rejected (line 262) | def test_invalid_log_level_rejected(self): method test_missing_source_rejected (line 270) | def test_missing_source_rejected(self): method test_valid_transport_values (line 275) | def test_valid_transport_values(self): method test_valid_log_levels (line 285) | def test_valid_log_levels(self): FILE: tests/cli/test_mcp_server_config_schema.py function test_schema_has_correct_id (line 11) | def test_schema_has_correct_id(): function test_schema_has_required_fields (line 23) | def test_schema_has_required_fields(): function test_schema_nested_structure (line 37) | def test_schema_nested_structure(): function test_schema_transport_enum (line 83) | def test_schema_transport_enum(): function test_schema_log_level_enum (line 120) | def test_schema_log_level_enum(): function test_transport_values_accepted (line 169) | def test_transport_values_accepted(transport): FILE: tests/cli/test_project_prepare.py class TestMCPServerConfigPrepare (line 14) | class TestMCPServerConfigPrepare: method test_prepare_calls_both_methods (line 25) | async def test_prepare_calls_both_methods(self, mock_env, mock_src): method test_prepare_with_output_dir (line 45) | async def test_prepare_with_output_dir(self, mock_env, mock_src): method test_prepare_skip_source (line 66) | async def test_prepare_skip_source(self, mock_env, mock_src): method test_prepare_no_environment_settings (line 86) | async def test_prepare_no_environment_settings(self, mock_env_prepare,... class TestEnvironmentPrepare (line 100) | class TestEnvironmentPrepare: method test_prepare_no_uv_installed (line 104) | async def test_prepare_no_uv_installed(self, mock_which, tmp_path): method test_prepare_no_settings (line 115) | async def test_prepare_no_settings(self, mock_which, mock_run, tmp_path): method test_prepare_with_python (line 128) | async def test_prepare_with_python(self, mock_which, mock_run, tmp_path): method test_prepare_with_dependencies (line 149) | async def test_prepare_with_dependencies(self, mock_which, mock_run, t... method test_prepare_command_fails (line 176) | async def test_prepare_command_fails(self, mock_which, mock_run, tmp_p... class TestProjectPrepareCommand (line 189) | class TestProjectPrepareCommand: method test_project_prepare_auto_detect (line 194) | async def test_project_prepare_auto_detect(self, mock_find, mock_from_... method test_project_prepare_explicit_path (line 225) | async def test_project_prepare_explicit_path(self, mock_from_file, moc... method test_project_prepare_no_config_found (line 248) | async def test_project_prepare_no_config_found(self, mock_find): method test_project_prepare_config_not_exists (line 267) | async def test_project_prepare_config_not_exists(self, mock_exists): method test_project_prepare_failure (line 287) | async def test_project_prepare_failure(self, mock_from_file, mock_exis... FILE: tests/cli/test_run.py class TestUrlDetection (line 24) | class TestUrlDetection: method test_is_url_valid_http (line 27) | def test_is_url_valid_http(self): method test_is_url_valid_https (line 33) | def test_is_url_valid_https(self): method test_is_url_invalid (line 39) | def test_is_url_invalid(self): class TestFileSystemSource (line 48) | class TestFileSystemSource: method test_parse_simple_path (line 51) | def test_parse_simple_path(self, tmp_path): method test_parse_path_with_object (line 60) | def test_parse_path_with_object(self, tmp_path): method test_parse_complex_object (line 69) | def test_parse_complex_object(self, tmp_path): method test_load_server_nonexistent (line 84) | async def test_load_server_nonexistent(self): method test_load_server_directory (line 92) | async def test_load_server_directory(self, tmp_path): class TestMCPConfig (line 101) | class TestMCPConfig: method test_run_mcp_config (line 104) | async def test_run_mcp_config(self, tmp_path: Path): method test_validate_mcp_config (line 139) | async def test_validate_mcp_config(self, tmp_path: Path): class TestServerImport (line 152) | class TestServerImport: method test_import_server_basic_mcp (line 155) | async def test_import_server_basic_mcp(self, tmp_path): method test_import_server_with_main_block (line 174) | async def test_import_server_with_main_block(self, tmp_path): method test_import_server_standard_names (line 196) | async def test_import_server_standard_names(self, tmp_path): method test_import_server_nonstandard_name (line 231) | async def test_import_server_nonstandard_name(self, tmp_path): method test_import_server_no_standard_names_fails (line 250) | async def test_import_server_no_standard_names_fails(self, tmp_path): method test_import_server_nonexistent_object_fails (line 265) | async def test_import_server_nonexistent_object_fails(self, tmp_path): class TestV1ServerAsync (line 282) | class TestV1ServerAsync: method test_run_v1_server_stdio (line 285) | async def test_run_v1_server_stdio(self, tmp_path): method test_run_v1_server_http (line 318) | async def test_run_v1_server_http(self, tmp_path): method test_run_v1_server_streamable_http (line 351) | async def test_run_v1_server_streamable_http(self, tmp_path): method test_run_v1_server_sse (line 384) | async def test_run_v1_server_sse(self, tmp_path): method test_run_v1_server_default_transport (line 417) | async def test_run_v1_server_default_transport(self, tmp_path): method test_run_v1_server_with_host_port (line 450) | async def test_run_v1_server_with_host_port(self, tmp_path): class TestSkipSource (line 486) | class TestSkipSource: method test_run_command_calls_prepare_by_default (line 489) | async def test_run_command_calls_prepare_by_default(self, tmp_path): method test_run_command_skips_prepare_with_flag (line 520) | async def test_run_command_skips_prepare_with_flag(self, tmp_path): method test_filesystem_source_prepare_by_default (line 551) | async def test_filesystem_source_prepare_by_default(self, tmp_path): method test_filesystem_source_skip_prepare_with_flag (line 580) | async def test_filesystem_source_skip_prepare_with_flag(self, tmp_path): class TestReloadFunctionality (line 610) | class TestReloadFunctionality: method test_watch_filter_accepts_watched_extensions (line 613) | def test_watch_filter_accepts_watched_extensions(self): method test_watch_filter_rejects_unwatched_extensions (line 641) | def test_watch_filter_rejects_unwatched_extensions(self): method test_all_watched_extensions_are_accepted (line 653) | def test_all_watched_extensions_are_accepted(self): method test_watched_extensions_includes_frontend_types (line 665) | def test_watched_extensions_includes_frontend_types(self): class TestRunModuleCommand (line 705) | class TestRunModuleCommand: method test_runs_python_m_module (line 708) | def test_runs_python_m_module(self): method test_forwards_extra_args (line 727) | def test_forwards_extra_args(self): method test_uses_env_command_builder (line 744) | def test_uses_env_command_builder(self): method test_exits_with_subprocess_error_code (line 768) | def test_exits_with_subprocess_error_code(self): method test_no_env_builder_runs_plain_python (line 781) | def test_no_env_builder_runs_plain_python(self): class TestRunModuleMode (line 800) | class TestRunModuleMode: method test_run_module_mode_requires_server_spec (line 803) | async def test_run_module_mode_requires_server_spec(self): method test_run_module_mode_warns_ignored_options (line 810) | async def test_run_module_mode_warns_ignored_options(self, caplog): method test_run_module_mode_delegates_to_run_module_command (line 830) | async def test_run_module_mode_delegates_to_run_module_command(self): method test_run_module_mode_with_reload (line 847) | async def test_run_module_mode_with_reload(self): class TestInspectorModuleMode (line 862) | class TestInspectorModuleMode: method test_inspector_module_mode_skips_load_server (line 865) | async def test_inspector_module_mode_skips_load_server(self): FILE: tests/cli/test_run_config.py function sample_config (line 19) | def sample_config(tmp_path): function test_load_mcp_server_config (line 46) | def test_load_mcp_server_config(sample_config, monkeypatch): function test_load_config_with_entrypoint_source (line 82) | def test_load_config_with_entrypoint_source(tmp_path): function test_load_config_with_cwd (line 109) | def test_load_config_with_cwd(tmp_path): function test_load_config_with_relative_cwd (line 138) | def test_load_config_with_relative_cwd(tmp_path): function test_load_minimal_config (line 172) | def test_load_minimal_config(tmp_path): function test_load_config_with_server_args (line 190) | def test_load_config_with_server_args(tmp_path): function test_load_config_with_log_level (line 209) | def test_load_config_with_log_level(tmp_path): function test_load_config_with_various_log_levels (line 228) | def test_load_config_with_various_log_levels(tmp_path): function test_config_subset_independence (line 250) | def test_config_subset_independence(tmp_path): function test_environment_config_path_resolution (line 281) | def test_environment_config_path_resolution(tmp_path): FILE: tests/cli/test_server_args.py class TestServerArguments (line 11) | class TestServerArguments: method test_server_with_argparse (line 14) | async def test_server_with_argparse(self, tmp_path): method test_server_with_no_args (line 55) | async def test_server_with_no_args(self, tmp_path): method test_server_with_sys_argv_access (line 80) | async def test_server_with_sys_argv_access(self, tmp_path): method test_config_server_example (line 112) | async def test_config_server_example(self): FILE: tests/cli/test_shared.py class TestEnvVarParsing (line 4) | class TestEnvVarParsing: method test_parse_env_var_simple (line 7) | def test_parse_env_var_simple(self): method test_parse_env_var_with_equals_in_value (line 13) | def test_parse_env_var_with_equals_in_value(self): method test_parse_env_var_with_spaces (line 19) | def test_parse_env_var_with_spaces(self): method test_parse_env_var_empty_value (line 25) | def test_parse_env_var_empty_value(self): FILE: tests/cli/test_tasks.py class TestCheckDistributedBackend (line 9) | class TestCheckDistributedBackend: method test_succeeds_with_redis_url (line 12) | def test_succeeds_with_redis_url(self): method test_exits_with_helpful_error_for_memory_url (line 17) | def test_exits_with_helpful_error_for_memory_url(self): class TestWorkerCommand (line 27) | class TestWorkerCommand: method test_worker_command_parsing (line 30) | def test_worker_command_parsing(self): class TestTasksAppIntegration (line 38) | class TestTasksAppIntegration: method test_tasks_app_exists (line 41) | def test_tasks_app_exists(self): method test_tasks_app_has_commands (line 46) | def test_tasks_app_has_commands(self): FILE: tests/cli/test_with_argv.py class TestWithArgv (line 11) | class TestWithArgv: method test_with_argv_replaces_args (line 14) | def test_with_argv_replaces_args(self): method test_with_argv_none_does_nothing (line 27) | def test_with_argv_none_does_nothing(self): method test_with_argv_empty_list (line 36) | def test_with_argv_empty_list(self): method test_with_argv_restores_on_exception (line 47) | def test_with_argv_restores_on_exception(self): method test_with_argv_nested (line 60) | def test_with_argv_nested(self): method test_with_argv_with_existing_args (line 79) | def test_with_argv_with_existing_args(self): FILE: tests/client/auth/test_oauth_cimd.py class TestOAuthClientMetadataURL (line 18) | class TestOAuthClientMetadataURL: method test_stored_on_instance (line 21) | def test_stored_on_instance(self): method test_none_by_default (line 25) | def test_none_by_default(self): method test_passed_to_parent_on_bind (line 29) | def test_passed_to_parent_on_bind(self): method test_none_metadata_url_on_parent (line 36) | def test_none_metadata_url_on_parent(self): method test_unbound_when_no_mcp_url (line 42) | def test_unbound_when_no_mcp_url(self): method test_bound_when_mcp_url_provided (line 46) | def test_bound_when_mcp_url_provided(self): method test_invalid_cimd_url_rejected (line 55) | def test_invalid_cimd_url_rejected(self): method test_root_path_cimd_url_rejected (line 63) | def test_root_path_cimd_url_rejected(self): class TestOAuthBind (line 71) | class TestOAuthBind: method test_bind_sets_bound_true (line 74) | def test_bind_sets_bound_true(self): method test_bind_idempotent (line 82) | def test_bind_idempotent(self): method test_bind_sets_mcp_url (line 92) | def test_bind_sets_mcp_url(self): method test_bind_creates_token_storage (line 100) | def test_bind_creates_token_storage(self): method test_unbound_raises_runtime_error (line 108) | async def test_unbound_raises_runtime_error(self): method test_scopes_forwarded_as_list (line 116) | def test_scopes_forwarded_as_list(self): method test_scopes_forwarded_as_string (line 126) | def test_scopes_forwarded_as_string(self): class TestOAuthBindFromTransport (line 137) | class TestOAuthBindFromTransport: method test_http_transport_binds_oauth (line 140) | def test_http_transport_binds_oauth(self): method test_sse_transport_binds_oauth (line 149) | def test_sse_transport_binds_oauth(self): method test_http_transport_oauth_string_still_works (line 158) | def test_http_transport_oauth_string_still_works(self): FILE: tests/client/auth/test_oauth_client.py function fastmcp_server (line 18) | def fastmcp_server(issuer_url: str): function streamable_http_server (line 44) | async def streamable_http_server(): function client_unauthorized (line 53) | def client_unauthorized(streamable_http_server: str) -> Client: function client_with_headless_oauth (line 58) | def client_with_headless_oauth(streamable_http_server: str) -> Client: function test_unauthorized (line 66) | async def test_unauthorized(client_unauthorized: Client): function test_ping (line 73) | async def test_ping(client_with_headless_oauth: Client): function test_list_tools (line 79) | async def test_list_tools(client_with_headless_oauth: Client): function test_call_tool (line 87) | async def test_call_tool(client_with_headless_oauth: Client): function test_list_resources (line 96) | async def test_list_resources(client_with_headless_oauth: Client): function test_read_resource (line 104) | async def test_read_resource(client_with_headless_oauth: Client): function test_oauth_server_metadata_discovery (line 112) | async def test_oauth_server_metadata_discovery(streamable_http_server: s... class TestOAuthClientUrlHandling (line 133) | class TestOAuthClientUrlHandling: method test_oauth_preserves_full_url_with_path (line 136) | def test_oauth_preserves_full_url_with_path(self): method test_oauth_preserves_root_url (line 152) | def test_oauth_preserves_root_url(self): method test_oauth_normalizes_trailing_slash (line 160) | def test_oauth_normalizes_trailing_slash(self): method test_oauth_token_storage_uses_full_url (line 170) | def test_oauth_token_storage_uses_full_url(self): class TestOAuthGeneratorCleanup (line 179) | class TestOAuthGeneratorCleanup: method test_generator_closed_on_successful_flow (line 188) | async def test_generator_closed_on_successful_flow(self): method test_generator_closed_on_exception (line 241) | async def test_generator_closed_on_exception(self): class TestTokenStorageTTL (line 283) | class TestTokenStorageTTL: method test_token_storage_uses_long_ttl (line 292) | async def test_token_storage_uses_long_ttl(self): method test_token_storage_preserves_refresh_token (line 333) | async def test_token_storage_preserves_refresh_token(self): FILE: tests/client/auth/test_oauth_static_client.py class TestStaticClientInfoConstruction (line 21) | class TestStaticClientInfoConstruction: method test_static_client_info_includes_metadata (line 24) | def test_static_client_info_includes_metadata(self): method test_static_client_info_without_secret (line 48) | def test_static_client_info_without_secret(self): method test_no_static_client_info_without_client_id (line 64) | def test_no_static_client_info_without_client_id(self): method test_static_client_info_includes_additional_metadata (line 69) | def test_static_client_info_includes_additional_metadata(self): class TestStaticClientInitialize (line 84) | class TestStaticClientInitialize: method test_initialize_sets_context_client_info (line 87) | async def test_initialize_sets_context_client_info(self): method test_initialize_persists_static_client_to_storage (line 103) | async def test_initialize_persists_static_client_to_storage(self): method test_initialize_without_static_creds_works (line 119) | async def test_initialize_without_static_creds_works(self): class TestStaticClientRetryBehavior (line 130) | class TestStaticClientRetryBehavior: method test_retry_skipped_with_static_creds (line 133) | async def test_retry_skipped_with_static_creds(self): method test_retry_still_works_without_static_creds (line 153) | async def test_retry_still_works_without_static_creds(self): class TestStaticClientE2E (line 176) | class TestStaticClientE2E: method test_static_client_with_dcr_disabled (line 179) | async def test_static_client_with_dcr_disabled(self): method test_static_client_with_dcr_enabled (line 229) | async def test_static_client_with_dcr_enabled(self): FILE: tests/client/client/test_auth.py class TestAuth (line 15) | class TestAuth: method test_default_auth_is_none (line 16) | def test_default_auth_is_none(self): method test_stdio_doesnt_support_auth (line 20) | def test_stdio_doesnt_support_auth(self): method test_oauth_literal_sets_up_oauth_shttp (line 24) | def test_oauth_literal_sets_up_oauth_shttp(self): method test_oauth_literal_pass_direct_to_transport (line 31) | def test_oauth_literal_pass_direct_to_transport(self): method test_oauth_literal_sets_up_oauth_sse (line 38) | def test_oauth_literal_sets_up_oauth_sse(self): method test_oauth_literal_pass_direct_to_transport_sse (line 43) | def test_oauth_literal_pass_direct_to_transport_sse(self): method test_auth_string_sets_up_bearer_auth_shttp (line 48) | def test_auth_string_sets_up_bearer_auth_shttp(self): method test_auth_string_pass_direct_to_transport_shttp (line 57) | def test_auth_string_pass_direct_to_transport_shttp(self): method test_auth_string_sets_up_bearer_auth_sse (line 67) | def test_auth_string_sets_up_bearer_auth_sse(self): method test_auth_string_pass_direct_to_transport_sse (line 76) | def test_auth_string_pass_direct_to_transport_sse(self): FILE: tests/client/client/test_client.py function test_list_tools (line 23) | async def test_list_tools(fastmcp_server): function test_list_tools_mcp (line 35) | async def test_list_tools_mcp(fastmcp_server): function test_call_tool (line 48) | async def test_call_tool(fastmcp_server): function test_call_tool_mcp (line 62) | async def test_call_tool_mcp(fastmcp_server): function test_call_tool_with_meta (line 82) | async def test_call_tool_with_meta(): function test_list_resources (line 123) | async def test_list_resources(fastmcp_server): function test_list_resources_mcp (line 135) | async def test_list_resources_mcp(fastmcp_server): function test_list_prompts (line 148) | async def test_list_prompts(fastmcp_server): function test_list_prompts_mcp (line 160) | async def test_list_prompts_mcp(fastmcp_server): function test_get_prompt (line 173) | async def test_get_prompt(fastmcp_server): function test_get_prompt_mcp (line 186) | async def test_get_prompt_mcp(fastmcp_server): function test_client_serializes_all_non_string_arguments (line 199) | async def test_client_serializes_all_non_string_arguments(): function test_client_server_type_conversion_integration (line 227) | async def test_client_server_type_conversion_integration(): function test_client_serialization_error (line 249) | async def test_client_serialization_error(): function test_server_deserialization_error (line 273) | async def test_server_deserialization_error(): function test_read_resource_invalid_uri (line 295) | async def test_read_resource_invalid_uri(fastmcp_server): function test_read_resource (line 302) | async def test_read_resource(fastmcp_server): function test_read_resource_mcp (line 320) | async def test_read_resource_mcp(fastmcp_server): function test_client_connection (line 340) | async def test_client_connection(fastmcp_server): function test_initialize_called_once (line 352) | async def test_initialize_called_once(fastmcp_server): function test_initialize_result_connected (line 361) | async def test_initialize_result_connected(fastmcp_server): function test_initialize_result_disconnected (line 378) | async def test_initialize_result_disconnected(fastmcp_server): function test_server_info_custom_version (line 394) | async def test_server_info_custom_version(): class _DelayedConnectTransport (line 418) | class _DelayedConnectTransport(ClientTransport): method __init__ (line 419) | def __init__( method connect_session (line 430) | async def connect_session( method close (line 438) | async def close(self) -> None: function test_client_nested_context_manager (line 442) | async def test_client_nested_context_manager(fastmcp_server): function test_client_context_entry_cancelled_starter_cleans_up (line 472) | async def test_client_context_entry_cancelled_starter_cleans_up(fastmcp_... function test_cancelled_context_entry_waiter_does_not_close_active_session (line 509) | async def test_cancelled_context_entry_waiter_does_not_close_active_sess... function test_concurrent_client_context_managers (line 555) | async def test_concurrent_client_context_managers(): function test_resource_template (line 601) | async def test_resource_template(fastmcp_server): function test_list_resource_templates_mcp (line 624) | async def test_list_resource_templates_mcp(fastmcp_server): function test_mcp_resource_generation (line 637) | async def test_mcp_resource_generation(fastmcp_server): function test_mcp_template_generation (line 653) | async def test_mcp_template_generation(fastmcp_server): function test_template_access_via_client (line 669) | async def test_template_access_via_client(fastmcp_server): function test_tagged_resource_metadata (line 681) | async def test_tagged_resource_metadata(tagged_resources_server): function test_tagged_template_metadata (line 695) | async def test_tagged_template_metadata(tagged_resources_server): function test_tagged_template_functionality (line 709) | async def test_tagged_template_functionality(tagged_resources_server): function test_client_unwraps_result_using_meta (line 722) | async def test_client_unwraps_result_using_meta(): function test_client_does_not_unwrap_dict_result (line 738) | async def test_client_does_not_unwrap_dict_result(): FILE: tests/client/client/test_error_handling.py class TestErrorHandling (line 13) | class TestErrorHandling: method test_general_tool_exceptions_are_not_masked_by_default (line 14) | async def test_general_tool_exceptions_are_not_masked_by_default(self): method test_general_tool_exceptions_are_masked_when_enabled (line 30) | async def test_general_tool_exceptions_are_masked_when_enabled(self): method test_validation_errors_are_not_masked_when_enabled (line 46) | async def test_validation_errors_are_not_masked_when_enabled(self): method test_specific_tool_errors_are_sent_to_client (line 60) | async def test_specific_tool_errors_are_sent_to_client(self): method test_general_resource_exceptions_are_not_masked_by_default (line 76) | async def test_general_resource_exceptions_are_not_masked_by_default(s... method test_general_resource_exceptions_are_masked_when_enabled (line 92) | async def test_general_resource_exceptions_are_masked_when_enabled(self): method test_resource_errors_are_sent_to_client (line 108) | async def test_resource_errors_are_sent_to_client(self): method test_general_template_exceptions_are_not_masked_by_default (line 122) | async def test_general_template_exceptions_are_not_masked_by_default(s... method test_general_template_exceptions_are_masked_when_enabled (line 138) | async def test_general_template_exceptions_are_masked_when_enabled(self): method test_template_errors_are_sent_to_client (line 154) | async def test_template_errors_are_sent_to_client(self): FILE: tests/client/client/test_initialize.py class TestInitialize (line 7) | class TestInitialize: method test_auto_initialize_default (line 10) | async def test_auto_initialize_default(self, fastmcp_server): method test_auto_initialize_explicit_true (line 20) | async def test_auto_initialize_explicit_true(self, fastmcp_server): method test_auto_initialize_false (line 28) | async def test_auto_initialize_false(self, fastmcp_server): method test_manual_initialize (line 36) | async def test_manual_initialize(self, fastmcp_server): method test_initialize_idempotent (line 48) | async def test_initialize_idempotent(self, fastmcp_server): method test_initialize_with_instructions (line 61) | async def test_initialize_with_instructions(self): method test_initialize_timeout_custom (line 76) | async def test_initialize_timeout_custom(self, fastmcp_server): method test_initialize_property_after_auto_init (line 85) | async def test_initialize_property_after_auto_init(self, fastmcp_server): method test_initialize_property_before_connect (line 99) | async def test_initialize_property_before_connect(self, fastmcp_server): method test_manual_initialize_can_call_tools (line 106) | async def test_manual_initialize_can_call_tools(self, fastmcp_server): FILE: tests/client/client/test_session.py class TestSessionTaskErrorPropagation (line 10) | class TestSessionTaskErrorPropagation: method test_session_task_error_propagates_to_call (line 18) | async def test_session_task_error_propagates_to_call(self, fastmcp_ser... method test_session_task_already_done_with_error (line 49) | async def test_session_task_already_done_with_error(self, fastmcp_serv... method test_session_task_already_done_no_error_raises_runtime_error (line 77) | async def test_session_task_already_done_no_error_raises_runtime_error( method test_normal_operation_unaffected (line 102) | async def test_normal_operation_unaffected(self, fastmcp_server): method test_no_session_task_falls_back_to_direct_await (line 120) | async def test_no_session_task_falls_back_to_direct_await(self, fastmc... FILE: tests/client/client/test_timeout.py class TestTimeout (line 11) | class TestTimeout: method test_timeout (line 12) | async def test_timeout(self, fastmcp_server: FastMCP): method test_timeout_tool_call (line 22) | async def test_timeout_tool_call(self, fastmcp_server: FastMCP): method test_timeout_tool_call_overrides_client_timeout (line 27) | async def test_timeout_tool_call_overrides_client_timeout( method test_timeout_tool_call_overrides_client_timeout_even_if_lower (line 37) | async def test_timeout_tool_call_overrides_client_timeout_even_if_lower( FILE: tests/client/client/test_transport.py class TestInferTransport (line 15) | class TestInferTransport: method test_url_returns_sse_transport (line 41) | def test_url_returns_sse_transport(self, url): method test_url_returns_streamable_http_transport (line 62) | def test_url_returns_streamable_http_transport(self, url): method test_infer_remote_transport_from_config (line 66) | def test_infer_remote_transport_from_config(self): method test_infer_local_transport_from_config (line 81) | def test_infer_local_transport_from_config(self): method test_config_with_no_servers (line 96) | def test_config_with_no_servers(self): method test_mcpconfigtransport_with_no_servers (line 102) | def test_mcpconfigtransport_with_no_servers(self): method test_infer_composite_client (line 108) | def test_infer_composite_client(self): method test_infer_fastmcp_server (line 126) | def test_infer_fastmcp_server(self, fastmcp_server): method test_infer_fastmcp_v1_server (line 131) | def test_infer_fastmcp_v1_server(self): FILE: tests/client/sampling/handlers/test_anthropic_handler.py function test_convert_sampling_messages_to_anthropic_messages (line 26) | def test_convert_sampling_messages_to_anthropic_messages(): function test_image_content_to_anthropic_block (line 44) | def test_image_content_to_anthropic_block(): function test_image_content_unsupported_mime_type_raises (line 59) | def test_image_content_unsupported_mime_type_raises(): function test_convert_single_image_content_to_anthropic_message (line 66) | def test_convert_single_image_content_to_anthropic_message(): function test_convert_single_audio_content_raises (line 92) | def test_convert_single_audio_content_raises(): function test_convert_list_content_with_image_and_text (line 106) | def test_convert_list_content_with_image_and_text(): function test_convert_list_content_with_audio_raises (line 136) | def test_convert_list_content_with_audio_raises(): function test_convert_image_in_assistant_message_raises (line 151) | def test_convert_image_in_assistant_message_raises(): function test_convert_list_image_in_assistant_message_raises (line 165) | def test_convert_list_image_in_assistant_message_raises(): function test_select_model_from_preferences (line 193) | def test_select_model_from_preferences(prefs: Any, expected: str) -> None: function test_message_to_create_message_result (line 201) | def test_message_to_create_message_result(): function test_message_to_result_with_tools (line 226) | def test_message_to_result_with_tools(): function test_convert_tool_choice_auto (line 264) | def test_convert_tool_choice_auto(): function test_convert_tool_choice_required (line 272) | def test_convert_tool_choice_required(): function test_convert_tool_choice_none (line 280) | def test_convert_tool_choice_none(): function test_convert_tool_choice_unknown_raises (line 288) | def test_convert_tool_choice_unknown_raises(): function test_convert_tools_to_anthropic (line 295) | def test_convert_tools_to_anthropic(): function test_convert_messages_with_tool_use_content (line 322) | def test_convert_messages_with_tool_use_content(): function test_convert_messages_with_tool_result_content (line 350) | def test_convert_messages_with_tool_result_content(): FILE: tests/client/sampling/handlers/test_google_genai_handler.py function test_convert_sampling_messages_to_google_genai_content (line 48) | def test_convert_sampling_messages_to_google_genai_content(): function test_convert_single_image_content_to_google_genai (line 67) | def test_convert_single_image_content_to_google_genai(): function test_convert_single_audio_content_to_google_genai (line 77) | def test_convert_single_audio_content_to_google_genai(): function test_convert_image_message_to_google_genai_content (line 87) | def test_convert_image_message_to_google_genai_content(): function test_convert_audio_message_to_google_genai_content (line 103) | def test_convert_audio_message_to_google_genai_content(): function test_convert_list_content_with_image_and_text (line 119) | def test_convert_list_content_with_image_and_text(): function test_convert_list_content_with_audio_and_text (line 140) | def test_convert_list_content_with_audio_and_text(): function test_get_model (line 161) | def test_get_model(): function test_response_to_create_message_result (line 189) | async def test_response_to_create_message_result(): function test_convert_tool_choice_to_google_genai (line 204) | def test_convert_tool_choice_to_google_genai(): function test_sampling_content_to_google_genai_part_tool_use (line 226) | def test_sampling_content_to_google_genai_part_tool_use(): function test_sampling_content_to_google_genai_part_tool_result (line 242) | def test_sampling_content_to_google_genai_part_tool_result(): function test_sampling_content_to_google_genai_part_tool_result_empty (line 258) | def test_sampling_content_to_google_genai_part_tool_result_empty(): function test_sampling_content_to_google_genai_part_tool_result_no_underscore (line 273) | def test_sampling_content_to_google_genai_part_tool_result_no_underscore(): function test_convert_messages_with_tool_use (line 288) | def test_convert_messages_with_tool_use(): function test_convert_messages_with_tool_result (line 315) | def test_convert_messages_with_tool_result(): function test_convert_messages_with_multiple_content_blocks (line 336) | def test_convert_messages_with_multiple_content_blocks(): function test_response_to_result_with_tools_text_only (line 361) | def test_response_to_result_with_tools_text_only(): function test_response_to_result_with_tools_function_call (line 383) | def test_response_to_result_with_tools_function_call(): function test_response_to_result_with_tools_mixed_content (line 409) | def test_response_to_result_with_tools_mixed_content(): FILE: tests/client/sampling/handlers/test_openai_handler.py function test_convert_sampling_messages_to_openai_messages (line 36) | def test_convert_sampling_messages_to_openai_messages(): function test_image_content_to_openai_part (line 56) | def test_image_content_to_openai_part(): function test_audio_content_to_openai_part_wav (line 67) | def test_audio_content_to_openai_part_wav(): function test_audio_content_to_openai_part_mp3 (line 78) | def test_audio_content_to_openai_part_mp3(): function test_audio_content_to_openai_part_unsupported_raises (line 86) | def test_audio_content_to_openai_part_unsupported_raises(): function test_image_content_to_openai_part_unsupported_raises (line 93) | def test_image_content_to_openai_part_unsupported_raises(): function test_convert_single_image_content_to_openai_message (line 100) | def test_convert_single_image_content_to_openai_message(): function test_convert_single_audio_content_to_openai_message (line 123) | def test_convert_single_audio_content_to_openai_message(): function test_convert_list_content_with_image_and_text (line 146) | def test_convert_list_content_with_image_and_text(): function test_convert_image_in_assistant_message_raises (line 175) | def test_convert_image_in_assistant_message_raises(): function test_convert_audio_in_assistant_message_raises (line 190) | def test_convert_audio_in_assistant_message_raises(): function test_convert_list_image_in_assistant_message_raises (line 205) | def test_convert_list_image_in_assistant_message_raises(): function test_convert_list_tool_calls_with_image_raises (line 222) | def test_convert_list_tool_calls_with_image_raises(): function test_select_model_from_preferences (line 254) | def test_select_model_from_preferences(prefs: Any, expected: str) -> None: function test_handler_passes_max_completion_tokens (line 260) | async def test_handler_passes_max_completion_tokens(): function test_chat_completion_to_create_message_result (line 293) | async def test_chat_completion_to_create_message_result(): FILE: tests/client/tasks/test_client_prompt_tasks.py function prompt_server (line 15) | async def prompt_server(): function test_get_prompt_as_task_returns_prompt_task (line 32) | async def test_get_prompt_as_task_returns_prompt_task(prompt_server): function test_prompt_task_server_generated_id (line 41) | async def test_prompt_task_server_generated_id(prompt_server): function test_prompt_task_result_returns_get_prompt_result (line 57) | async def test_prompt_task_result_returns_get_prompt_result(prompt_server): function test_prompt_task_await_syntax (line 78) | async def test_prompt_task_await_syntax(prompt_server): function test_prompt_task_status_and_wait (line 88) | async def test_prompt_task_status_and_wait(prompt_server): FILE: tests/client/tasks/test_client_resource_tasks.py function resource_server (line 15) | async def resource_server(): function test_read_resource_as_task_returns_resource_task (line 32) | async def test_read_resource_as_task_returns_resource_task(resource_serv... function test_resource_task_server_generated_id (line 41) | async def test_resource_task_server_generated_id(resource_server): function test_resource_task_result_returns_read_resource_result (line 53) | async def test_resource_task_result_returns_read_resource_result(resourc... function test_resource_task_await_syntax (line 70) | async def test_resource_task_await_syntax(resource_server): function test_resource_template_task (line 80) | async def test_resource_template_task(resource_server): function test_resource_task_status_and_wait (line 93) | async def test_resource_task_status_and_wait(resource_server): FILE: tests/client/tasks/test_client_task_notifications.py function task_notification_server (line 19) | async def task_notification_server(): function test_task_receives_status_notification (line 43) | async def test_task_receives_status_notification(task_notification_server): function test_status_cache_updated_by_notification (line 55) | async def test_status_cache_updated_by_notification(task_notification_se... function test_callback_invoked_on_notification (line 73) | async def test_callback_invoked_on_notification(task_notification_server): function test_async_callback_invoked (line 101) | async def test_async_callback_invoked(task_notification_server): function test_multiple_callbacks_all_invoked (line 126) | async def test_multiple_callbacks_all_invoked(task_notification_server): function test_callback_error_doesnt_break_notification (line 151) | async def test_callback_error_doesnt_break_notification(task_notificatio... function test_wait_wakes_early_on_notification (line 179) | async def test_wait_wakes_early_on_notification(task_notification_server): function test_notification_with_failed_task (line 196) | async def test_notification_with_failed_task(task_notification_server): FILE: tests/client/tasks/test_client_task_protocol.py function test_end_to_end_task_flow (line 13) | async def test_end_to_end_task_flow(): function test_multiple_concurrent_tasks (line 48) | async def test_multiple_concurrent_tasks(): function test_task_id_auto_generation (line 69) | async def test_task_id_auto_generation(): FILE: tests/client/tasks/test_client_tool_tasks.py function tool_task_server (line 16) | async def tool_task_server(): function test_call_tool_as_task_returns_tool_task (line 33) | async def test_call_tool_as_task_returns_tool_task(tool_task_server): function test_tool_task_server_generated_id (line 43) | async def test_tool_task_server_generated_id(tool_task_server): function test_tool_task_result_returns_call_tool_result (line 55) | async def test_tool_task_result_returns_call_tool_result(tool_task_server): function test_tool_task_await_syntax (line 65) | async def test_tool_task_await_syntax(tool_task_server): function test_tool_task_status_and_wait (line 75) | async def test_tool_task_status_and_wait(tool_task_server): FILE: tests/client/tasks/test_task_context_validation.py function task_server (line 15) | async def task_server(): function test_task_status_outside_context_raises (line 37) | async def test_task_status_outside_context_raises(task_server): function test_task_result_outside_context_raises (line 49) | async def test_task_result_outside_context_raises(task_server): function test_task_wait_outside_context_raises (line 61) | async def test_task_wait_outside_context_raises(task_server): function test_task_cancel_outside_context_raises (line 73) | async def test_task_cancel_outside_context_raises(task_server): function test_cached_tool_task_accessible_outside_context (line 85) | async def test_cached_tool_task_accessible_outside_context(task_server): function test_cached_prompt_task_accessible_outside_context (line 103) | async def test_cached_prompt_task_accessible_outside_context(task_server): function test_cached_resource_task_accessible_outside_context (line 123) | async def test_cached_resource_task_accessible_outside_context(task_serv... function test_uncached_status_outside_context_raises (line 140) | async def test_uncached_status_outside_context_raises(task_server): function test_task_await_syntax_outside_context_raises (line 160) | async def test_task_await_syntax_outside_context_raises(task_server): function test_task_await_syntax_works_for_cached_results (line 172) | async def test_task_await_syntax_works_for_cached_results(task_server): function test_multiple_result_calls_return_same_cached_object (line 185) | async def test_multiple_result_calls_return_same_cached_object(task_serv... function test_background_task_properties_accessible_outside_context (line 199) | async def test_background_task_properties_accessible_outside_context(tas... FILE: tests/client/tasks/test_task_result_caching.py function test_tool_task_result_cached_on_first_call (line 12) | async def test_tool_task_result_cached_on_first_call(): function test_prompt_task_result_cached (line 39) | async def test_prompt_task_result_cached(): function test_resource_task_result_cached (line 66) | async def test_resource_task_result_cached(): function test_multiple_await_returns_same_object (line 93) | async def test_multiple_await_returns_same_object(): function test_result_and_await_share_cache (line 113) | async def test_result_and_await_share_cache(): function test_forbidden_mode_tool_caches_error_result (line 135) | async def test_forbidden_mode_tool_caches_error_result(): function test_forbidden_mode_prompt_raises_error (line 162) | async def test_forbidden_mode_prompt_raises_error(): function test_forbidden_mode_resource_raises_error (line 179) | async def test_forbidden_mode_resource_raises_error(): function test_immediate_task_caches_result (line 196) | async def test_immediate_task_caches_result(): function test_cache_persists_across_mixed_access_patterns (line 226) | async def test_cache_persists_across_mixed_access_patterns(): function test_different_tasks_have_separate_caches (line 247) | async def test_different_tasks_have_separate_caches(): function test_cache_survives_status_checks (line 277) | async def test_cache_survives_status_checks(): function test_cache_survives_wait_calls (line 303) | async def test_cache_survives_wait_calls(): FILE: tests/client/telemetry/test_client_tracing.py class TestClientToolTracing (line 15) | class TestClientToolTracing: method test_call_tool_creates_span (line 18) | async def test_call_tool_creates_span(self, trace_exporter: InMemorySp... method test_call_tool_span_attributes (line 36) | async def test_call_tool_span_attributes( class TestClientResourceTracing (line 73) | class TestClientResourceTracing: method test_read_resource_creates_span (line 76) | async def test_read_resource_creates_span( method test_read_resource_span_attributes (line 96) | async def test_read_resource_span_attributes( class TestClientPromptTracing (line 135) | class TestClientPromptTracing: method test_get_prompt_creates_span (line 138) | async def test_get_prompt_creates_span(self, trace_exporter: InMemoryS... method test_get_prompt_span_attributes (line 156) | async def test_get_prompt_span_attributes( class TestClientServerSpanHierarchy (line 193) | class TestClientServerSpanHierarchy: method test_client_and_server_spans_created (line 196) | async def test_client_and_server_spans_created( method test_trace_context_propagation (line 248) | async def test_trace_context_propagation( class TestClientErrorTracing (line 302) | class TestClientErrorTracing: method test_call_tool_error_creates_spans (line 314) | async def test_call_tool_error_creates_spans( method test_read_resource_error_creates_spans (line 361) | async def test_read_resource_error_creates_spans( method test_get_prompt_error_creates_spans (line 408) | async def test_get_prompt_error_creates_spans( method test_call_nonexistent_tool_creates_spans (line 455) | async def test_call_nonexistent_tool_creates_spans( class TestSessionIdOnSpans (line 499) | class TestSessionIdOnSpans: method http_server_url (line 506) | async def http_server_url(self) -> AsyncGenerator[str, None]: method test_client_span_includes_session_id (line 519) | async def test_client_span_includes_session_id( method test_server_span_includes_session_id (line 551) | async def test_server_span_includes_session_id( method test_client_and_server_share_same_session_id (line 583) | async def test_client_and_server_share_same_session_id( FILE: tests/client/test_elicitation.py function fastmcp_server (line 24) | def fastmcp_server(): function test_elicitation_with_no_handler (line 51) | async def test_elicitation_with_no_handler(fastmcp_server): function test_elicitation_accept_content (line 59) | async def test_elicitation_accept_content(fastmcp_server): function test_elicitation_decline (line 73) | async def test_elicitation_decline(fastmcp_server): function test_elicitation_handler_parameters (line 86) | async def test_elicitation_handler_parameters(): function test_elicitation_cancel_action (line 120) | async def test_elicitation_cancel_action(): class TestScalarResponseTypes (line 146) | class TestScalarResponseTypes: method test_elicitation_no_response (line 147) | async def test_elicitation_no_response(self): method test_elicitation_empty_response (line 170) | async def test_elicitation_empty_response(self): method test_elicitation_response_when_no_response_requested (line 192) | async def test_elicitation_response_when_no_response_requested(self): method test_elicitation_str_response (line 214) | async def test_elicitation_str_response(self): method test_elicitation_int_response (line 232) | async def test_elicitation_int_response(self): method test_elicitation_float_response (line 250) | async def test_elicitation_float_response(self): method test_elicitation_bool_response (line 268) | async def test_elicitation_bool_response(self): method test_elicitation_literal_response (line 286) | async def test_elicitation_literal_response(self): method test_elicitation_enum_response (line 306) | async def test_elicitation_enum_response(self): method test_elicitation_list_of_strings_response (line 328) | async def test_elicitation_list_of_strings_response(self): function test_elicitation_handler_error (line 347) | async def test_elicitation_handler_error(): function test_elicitation_multiple_calls (line 371) | async def test_elicitation_multiple_calls(): class UserInfo (line 416) | class UserInfo: class UserInfoTypedDict (line 421) | class UserInfoTypedDict(TypedDict): class UserInfoPydantic (line 426) | class UserInfoPydantic(BaseModel): function test_structured_response_type (line 434) | async def test_structured_response_type( function test_all_primitive_field_types (line 486) | async def test_all_primitive_field_types(): class TestValidation (line 547) | class TestValidation: method test_schema_validation_rejects_non_object (line 548) | async def test_schema_validation_rejects_non_object(self): method test_schema_validation_rejects_nested_objects (line 554) | async def test_schema_validation_rejects_nested_objects(self): method test_schema_validation_rejects_arrays (line 572) | async def test_schema_validation_rejects_arrays(self): class TestPatternMatching (line 586) | class TestPatternMatching: method test_pattern_matching_accept (line 587) | async def test_pattern_matching_accept(self): method test_pattern_matching_decline (line 612) | async def test_pattern_matching_decline(self): method test_pattern_matching_cancel (line 637) | async def test_pattern_matching_cancel(self): FILE: tests/client/test_elicitation_enums.py function fastmcp_server (line 21) | def fastmcp_server(): function test_elicitation_implicit_acceptance (line 48) | async def test_elicitation_implicit_acceptance(fastmcp_server): function test_elicitation_implicit_acceptance_must_be_dict (line 63) | async def test_elicitation_implicit_acceptance_must_be_dict(fastmcp_serv... function test_enum_elicitation_schema_inline (line 81) | def test_enum_elicitation_schema_inline(): function test_enum_elicitation_schema_inline_untitled (line 118) | def test_enum_elicitation_schema_inline_untitled(): function test_dict_based_titled_single_select (line 152) | async def test_dict_based_titled_single_select(): function test_list_list_multi_select_untitled (line 190) | async def test_list_list_multi_select_untitled(): function test_list_dict_multi_select_titled (line 223) | async def test_list_dict_multi_select_titled(): function test_list_enum_multi_select (line 264) | async def test_list_enum_multi_select(): function test_list_enum_multi_select_direct (line 287) | async def test_list_enum_multi_select_direct(): function test_validation_allows_enum_arrays (line 328) | async def test_validation_allows_enum_arrays(): function test_validation_allows_enum_arrays_with_anyof (line 342) | async def test_validation_allows_enum_arrays_with_anyof(): function test_validation_rejects_non_enum_arrays (line 361) | async def test_validation_rejects_non_enum_arrays(): function test_validation_rejects_primitive_arrays (line 376) | async def test_validation_rejects_primitive_arrays(): class TestElicitationDefaults (line 388) | class TestElicitationDefaults: method test_string_default_preserved (line 391) | def test_string_default_preserved(self): method test_integer_default_preserved (line 405) | def test_integer_default_preserved(self): method test_number_default_preserved (line 419) | def test_number_default_preserved(self): method test_boolean_default_preserved (line 433) | def test_boolean_default_preserved(self): method test_enum_default_preserved (line 447) | def test_enum_default_preserved(self): method test_all_defaults_preserved_together (line 467) | def test_all_defaults_preserved_together(self): method test_mixed_defaults_and_required (line 490) | def test_mixed_defaults_and_required(self): method test_compress_schema_preserves_defaults (line 505) | def test_compress_schema_preserves_defaults(self): FILE: tests/client/test_logs.py class LogHandler (line 10) | class LogHandler: method __init__ (line 11) | def __init__(self): method handle_log (line 22) | async def handle_log(self, message: LogMessage) -> None: function fastmcp_server (line 32) | def fastmcp_server(): class TestClientLogs (line 51) | class TestClientLogs: method test_log (line 52) | async def test_log(self, fastmcp_server: FastMCP, caplog): method test_echo_log (line 67) | async def test_echo_log(self, fastmcp_server: FastMCP, caplog): class TestSetLoggingLevel (line 93) | class TestSetLoggingLevel: method test_set_logging_level (line 94) | async def test_set_logging_level(self, fastmcp_server: FastMCP): method test_set_logging_level_debug_allows_all (line 114) | async def test_set_logging_level_debug_allows_all(self, fastmcp_server... method test_default_level_allows_all (line 126) | async def test_default_level_allows_all(self, fastmcp_server: FastMCP): method test_server_default_client_log_level (line 137) | async def test_server_default_client_log_level(self): method test_session_level_overrides_server_default (line 160) | async def test_session_level_overrides_server_default(self): class TestDefaultLogHandler (line 186) | class TestDefaultLogHandler: method test_default_handler_routes_to_correct_levels (line 189) | async def test_default_handler_routes_to_correct_levels(self): method test_default_handler_without_logger_name (line 240) | async def test_default_handler_without_logger_name(self): method test_default_handler_with_dict_data (line 263) | async def test_default_handler_with_dict_data(self): method test_default_handler_with_list_data (line 289) | async def test_default_handler_with_list_data(self): method test_default_handler_with_number_data (line 314) | async def test_default_handler_with_number_data(self): FILE: tests/client/test_notifications.py class NotificationRecording (line 13) | class NotificationRecording: class RecordingMessageHandler (line 21) | class RecordingMessageHandler(MessageHandler): method __init__ (line 24) | def __init__(self, name: str | None = None): method on_notification (line 29) | async def on_notification(self, message: mcp.types.ServerNotification)... method get_notifications (line 35) | def get_notifications( method assert_notification_sent (line 43) | def assert_notification_sent(self, method: str, times: int = 1) -> bool: method assert_notification_not_sent (line 53) | def assert_notification_not_sent(self, method: str) -> bool: method reset (line 61) | def reset(self): function recording_message_handler (line 67) | def recording_message_handler(): class TestNotificationAPI (line 73) | class TestNotificationAPI: method test_send_notification_async (line 76) | async def test_send_notification_async( method test_send_multiple_notifications (line 97) | async def test_send_multiple_notifications( FILE: tests/client/test_oauth_callback_race.py function test_oauth_callback_result_ignores_subsequent_callbacks (line 11) | async def test_oauth_callback_result_ignores_subsequent_callbacks(): FILE: tests/client/test_oauth_callback_xss.py function test_ui_create_page_escapes_title (line 14) | def test_ui_create_page_escapes_title(): function test_ui_create_status_message_escapes (line 22) | def test_ui_create_status_message_escapes(): function test_ui_create_info_box_escapes (line 30) | def test_ui_create_info_box_escapes(): function test_ui_create_detail_box_escapes (line 38) | def test_ui_create_detail_box_escapes(): function test_callback_html_escapes_error_message (line 48) | def test_callback_html_escapes_error_message(): function test_callback_html_escapes_server_url (line 57) | def test_callback_html_escapes_server_url(): function test_callback_html_escapes_title (line 66) | def test_callback_html_escapes_title(): function test_callback_html_mixed_content (line 75) | def test_callback_html_mixed_content(): function test_callback_html_event_handlers (line 86) | def test_callback_html_event_handlers(): function test_callback_html_special_characters (line 95) | def test_callback_html_special_characters(): function test_common_xss_vectors (line 123) | def test_common_xss_vectors(xss_vector: str): function test_legitimate_content_still_works (line 135) | def test_legitimate_content_still_works(): function test_no_hardcoded_html_tags (line 151) | def test_no_hardcoded_html_tags(): FILE: tests/client/test_openapi.py function create_fastmcp_server_for_headers (line 13) | def create_fastmcp_server_for_headers() -> FastMCP: function shttp_server (line 48) | async def shttp_server(): function sse_server (line 56) | async def sse_server(): function proxy_server (line 64) | async def proxy_server(shttp_server: str): function test_fastapi_client_headers_streamable_http_resource (line 71) | async def test_fastapi_client_headers_streamable_http_resource(shttp_ser... function test_fastapi_client_headers_sse_resource (line 79) | async def test_fastapi_client_headers_sse_resource(sse_server: str): function test_fastapi_client_headers_streamable_http_tool (line 87) | async def test_fastapi_client_headers_streamable_http_tool(shttp_server:... function test_fastapi_client_headers_sse_tool (line 94) | async def test_fastapi_client_headers_sse_tool(sse_server: str): function test_client_headers_sse_resource (line 101) | async def test_client_headers_sse_resource(sse_server: str): function test_client_headers_shttp_resource (line 111) | async def test_client_headers_shttp_resource(shttp_server: str): function test_client_headers_sse_resource_template (line 121) | async def test_client_headers_sse_resource_template(sse_server: str): function test_client_headers_shttp_resource_template (line 133) | async def test_client_headers_shttp_resource_template(shttp_server: str): function test_client_headers_sse_tool (line 145) | async def test_client_headers_sse_tool(sse_server: str): function test_client_headers_shttp_tool (line 154) | async def test_client_headers_shttp_tool(shttp_server: str): function test_client_overrides_server_headers (line 163) | async def test_client_overrides_server_headers(shttp_server: str): function test_client_with_excluded_header_is_ignored (line 175) | async def test_client_with_excluded_header_is_ignored(sse_server: str): function test_client_headers_proxy (line 194) | async def test_client_headers_proxy(proxy_server: str): FILE: tests/client/test_progress.py function clear_progress_messages (line 9) | def clear_progress_messages(): function fastmcp_server (line 16) | def fastmcp_server(): function progress_handler (line 39) | async def progress_handler( function test_progress_handler (line 45) | async def test_progress_handler(fastmcp_server: FastMCP): function test_progress_handler_can_be_supplied_on_tool_call (line 52) | async def test_progress_handler_can_be_supplied_on_tool_call(fastmcp_ser... function test_progress_handler_supplied_on_tool_call_overrides_default (line 59) | async def test_progress_handler_supplied_on_tool_call_overrides_default( function test_default_progress_handler_handles_zero_total (line 73) | async def test_default_progress_handler_handles_zero_total() -> None: FILE: tests/client/test_roots.py function fastmcp_server (line 7) | def fastmcp_server(): class TestClientRoots (line 18) | class TestClientRoots: method test_invalid_roots (line 20) | async def test_invalid_roots(self, fastmcp_server: FastMCP, roots: lis... method test_invalid_urls (line 29) | async def test_invalid_urls(self, fastmcp_server: FastMCP, roots: list... method test_valid_roots (line 38) | async def test_valid_roots(self, fastmcp_server: FastMCP, roots: list[... FILE: tests/client/test_sampling.py function fastmcp_server (line 16) | def fastmcp_server(): function test_simple_sampling (line 73) | async def test_simple_sampling(fastmcp_server: FastMCP): function test_sampling_with_system_prompt (line 84) | async def test_sampling_with_system_prompt(fastmcp_server: FastMCP): function test_sampling_with_messages (line 98) | async def test_sampling_with_messages(fastmcp_server: FastMCP): function test_sampling_with_fallback (line 120) | async def test_sampling_with_fallback(fastmcp_server: FastMCP): function test_sampling_with_image (line 140) | async def test_sampling_with_image(fastmcp_server: FastMCP): class TestSamplingDefaultCapabilities (line 177) | class TestSamplingDefaultCapabilities: method test_default_sampling_capabilities_omit_tools (line 180) | async def test_default_sampling_capabilities_omit_tools(self): method test_set_sampling_callback_default_capabilities_omit_tools (line 202) | async def test_set_sampling_callback_default_capabilities_omit_tools(s... method test_explicit_tools_capability_is_preserved (line 213) | async def test_explicit_tools_capability_is_preserved(self): class TestSamplingWithTools (line 235) | class TestSamplingWithTools: method test_sampling_with_tools_requires_capability (line 238) | async def test_sampling_with_tools_requires_capability(self): method test_sampling_with_tools_fallback_handler_can_return_string (line 273) | async def test_sampling_with_tools_fallback_handler_can_return_string(... method test_sampling_tool_schema (line 302) | def test_sampling_tool_schema(self): method test_sampling_tool_run (line 315) | async def test_sampling_tool_run(self): method test_sampling_tool_run_async (line 326) | async def test_sampling_tool_run_async(self): method test_tool_choice_parameter (line 337) | def test_tool_choice_parameter(self): FILE: tests/client/test_sampling_result_types.py class TestSamplingResultType (line 7) | class TestSamplingResultType: method test_result_type_creates_final_response_tool (line 10) | async def test_result_type_creates_final_response_tool(self): method test_result_type_with_user_tools (line 63) | async def test_result_type_with_user_tools(self): method test_result_type_validation_error_retries (line 138) | async def test_result_type_validation_error_retries(self): method test_sampling_result_has_text_and_history (line 228) | async def test_sampling_result_has_text_and_history(self): class TestSampleStep (line 259) | class TestSampleStep: method test_sample_step_basic (line 262) | async def test_sample_step_basic(self): method test_sample_step_with_tool_execution (line 290) | async def test_sample_step_with_tool_execution(self): method test_sample_step_execute_tools_false (line 349) | async def test_sample_step_execute_tools_false(self): method test_sample_step_history_includes_assistant_message (line 400) | async def test_sample_step_history_includes_assistant_message(self): FILE: tests/client/test_sampling_tool_loop.py class TestAutomaticToolLoop (line 10) | class TestAutomaticToolLoop: method test_automatic_tool_loop_executes_tools (line 13) | async def test_automatic_tool_loop_executes_tools(self): method test_automatic_tool_loop_multiple_tools (line 76) | async def test_automatic_tool_loop_multiple_tools(self): method test_automatic_tool_loop_handles_unknown_tool (line 136) | async def test_automatic_tool_loop_handles_unknown_tool(self): method test_automatic_tool_loop_handles_tool_exception (line 211) | async def test_automatic_tool_loop_handles_tool_exception(self): method test_concurrent_tool_execution_default_sequential (line 285) | async def test_concurrent_tool_execution_default_sequential(self): method test_concurrent_tool_execution_unlimited (line 365) | async def test_concurrent_tool_execution_unlimited(self): method test_concurrent_tool_execution_bounded (line 445) | async def test_concurrent_tool_execution_bounded(self): method test_sequential_tool_forces_sequential_execution (line 531) | async def test_sequential_tool_forces_sequential_execution(self): method test_concurrent_tool_execution_error_handling (line 621) | async def test_concurrent_tool_execution_error_handling(self): method test_concurrent_tool_result_order_preserved (line 688) | async def test_concurrent_tool_result_order_preserved(self): FILE: tests/client/test_sse.py function create_test_server (line 17) | def create_test_server() -> FastMCP: function sse_server (line 65) | async def sse_server(): function test_ping (line 72) | async def test_ping(sse_server: str): function test_http_headers (line 79) | async def test_http_headers(sse_server: str): function sse_server_custom_path (line 92) | async def sse_server_custom_path(): function nested_sse_server (line 100) | async def nested_sse_server(): function test_run_server_on_path (line 143) | async def test_run_server_on_path(sse_server_custom_path: str): function test_nested_sse_server_resolves_correctly (line 150) | async def test_nested_sse_server_resolves_correctly(nested_sse_server: s... class TestTimeout (line 161) | class TestTimeout: method test_timeout (line 162) | async def test_timeout(self, sse_server: str): method test_timeout_tool_call (line 173) | async def test_timeout_tool_call(self, sse_server: str): method test_timeout_tool_call_overrides_client_timeout_if_lower (line 178) | async def test_timeout_tool_call_overrides_client_timeout_if_lower( method test_timeout_client_timeout_does_not_override_tool_call_timeout_if_lower (line 188) | async def test_timeout_client_timeout_does_not_override_tool_call_time... FILE: tests/client/test_stdio.py function running_under_debugger (line 14) | def running_under_debugger(): function gc_collect_harder (line 18) | def gc_collect_harder(): class TestParallelCalls (line 27) | class TestParallelCalls: method stdio_script (line 29) | def stdio_script(self, tmp_path): method test_parallel_calls (line 48) | async def test_parallel_calls(self, stdio_script): class TestKeepAlive (line 66) | class TestKeepAlive: method stdio_script (line 70) | def stdio_script(self, tmp_path): method test_keep_alive_default_true (line 89) | async def test_keep_alive_default_true(self): method test_keep_alive_set_false (line 94) | async def test_keep_alive_set_false(self): method test_keep_alive_maintains_session_across_multiple_calls (line 100) | async def test_keep_alive_maintains_session_across_multiple_calls( method test_keep_alive_true_exit_scope_kills_transport (line 119) | async def test_keep_alive_true_exit_scope_kills_transport(self, stdio_... method test_keep_alive_true_exit_scope_kills_client (line 141) | async def test_keep_alive_true_exit_scope_kills_client(self, stdio_scr... method test_keep_alive_false_exit_scope_kills_server (line 166) | async def test_keep_alive_false_exit_scope_kills_server(self, stdio_sc... method test_keep_alive_false_starts_new_session_across_multiple_calls (line 187) | async def test_keep_alive_false_starts_new_session_across_multiple_calls( method test_keep_alive_starts_new_session_if_manually_closed (line 205) | async def test_keep_alive_starts_new_session_if_manually_closed(self, ... method test_keep_alive_maintains_session_if_reentered (line 221) | async def test_keep_alive_maintains_session_if_reentered(self, stdio_s... method test_close_session_and_try_to_use_client_raises_error (line 238) | async def test_close_session_and_try_to_use_client_raises_error(self, ... method test_session_task_failure_raises_immediately_on_enter (line 247) | async def test_session_task_failure_raises_immediately_on_enter(self): class TestLogFile (line 259) | class TestLogFile: method stdio_script_with_stderr (line 261) | def stdio_script_with_stderr(self, tmp_path): method test_log_file_parameter_accepted_by_stdio_transport (line 281) | async def test_log_file_parameter_accepted_by_stdio_transport(self, tm... method test_log_file_parameter_accepted_by_python_stdio_transport (line 289) | async def test_log_file_parameter_accepted_by_python_stdio_transport( method test_log_file_parameter_accepts_textio (line 299) | async def test_log_file_parameter_accepts_textio(self, tmp_path): method test_log_file_captures_stderr_output_with_path (line 308) | async def test_log_file_captures_stderr_output_with_path( method test_log_file_captures_stderr_output_with_textio (line 328) | async def test_log_file_captures_stderr_output_with_textio( method test_log_file_none_uses_default_behavior (line 351) | async def test_log_file_none_uses_default_behavior( FILE: tests/client/test_streamable_http.py function create_test_server (line 19) | def create_test_server() -> FastMCP: function streamable_http_server (line 84) | async def streamable_http_server(request): function streamable_http_server_with_streamable_http_alias (line 101) | async def streamable_http_server_with_streamable_http_alias(): function nested_server (line 109) | async def nested_server(): function test_ping (line 150) | async def test_ping(streamable_http_server: str): function test_ping_with_streamable_http_alias (line 159) | async def test_ping_with_streamable_http_alias( function test_http_headers (line 172) | async def test_http_headers(streamable_http_server: str): function test_session_id_callback (line 186) | async def test_session_id_callback(streamable_http_server: str): function test_greet_with_progress_tool (line 196) | async def test_greet_with_progress_tool(streamable_http_server: str): function test_elicitation_tool (line 216) | async def test_elicitation_tool(streamable_http_server: str, request): function test_stateless_http_rejects_get_sse (line 235) | async def test_stateless_http_rejects_get_sse(streamable_http_server: str): function test_stateless_http_still_accepts_post (line 245) | async def test_stateless_http_still_accepts_post(streamable_http_server:... function test_nested_streamable_http_server_resolves_correctly (line 254) | async def test_nested_streamable_http_server_resolves_correctly(nested_s... class TestTimeout (line 265) | class TestTimeout: method test_timeout (line 266) | async def test_timeout(self, streamable_http_server: str): method test_timeout_tool_call (line 276) | async def test_timeout_tool_call(self, streamable_http_server: str): method test_timeout_tool_call_overrides_client_timeout (line 283) | async def test_timeout_tool_call_overrides_client_timeout( FILE: tests/client/transports/test_memory_transport.py function test_task_teardown_does_not_hang (line 15) | async def test_task_teardown_does_not_hang(): FILE: tests/client/transports/test_no_redirect.py class TestHttpxBuiltinRedirectProtection (line 19) | class TestHttpxBuiltinRedirectProtection: method test_httpx_strips_auth_on_cross_origin_redirect (line 22) | async def test_httpx_strips_auth_on_cross_origin_redirect(self): method test_httpx_preserves_auth_on_same_origin_redirect (line 58) | async def test_httpx_preserves_auth_on_same_origin_redirect(self): method test_various_auth_headers_stripped_on_cross_origin (line 99) | async def test_various_auth_headers_stripped_on_cross_origin( class TestMcpHttpClientRedirectProtection (line 135) | class TestMcpHttpClientRedirectProtection: method test_create_mcp_http_client_strips_auth_on_cross_origin (line 138) | async def test_create_mcp_http_client_strips_auth_on_cross_origin(self): class TestStreamableHttpTransportFactory (line 175) | class TestStreamableHttpTransportFactory: method test_verify_factory_still_enables_redirects (line 178) | def test_verify_factory_still_enables_redirects(self): method test_sse_verify_factory_still_enables_redirects (line 189) | def test_sse_verify_factory_still_enables_redirects(self): FILE: tests/client/transports/test_transports.py function test_oauth_uses_same_client_as_transport_streamable_http (line 14) | async def test_oauth_uses_same_client_as_transport_streamable_http(): function test_oauth_uses_same_client_as_transport_sse (line 32) | async def test_oauth_uses_same_client_as_transport_sse(): class TestSSLVerify (line 50) | class TestSSLVerify: method test_streamable_http_transport_stores_verify_false (line 51) | def test_streamable_http_transport_stores_verify_false(self): method test_streamable_http_transport_stores_verify_ssl_context (line 58) | def test_streamable_http_transport_stores_verify_ssl_context(self): method test_streamable_http_transport_stores_verify_cert_path (line 66) | def test_streamable_http_transport_stores_verify_cert_path(self): method test_streamable_http_transport_verify_default_is_none (line 73) | def test_streamable_http_transport_verify_default_is_none(self): method test_sse_transport_stores_verify_false (line 77) | def test_sse_transport_stores_verify_false(self): method test_sse_transport_stores_verify_ssl_context (line 84) | def test_sse_transport_stores_verify_ssl_context(self): method test_sse_transport_verify_default_is_none (line 92) | def test_sse_transport_verify_default_is_none(self): method test_client_passes_verify_to_streamable_http_transport (line 96) | def test_client_passes_verify_to_streamable_http_transport(self): method test_client_passes_verify_ssl_context_to_transport (line 101) | def test_client_passes_verify_ssl_context_to_transport(self): method test_client_passes_verify_cert_path_to_transport (line 107) | def test_client_passes_verify_cert_path_to_transport(self): method test_client_verify_none_leaves_transport_default (line 115) | def test_client_verify_none_leaves_transport_default(self): method test_client_verify_raises_for_non_http_transport (line 120) | def test_client_verify_raises_for_non_http_transport(self): method test_client_passes_verify_to_sse_transport (line 130) | def test_client_passes_verify_to_sse_transport(self): method test_streamable_http_verify_propagates_to_oauth (line 135) | async def test_streamable_http_verify_propagates_to_oauth(self): method test_sse_verify_propagates_to_oauth (line 148) | async def test_sse_verify_propagates_to_oauth(self): method test_client_verify_propagates_to_oauth (line 161) | async def test_client_verify_propagates_to_oauth(self): method test_verify_propagates_to_preconstructed_oauth_instance (line 175) | async def test_verify_propagates_to_preconstructed_oauth_instance(self): method test_client_verify_resyncs_existing_oauth_on_transport (line 188) | async def test_client_verify_resyncs_existing_oauth_on_transport(self): method test_client_verify_overrides_transport_verify_in_oauth (line 210) | async def test_client_verify_overrides_transport_verify_in_oauth(self): method test_oauth_custom_factory_preserved_with_verify (line 233) | async def test_oauth_custom_factory_preserved_with_verify(self): method test_warns_when_both_factory_and_verify_provided_streamable (line 247) | def test_warns_when_both_factory_and_verify_provided_streamable(self): method test_warns_when_both_factory_and_verify_provided_sse (line 256) | def test_warns_when_both_factory_and_verify_provided_sse(self): FILE: tests/client/transports/test_uv_transport.py function test_uv_transport (line 26) | async def test_uv_transport(): function test_uv_transport_module (line 63) | async def test_uv_transport_module(): FILE: tests/conftest.py function pytest_collection_modifyitems (line 25) | def pytest_collection_modifyitems(items): function import_rich_rule (line 34) | def import_rich_rule(): function enable_fastmcp_logger_propagation (line 42) | def enable_fastmcp_logger_propagation(caplog): function isolate_settings_home (line 60) | def isolate_settings_home(tmp_path: Path): function get_fn_name (line 82) | def get_fn_name(fn: Callable[..., Any]) -> str: function worker_id (line 87) | def worker_id(request): function free_port (line 93) | def free_port(): function free_port_factory (line 103) | def free_port_factory(worker_id): function otel_trace_provider (line 121) | def otel_trace_provider() -> Generator[ function trace_exporter (line 136) | def trace_exporter( function fastmcp_server (line 147) | def fastmcp_server(): function tool_server (line 197) | def tool_server(): function tagged_resources_server (line 288) | def tagged_resources_server(): FILE: tests/contrib/test_bulk_tool_caller.py class ToolException (line 16) | class ToolException(Exception): function error_tool (line 22) | async def error_tool(arg1: str) -> dict[str, Any]: function error_tool_result_factory (line 27) | def error_tool_result_factory(arg1: str) -> CallToolRequestResult: function echo_tool (line 41) | async def echo_tool(arg1: str) -> str: function echo_tool_result_factory (line 46) | def echo_tool_result_factory(arg1: str) -> CallToolRequestResult: function no_return_tool (line 56) | async def no_return_tool(arg1: str) -> None: function no_return_tool_result_factory (line 60) | def no_return_tool_result_factory(arg1: str) -> CallToolRequestResult: function live_server_with_tool (line 71) | def live_server_with_tool() -> FastMCP: function bulk_caller_live (line 81) | def bulk_caller_live(live_server_with_tool: FastMCP) -> BulkToolCaller: function test_call_tool_bulk_single_success (line 93) | async def test_call_tool_bulk_single_success(bulk_caller_live: BulkToolC... function test_call_tool_bulk_multiple_success (line 111) | async def test_call_tool_bulk_multiple_success(bulk_caller_live: BulkToo... function test_call_tool_bulk_error_stops (line 133) | async def test_call_tool_bulk_error_stops(bulk_caller_live: BulkToolCall... function test_call_tool_bulk_error_continues (line 158) | async def test_call_tool_bulk_error_continues(bulk_caller_live: BulkTool... function test_call_tools_bulk_single_success (line 190) | async def test_call_tools_bulk_single_success(bulk_caller_live: BulkTool... function test_call_tools_bulk_multiple_success (line 207) | async def test_call_tools_bulk_multiple_success(bulk_caller_live: BulkTo... function test_call_tools_bulk_error_stops (line 232) | async def test_call_tools_bulk_error_stops(bulk_caller_live: BulkToolCal... function test_call_tools_bulk_error_continues (line 260) | async def test_call_tools_bulk_error_continues(bulk_caller_live: BulkToo... function test_call_tools_bulk_blocks_self_invocation (line 291) | async def test_call_tools_bulk_blocks_self_invocation(bulk_caller_live: ... function test_call_tool_bulk_blocks_self_invocation (line 325) | async def test_call_tool_bulk_blocks_self_invocation(bulk_caller_live: B... FILE: tests/contrib/test_component_manager.py class TestComponentManagementRoutes (line 10) | class TestComponentManagementRoutes: method mcp (line 14) | def mcp(self): method client (line 46) | def client(self, mcp): method test_enable_tool_route (line 50) | async def test_enable_tool_route(self, client, mcp): method test_disable_tool_route (line 67) | async def test_disable_tool_route(self, client, mcp): method test_enable_resource_route (line 83) | async def test_enable_resource_route(self, client, mcp): method test_disable_resource_route (line 100) | async def test_disable_resource_route(self, client, mcp): method test_enable_template_route (line 116) | async def test_enable_template_route(self, client, mcp): method test_disable_template_route (line 130) | async def test_disable_template_route(self, client, mcp): method test_enable_prompt_route (line 143) | async def test_enable_prompt_route(self, client, mcp): method test_disable_prompt_route (line 160) | async def test_disable_prompt_route(self, client, mcp): class TestAuthComponentManagementRoutes (line 177) | class TestAuthComponentManagementRoutes: method setup_method (line 180) | def setup_method(self): method test_unauthorized_enable_tool (line 225) | async def test_unauthorized_enable_tool(self): method test_authorized_enable_tool (line 236) | async def test_authorized_enable_tool(self): method test_unauthorized_disable_tool (line 250) | async def test_unauthorized_disable_tool(self): method test_authorized_disable_tool (line 260) | async def test_authorized_disable_tool(self): method test_forbidden_enable_tool (line 274) | async def test_forbidden_enable_tool(self): method test_authorized_enable_resource (line 288) | async def test_authorized_enable_resource(self): method test_unauthorized_disable_resource (line 303) | async def test_unauthorized_disable_resource(self): method test_forbidden_enable_resource (line 313) | async def test_forbidden_enable_resource(self): method test_authorized_disable_resource (line 327) | async def test_authorized_disable_resource(self): method test_unauthorized_enable_prompt (line 341) | async def test_unauthorized_enable_prompt(self): method test_authorized_enable_prompt (line 352) | async def test_authorized_enable_prompt(self): method test_unauthorized_disable_prompt (line 367) | async def test_unauthorized_disable_prompt(self): method test_forbidden_disable_prompt (line 377) | async def test_forbidden_disable_prompt(self): method test_authorized_disable_prompt (line 390) | async def test_authorized_disable_prompt(self): class TestComponentManagerWithPath (line 405) | class TestComponentManagerWithPath: method mcp_with_path (line 409) | def mcp_with_path(self): method client_with_path (line 428) | def client_with_path(self, mcp_with_path): method test_enable_tool_route_with_path (line 431) | async def test_enable_tool_route_with_path(self, client_with_path, mcp... method test_disable_resource_route_with_path (line 441) | async def test_disable_resource_route_with_path( method test_enable_prompt_route_with_path (line 452) | async def test_enable_prompt_route_with_path(self, client_with_path, m... class TestComponentManagerWithPathAuth (line 463) | class TestComponentManagerWithPathAuth: method setup_method (line 466) | def setup_method(self): method test_unauthorized_enable_tool (line 505) | async def test_unauthorized_enable_tool(self): method test_forbidden_enable_tool (line 514) | async def test_forbidden_enable_tool(self): method test_authorized_enable_tool (line 526) | async def test_authorized_enable_tool(self): method test_unauthorized_disable_resource (line 539) | async def test_unauthorized_disable_resource(self): method test_forbidden_disable_resource (line 547) | async def test_forbidden_disable_resource(self): method test_authorized_disable_resource (line 558) | async def test_authorized_disable_resource(self): method test_unauthorized_enable_prompt (line 570) | async def test_unauthorized_enable_prompt(self): method test_forbidden_enable_prompt (line 579) | async def test_forbidden_enable_prompt(self): method test_authorized_enable_prompt (line 591) | async def test_authorized_enable_prompt(self): FILE: tests/contrib/test_mcp_mixin.py class TestMCPMixin (line 24) | class TestMCPMixin: method test_initialization (line 27) | def test_initialization(self): method test_tool_registration (line 61) | async def test_tool_registration( method test_resource_registration (line 106) | async def test_resource_registration( method test_prompt_registration (line 152) | async def test_prompt_registration( method test_register_all_no_prefix (line 170) | async def test_register_all_no_prefix(self): method test_register_all_with_prefix_default_separators (line 198) | async def test_register_all_with_prefix_default_separators(self): method test_register_all_with_prefix_custom_separators (line 231) | async def test_register_all_with_prefix_custom_separators(self): method test_tool_with_title_and_meta (line 277) | async def test_tool_with_title_and_meta(self): method test_resource_with_meta (line 301) | async def test_resource_with_meta(self): method test_prompt_with_title_and_meta (line 325) | async def test_prompt_with_title_and_meta(self): class TestMCPMixinKwargsSync (line 347) | class TestMCPMixinKwargsSync: method test_tool_valid_kwargs_match_from_function (line 350) | def test_tool_valid_kwargs_match_from_function(self): method test_resource_valid_kwargs_match_from_function (line 358) | def test_resource_valid_kwargs_match_from_function(self): method test_prompt_valid_kwargs_match_from_function (line 368) | def test_prompt_valid_kwargs_match_from_function(self): class TestMCPMixinValidation (line 377) | class TestMCPMixinValidation: method test_mcp_tool_rejects_unknown_param (line 380) | def test_mcp_tool_rejects_unknown_param(self): method test_mcp_resource_rejects_unknown_param (line 387) | def test_mcp_resource_rejects_unknown_param(self): method test_mcp_prompt_rejects_unknown_param (line 394) | def test_mcp_prompt_rejects_unknown_param(self): method test_error_raised_at_decoration_not_registration (line 401) | def test_error_raised_at_decoration_not_registration(self): class TestMCPMixinEnabled (line 411) | class TestMCPMixinEnabled: method test_tool_enabled_false_skips_registration (line 414) | async def test_tool_enabled_false_skips_registration(self): method test_resource_enabled_false_skips_registration (line 432) | async def test_resource_enabled_false_skips_registration(self): method test_prompt_enabled_false_skips_registration (line 450) | async def test_prompt_enabled_false_skips_registration(self): method test_tool_enabled_true_registers_normally (line 468) | async def test_tool_enabled_true_registers_normally(self): class TestMCPMixinNewParams (line 481) | class TestMCPMixinNewParams: method test_tool_auth_param_forwarded (line 484) | async def test_tool_auth_param_forwarded(self): method test_tool_timeout_param_forwarded (line 499) | async def test_tool_timeout_param_forwarded(self): method test_tool_version_param_forwarded (line 511) | async def test_tool_version_param_forwarded(self): method test_resource_auth_param_forwarded (line 523) | async def test_resource_auth_param_forwarded(self): method test_prompt_auth_param_forwarded (line 538) | async def test_prompt_auth_param_forwarded(self): FILE: tests/deprecated/conftest.py function pytest_collection_modifyitems (line 6) | def pytest_collection_modifyitems(items): FILE: tests/deprecated/openapi/test_openapi.py class TestDeprecatedServerOpenAPIImports (line 12) | class TestDeprecatedServerOpenAPIImports: method test_import_fastmcp_openapi_emits_warning (line 15) | def test_import_fastmcp_openapi_emits_warning(self): method test_import_routing_emits_warning (line 32) | def test_import_routing_emits_warning(self): method test_fastmcp_openapi_class_emits_warning (line 48) | def test_fastmcp_openapi_class_emits_warning(self): method test_deprecated_imports_still_work (line 68) | def test_deprecated_imports_still_work(self): method test_deprecated_routing_imports_still_work (line 86) | def test_deprecated_routing_imports_still_work(self): class TestDeprecatedExperimentalOpenAPIImports (line 103) | class TestDeprecatedExperimentalOpenAPIImports: method test_experimental_import_emits_warning (line 106) | def test_experimental_import_emits_warning(self): method test_experimental_imports_still_work (line 122) | def test_experimental_imports_still_work(self): class TestDeprecatedComponentsImports (line 138) | class TestDeprecatedComponentsImports: method test_components_import_emits_warning (line 141) | def test_components_import_emits_warning(self): method test_components_imports_still_work (line 157) | def test_components_imports_still_work(self): FILE: tests/deprecated/server/test_include_exclude_tags.py class TestIncludeExcludeTagsRemoved (line 8) | class TestIncludeExcludeTagsRemoved: method test_exclude_tags_raises_type_error (line 11) | def test_exclude_tags_raises_type_error(self): method test_include_tags_raises_type_error (line 15) | def test_include_tags_raises_type_error(self): method test_exclude_tags_error_mentions_disable (line 19) | def test_exclude_tags_error_mentions_disable(self): method test_include_tags_error_mentions_enable (line 23) | def test_include_tags_error_mentions_enable(self): FILE: tests/deprecated/test_add_tool_transformation.py class TestAddToolTransformationDeprecated (line 10) | class TestAddToolTransformationDeprecated: method test_add_tool_transformation_emits_warning (line 13) | async def test_add_tool_transformation_emits_warning(self): method test_add_tool_transformation_still_works (line 31) | async def test_add_tool_transformation_still_works(self): method test_remove_tool_transformation_emits_warning (line 58) | async def test_remove_tool_transformation_emits_warning(self): method test_tool_transformations_constructor_raises_type_error (line 71) | async def test_tool_transformations_constructor_raises_type_error(self): FILE: tests/deprecated/test_deprecated.py class TestRemovedKwargs (line 7) | class TestRemovedKwargs: method test_host_kwarg_raises_type_error (line 8) | def test_host_kwarg_raises_type_error(self): method test_settings_property_removed (line 12) | def test_settings_property_removed(self): function test_http_app_with_sse_transport (line 19) | def test_http_app_with_sse_transport(): FILE: tests/deprecated/test_exclude_args.py function test_tool_exclude_args (line 10) | async def test_tool_exclude_args(): function test_tool_exclude_args_without_default_value_raises_error (line 27) | async def test_tool_exclude_args_without_default_value_raises_error(): function test_add_tool_method_exclude_args (line 42) | async def test_add_tool_method_exclude_args(): function test_tool_functionality_with_exclude_args (line 68) | async def test_tool_functionality_with_exclude_args(): function test_exclude_args_with_non_serializable_type (line 96) | async def test_exclude_args_with_non_serializable_type(): FILE: tests/deprecated/test_function_component_imports.py class TestDeprecatedFunctionToolImports (line 10) | class TestDeprecatedFunctionToolImports: method test_function_tool_from_tool_module (line 11) | def test_function_tool_from_tool_module(self): method test_parsed_function_from_tool_module (line 25) | def test_parsed_function_from_tool_module(self): method test_tool_decorator_from_tool_module (line 38) | def test_tool_decorator_from_tool_module(self): method test_no_warning_when_disabled (line 49) | def test_no_warning_when_disabled(self): class TestDeprecatedFunctionResourceImports (line 56) | class TestDeprecatedFunctionResourceImports: method test_function_resource_from_resource_module (line 57) | def test_function_resource_from_resource_module(self): method test_resource_decorator_from_resource_module (line 71) | def test_resource_decorator_from_resource_module(self): method test_no_warning_when_disabled (line 85) | def test_no_warning_when_disabled(self): class TestDeprecatedFunctionPromptImports (line 92) | class TestDeprecatedFunctionPromptImports: method test_function_prompt_from_prompt_module (line 93) | def test_function_prompt_from_prompt_module(self): method test_prompt_decorator_from_prompt_module (line 106) | def test_prompt_decorator_from_prompt_module(self): method test_no_warning_when_disabled (line 117) | def test_no_warning_when_disabled(self): FILE: tests/deprecated/test_import_server.py function test_import_basic_functionality (line 13) | async def test_import_basic_functionality(): function test_import_multiple_apps (line 42) | async def test_import_multiple_apps(): function test_import_combines_tools (line 68) | async def test_import_combines_tools(): function test_import_with_resources (line 100) | async def test_import_with_resources(): function test_import_with_resource_templates (line 119) | async def test_import_with_resource_templates(): function test_import_with_prompts (line 142) | async def test_import_with_prompts(): function test_import_multiple_resource_templates (line 161) | async def test_import_multiple_resource_templates(): function test_import_multiple_prompts (line 187) | async def test_import_multiple_prompts(): function test_tool_custom_name_preserved_when_imported (line 213) | async def test_tool_custom_name_preserved_when_imported(): function test_call_imported_custom_named_tool (line 233) | async def test_call_imported_custom_named_tool(): function test_first_level_importing_with_custom_name (line 249) | async def test_first_level_importing_with_custom_name(): function test_nested_importing_preserves_prefixes (line 267) | async def test_nested_importing_preserves_prefixes(): function test_call_nested_imported_tool (line 285) | async def test_call_nested_imported_tool(): function test_import_with_proxy_tools (line 303) | async def test_import_with_proxy_tools(): function test_import_with_proxy_prompts (line 327) | async def test_import_with_proxy_prompts(): function test_import_with_proxy_resources (line 353) | async def test_import_with_proxy_resources(): function test_import_with_proxy_resource_templates (line 388) | async def test_import_with_proxy_resource_templates(): function test_import_with_no_prefix (line 421) | async def test_import_with_no_prefix(): function test_import_conflict_resolution_tools (line 478) | async def test_import_conflict_resolution_tools(): function test_import_conflict_resolution_resources (line 507) | async def test_import_conflict_resolution_resources(): function test_import_conflict_resolution_templates (line 537) | async def test_import_conflict_resolution_templates(): function test_import_conflict_resolution_prompts (line 569) | async def test_import_conflict_resolution_prompts(): function test_import_conflict_resolution_with_prefix (line 600) | async def test_import_conflict_resolution_with_prefix(): function test_import_server_resource_uri_prefixing (line 629) | async def test_import_server_resource_uri_prefixing(): function test_import_server_resource_template_uri_prefixing (line 650) | async def test_import_server_resource_template_uri_prefixing(): function test_import_server_with_new_prefix_format (line 671) | async def test_import_server_with_new_prefix_format(): FILE: tests/deprecated/test_openapi_deprecations.py class TestExperimentalOpenAPIImportDeprecation (line 9) | class TestExperimentalOpenAPIImportDeprecation: method test_experimental_server_openapi_import_warns (line 12) | def test_experimental_server_openapi_import_warns(self): method test_experimental_utilities_openapi_import_warns (line 22) | def test_experimental_utilities_openapi_import_warns(self): method test_experimental_imports_resolve_to_same_classes (line 32) | def test_experimental_imports_resolve_to_same_classes(self): FILE: tests/deprecated/test_settings.py class TestRemovedServerInitKwargs (line 6) | class TestRemovedServerInitKwargs: method test_removed_kwarg_raises_type_error (line 34) | def test_removed_kwarg_raises_type_error(self, kwarg, value, expected_... method test_removed_kwarg_error_includes_migration_hint (line 46) | def test_removed_kwarg_error_includes_migration_hint( method test_unknown_kwarg_raises_standard_type_error (line 52) | def test_unknown_kwarg_raises_standard_type_error(self): method test_valid_kwargs_still_work (line 56) | def test_valid_kwargs_still_work(self): FILE: tests/deprecated/test_tool_injection_middleware.py class TestPromptToolMiddleware (line 18) | class TestPromptToolMiddleware: method server_with_prompts (line 22) | def server_with_prompts(self): method test_prompt_tools_added_to_list (line 43) | async def test_prompt_tools_added_to_list(self, server_with_prompts: F... method test_list_prompts_tool_works (line 58) | async def test_list_prompts_tool_works(self, server_with_prompts: Fast... method test_get_prompt_tool_works (line 102) | async def test_get_prompt_tool_works(self, server_with_prompts: FastMCP): class TestResourceToolMiddleware (line 142) | class TestResourceToolMiddleware: method server_with_resources (line 146) | def server_with_resources(self): method test_resource_tools_added_to_list (line 167) | async def test_resource_tools_added_to_list(self, server_with_resource... method test_list_resources_tool_works (line 182) | async def test_list_resources_tool_works(self, server_with_resources: ... method test_read_resource_tool_works (line 220) | async def test_read_resource_tool_works(self, server_with_resources: F... FILE: tests/deprecated/test_tool_serializer.py class TestToolSerializerDeprecated (line 21) | class TestToolSerializerDeprecated: method test_tool_serializer (line 24) | async def test_tool_serializer(self): method test_custom_serializer (line 42) | def test_custom_serializer(self): method test_custom_serializer_error_fallback (line 54) | def test_custom_serializer_error_fallback(self, caplog): class TestSerializerDeprecationWarnings (line 68) | class TestSerializerDeprecationWarnings: method test_tool_from_function_serializer_warning (line 71) | def test_tool_from_function_serializer_warning(self): method test_tool_from_function_serializer_no_warning_when_disabled (line 84) | def test_tool_from_function_serializer_no_warning_when_disabled(self): method test_local_provider_tool_serializer_warning (line 99) | def test_local_provider_tool_serializer_warning(self): method test_local_provider_tool_decorator_serializer_warning (line 113) | def test_local_provider_tool_decorator_serializer_warning(self): method test_fastmcp_tool_serializer_warning (line 127) | def test_fastmcp_tool_serializer_warning(self): method test_fastmcp_tool_serializer_parameter_raises_type_error (line 143) | def test_fastmcp_tool_serializer_parameter_raises_type_error(self): method test_transformed_tool_from_tool_serializer_warning (line 152) | def test_transformed_tool_from_tool_serializer_warning(self): method test_mcp_mixin_tool_serializer_warning (line 167) | def test_mcp_mixin_tool_serializer_warning(self): FILE: tests/experimental/transforms/test_code_mode.py function _unwrap_result (line 22) | def _unwrap_result(result: ToolResult) -> Any: function _unwrap_string_result (line 48) | def _unwrap_string_result(result: ToolResult) -> str: class _UnsafeTestSandboxProvider (line 61) | class _UnsafeTestSandboxProvider: method run (line 64) | async def run( function _run_tool (line 89) | async def _run_tool( function test_code_mode_default_tools (line 100) | async def test_code_mode_default_tools() -> None: function test_code_mode_search_returns_lightweight_results (line 114) | async def test_code_mode_search_returns_lightweight_results() -> None: function test_code_mode_get_schema_brief (line 138) | async def test_code_mode_get_schema_brief() -> None: function test_code_mode_get_schema_detailed (line 159) | async def test_code_mode_get_schema_detailed() -> None: function test_code_mode_get_schema_full (line 180) | async def test_code_mode_get_schema_full() -> None: function test_code_mode_get_schema_default_is_detailed (line 199) | async def test_code_mode_get_schema_default_is_detailed() -> None: function test_code_mode_get_schema_not_found (line 216) | async def test_code_mode_get_schema_not_found() -> None: function test_code_mode_get_schema_partial_match (line 232) | async def test_code_mode_get_schema_partial_match() -> None: function test_code_mode_execute_works (line 249) | async def test_code_mode_execute_works() -> None: function test_code_mode_custom_execute_name (line 270) | async def test_code_mode_custom_execute_name() -> None: function test_code_mode_custom_execute_description (line 290) | async def test_code_mode_custom_execute_description() -> None: function test_code_mode_default_execute_description (line 309) | async def test_code_mode_default_execute_description() -> None: function test_code_mode_no_discovery_tools (line 335) | async def test_code_mode_no_discovery_tools() -> None: function test_code_mode_custom_discovery_tool_function (line 354) | async def test_code_mode_custom_discovery_tool_function() -> None: function test_code_mode_search_detailed (line 388) | async def test_code_mode_search_detailed() -> None: function test_code_mode_search_tool_full_detail (line 407) | async def test_code_mode_search_tool_full_detail() -> None: function test_code_mode_custom_search_tool_name (line 431) | async def test_code_mode_custom_search_tool_name() -> None: function test_code_mode_rejects_discovery_execute_name_collision (line 453) | def test_code_mode_rejects_discovery_execute_name_collision() -> None: function test_code_mode_rejects_duplicate_discovery_names (line 463) | def test_code_mode_rejects_duplicate_discovery_names() -> None: function test_code_mode_execute_respects_disabled_tool_visibility (line 478) | async def test_code_mode_execute_respects_disabled_tool_visibility() -> ... function test_code_mode_search_respects_disabled_tool_visibility (line 494) | async def test_code_mode_search_respects_disabled_tool_visibility() -> N... function test_code_mode_execute_sees_mid_run_visibility_changes (line 510) | async def test_code_mode_execute_sees_mid_run_visibility_changes() -> None: function test_code_mode_execute_respects_tool_auth (line 536) | async def test_code_mode_execute_respects_tool_auth() -> None: function test_code_mode_search_respects_tool_auth (line 551) | async def test_code_mode_search_respects_tool_auth() -> None: function test_code_mode_shadows_colliding_tool_names (line 566) | async def test_code_mode_shadows_colliding_tool_names() -> None: function test_code_mode_get_tool_returns_meta_tools_and_passes_through (line 595) | async def test_code_mode_get_tool_returns_meta_tools_and_passes_through(... function test_code_mode_execute_non_text_content_stringified (line 627) | async def test_code_mode_execute_non_text_content_stringified() -> None: function test_code_mode_execute_multi_tool_chaining (line 644) | async def test_code_mode_execute_multi_tool_chaining() -> None: function test_code_mode_sandbox_error_surfaces_as_tool_error (line 672) | async def test_code_mode_sandbox_error_surfaces_as_tool_error() -> None: function test_monty_provider_raises_informative_error_when_missing (line 690) | async def test_monty_provider_raises_informative_error_when_missing( function test_monty_provider_forwards_limits (line 707) | async def test_monty_provider_forwards_limits() -> None: function test_monty_provider_no_limits_by_default (line 714) | async def test_monty_provider_no_limits_by_default() -> None: FILE: tests/experimental/transforms/test_code_mode_discovery.py function _unwrap_result (line 17) | def _unwrap_result(result: ToolResult) -> Any: function _unwrap_string_result (line 43) | def _unwrap_string_result(result: ToolResult) -> str: class _UnsafeTestSandboxProvider (line 52) | class _UnsafeTestSandboxProvider: method run (line 55) | async def run( function _run_tool (line 80) | async def _run_tool( function test_categories_brief_shows_tag_counts (line 91) | async def test_categories_brief_shows_tag_counts() -> None: function test_categories_full_lists_tools_per_tag (line 119) | async def test_categories_full_lists_tools_per_tag() -> None: function test_categories_includes_untagged (line 147) | async def test_categories_includes_untagged() -> None: function test_categories_tool_in_multiple_tags (line 171) | async def test_categories_tool_in_multiple_tags() -> None: function test_categories_detail_override_per_call (line 193) | async def test_categories_detail_override_per_call() -> None: function test_get_tags_empty_catalog (line 216) | async def test_get_tags_empty_catalog() -> None: function test_search_with_tags_filter (line 238) | async def test_search_with_tags_filter() -> None: function test_search_with_tags_filter_no_matches (line 259) | async def test_search_with_tags_filter_no_matches() -> None: function test_search_without_tags_returns_all (line 274) | async def test_search_without_tags_returns_all() -> None: function test_search_with_untagged_filter (line 296) | async def test_search_with_untagged_filter() -> None: function test_search_default_detail_detailed_skips_get_schema (line 318) | async def test_search_default_detail_detailed_skips_get_schema() -> None: function test_search_full_detail_empty_results_returns_json (line 341) | async def test_search_full_detail_empty_results_returns_json() -> None: function test_get_schema_empty_tools_list (line 361) | async def test_get_schema_empty_tools_list() -> None: function test_get_schema_full_partial_match_returns_valid_json (line 376) | async def test_get_schema_full_partial_match_returns_valid_json() -> None: function test_search_shows_catalog_size_when_results_are_subset (line 402) | async def test_search_shows_catalog_size_when_results_are_subset() -> None: function test_search_omits_annotation_when_all_tools_returned (line 429) | async def test_search_omits_annotation_when_all_tools_returned() -> None: function test_search_limit_caps_results (line 450) | async def test_search_limit_caps_results() -> None: function test_search_default_limit_from_constructor (line 479) | async def test_search_default_limit_from_constructor() -> None: function test_list_tools_brief (line 515) | async def test_list_tools_brief() -> None: function test_list_tools_detailed (line 545) | async def test_list_tools_detailed() -> None: function test_list_tools_full_returns_json (line 568) | async def test_list_tools_full_returns_json() -> None: function test_list_tools_empty_catalog (line 591) | async def test_list_tools_empty_catalog() -> None: FILE: tests/experimental/transforms/test_code_mode_serialization.py function test_schema_type_basic (line 34) | def test_schema_type_basic(schema: Any, expected: str) -> None: function test_schema_type_unions (line 55) | def test_schema_type_unions(schema: Any, expected: str) -> None: function test_schema_section_fallbacks (line 76) | def test_schema_section_fallbacks(schema: Any, expected_lines: list[str]... function test_schema_section_lists_fields_with_required_marker (line 80) | def test_schema_section_lists_fields_with_required_marker() -> None: function test_serialize_tools_for_output_markdown_empty_list (line 100) | def test_serialize_tools_for_output_markdown_empty_list() -> None: function test_serialize_tools_for_output_markdown_basic_tool (line 104) | async def test_serialize_tools_for_output_markdown_basic_tool() -> None: function test_serialize_tools_for_output_markdown_omits_output_section_when_no_schema (line 121) | async def test_serialize_tools_for_output_markdown_omits_output_section_... function test_serialize_tools_for_output_markdown_includes_output_section_when_schema_present (line 136) | async def test_serialize_tools_for_output_markdown_includes_output_secti... function test_serialize_tools_for_output_markdown_omits_description_when_absent (line 151) | async def test_serialize_tools_for_output_markdown_omits_description_whe... function test_serialize_tools_for_output_markdown_optional_field_uses_question_mark (line 166) | async def test_serialize_tools_for_output_markdown_optional_field_uses_q... function test_serialize_tools_for_output_markdown_multiple_tools_separated (line 181) | async def test_serialize_tools_for_output_markdown_multiple_tools_separa... FILE: tests/fs/test_discovery.py class TestDiscoverFiles (line 18) | class TestDiscoverFiles: method test_discover_files_empty_dir (line 21) | def test_discover_files_empty_dir(self, tmp_path: Path): method test_discover_files_nonexistent_dir (line 26) | def test_discover_files_nonexistent_dir(self, tmp_path: Path): method test_discover_files_single_file (line 32) | def test_discover_files_single_file(self, tmp_path: Path): method test_discover_files_skips_init (line 40) | def test_discover_files_skips_init(self, tmp_path: Path): method test_discover_files_recursive (line 50) | def test_discover_files_recursive(self, tmp_path: Path): method test_discover_files_skips_pycache (line 62) | def test_discover_files_skips_pycache(self, tmp_path: Path): method test_discover_files_sorted (line 74) | def test_discover_files_sorted(self, tmp_path: Path): class TestImportModuleFromFile (line 85) | class TestImportModuleFromFile: method test_import_simple_module (line 88) | def test_import_simple_module(self, tmp_path: Path): method test_import_module_with_function (line 96) | def test_import_module_with_function(self, tmp_path: Path): method test_import_module_with_imports (line 109) | def test_import_module_with_imports(self, tmp_path: Path): method test_import_as_package_with_init (line 125) | def test_import_as_package_with_init(self, tmp_path: Path): method test_import_with_relative_import (line 137) | def test_import_with_relative_import(self, tmp_path: Path): method test_import_package_module_reload (line 155) | def test_import_package_module_reload(self, tmp_path: Path): class TestExtractComponents (line 176) | class TestExtractComponents: method test_extract_no_components (line 179) | def test_extract_no_components(self, tmp_path: Path): method test_extract_tool_component (line 195) | def test_extract_tool_component(self, tmp_path: Path): method test_extract_multiple_components (line 216) | def test_extract_multiple_components(self, tmp_path: Path): method test_extract_skips_private_components (line 246) | def test_extract_skips_private_components(self, tmp_path: Path): method test_extract_resource_template (line 272) | def test_extract_resource_template(self, tmp_path: Path): class TestDiscoverAndImport (line 294) | class TestDiscoverAndImport: method test_discover_and_import_empty (line 297) | def test_discover_and_import_empty(self, tmp_path: Path): method test_discover_and_import_with_tools (line 303) | def test_discover_and_import_with_tools(self, tmp_path: Path): method test_discover_and_import_skips_bad_imports (line 325) | def test_discover_and_import_skips_bad_imports(self, tmp_path: Path): class TestExtractComponentsVersion (line 359) | class TestExtractComponentsVersion: method test_extract_tool_preserves_version (line 362) | def test_extract_tool_preserves_version(self, tmp_path: Path): method test_extract_resource_preserves_version (line 388) | def test_extract_resource_preserves_version(self, tmp_path: Path): method test_extract_resource_template_preserves_version (line 408) | def test_extract_resource_template_preserves_version(self, tmp_path: P... method test_extract_prompt_preserves_version (line 428) | def test_extract_prompt_preserves_version(self, tmp_path: Path): method test_discovered_tool_meta_includes_version (line 448) | def test_discovered_tool_meta_includes_version(self, tmp_path: Path): method test_unversioned_components_have_no_version (line 468) | def test_unversioned_components_have_no_version(self, tmp_path: Path): FILE: tests/fs/test_provider.py class TestFileSystemProvider (line 11) | class TestFileSystemProvider: method test_provider_empty_directory (line 14) | def test_provider_empty_directory(self, tmp_path: Path): method test_provider_discovers_tools (line 19) | def test_provider_discovers_tools(self, tmp_path: Path): method test_provider_discovers_resources (line 39) | def test_provider_discovers_resources(self, tmp_path: Path): method test_provider_discovers_resource_templates (line 55) | def test_provider_discovers_resource_templates(self, tmp_path: Path): method test_provider_discovers_prompts (line 71) | def test_provider_discovers_prompts(self, tmp_path: Path): method test_provider_discovers_multiple_in_one_file (line 87) | def test_provider_discovers_multiple_in_one_file(self, tmp_path: Path): method test_provider_skips_undecorated_files (line 111) | def test_provider_skips_undecorated_files(self, tmp_path: Path): class TestFileSystemProviderReloadMode (line 136) | class TestFileSystemProviderReloadMode: method test_reload_false_caches_at_init (line 139) | def test_reload_false_caches_at_init(self, tmp_path: Path): method test_reload_true_rescans (line 168) | async def test_reload_true_rescans(self, tmp_path: Path): method test_warning_deduplication_same_file (line 201) | async def test_warning_deduplication_same_file(self, tmp_path: Path, c... method test_warning_on_file_change (line 218) | async def test_warning_on_file_change(self, tmp_path: Path, capsys): method test_warning_cleared_when_fixed (line 240) | async def test_warning_cleared_when_fixed(self, tmp_path: Path, capsys): class TestFileSystemProviderIntegration (line 281) | class TestFileSystemProviderIntegration: method test_provider_with_fastmcp_server (line 284) | async def test_provider_with_fastmcp_server(self, tmp_path: Path): method test_provider_with_resources (line 310) | async def test_provider_with_resources(self, tmp_path: Path): method test_provider_with_resource_templates (line 336) | async def test_provider_with_resource_templates(self, tmp_path: Path): method test_provider_with_prompts (line 361) | async def test_provider_with_prompts(self, tmp_path: Path): method test_nested_directory_structure (line 387) | async def test_nested_directory_structure(self, tmp_path: Path): class TestFileSystemProviderVersioning (line 424) | class TestFileSystemProviderVersioning: method test_versioned_tool_via_provider (line 427) | async def test_versioned_tool_via_provider(self, tmp_path: Path): method test_versioned_resource_via_provider (line 450) | async def test_versioned_resource_via_provider(self, tmp_path: Path): method test_versioned_prompt_via_provider (line 473) | async def test_versioned_prompt_via_provider(self, tmp_path: Path): method test_multiple_tool_versions_via_provider (line 496) | async def test_multiple_tool_versions_via_provider(self, tmp_path: Path): FILE: tests/integration_tests/auth/test_github_provider_integration.py function create_github_server (line 43) | def create_github_server(base_url: str) -> FastMCP: function create_github_server_with_mock_callback (line 72) | def create_github_server_with_mock_callback(base_url: str) -> FastMCP: function github_server (line 158) | async def github_server() -> AsyncGenerator[str, None]: function github_server_with_mock (line 170) | async def github_server_with_mock() -> AsyncGenerator[str, None]: function github_client (line 182) | def github_client(github_server: str) -> Client: function github_client_with_mock (line 191) | def github_client_with_mock(github_server_with_mock: str) -> Client: function test_github_oauth_credentials_available (line 199) | async def test_github_oauth_credentials_available(): function test_github_oauth_authorization_redirect (line 207) | async def test_github_oauth_authorization_redirect(github_server: str): function test_github_oauth_server_metadata (line 310) | async def test_github_oauth_server_metadata(github_server: str): function test_github_oauth_unauthorized_access (line 339) | async def test_github_oauth_unauthorized_access(github_server: str): function test_github_oauth_with_mock (line 354) | async def test_github_oauth_with_mock(github_client_with_mock: Client): function test_github_oauth_mock_only_accepts_mock_tokens (line 370) | async def test_github_oauth_mock_only_accepts_mock_tokens(github_server_... FILE: tests/integration_tests/conftest.py function _is_rate_limit_error (line 6) | def _is_rate_limit_error(excinfo, report=None) -> bool: function pytest_runtest_makereport (line 54) | def pytest_runtest_makereport(item, call): FILE: tests/integration_tests/test_github_mcp_remote.py function fixture_streamable_http_client (line 26) | def fixture_streamable_http_client() -> Client[StreamableHttpTransport]: class TestGithubMCPRemote (line 37) | class TestGithubMCPRemote: method test_connect_disconnect (line 38) | async def test_connect_disconnect( method test_ping (line 47) | async def test_ping(self, streamable_http_client: Client[StreamableHtt... method test_list_tools (line 54) | async def test_list_tools( method test_list_resources (line 70) | async def test_list_resources( method test_list_prompts (line 80) | async def test_list_prompts( method test_call_tool_ko (line 90) | async def test_call_tool_ko( method test_call_tool_list_commits (line 99) | async def test_call_tool_list_commits( FILE: tests/integration_tests/test_timeout_fix.py function create_test_server (line 13) | def create_test_server() -> FastMCP: function streamable_http_server (line 27) | async def streamable_http_server(): function test_slow_tool_with_http_transport (line 36) | async def test_slow_tool_with_http_transport(streamable_http_server: str): FILE: tests/prompts/test_prompt.py class TestRenderPrompt (line 12) | class TestRenderPrompt: method test_basic_fn (line 13) | async def test_basic_fn(self): method test_async_fn (line 21) | async def test_async_fn(self): method test_fn_with_args (line 29) | async def test_fn_with_args(self): method test_callable_object (line 37) | async def test_callable_object(self): method test_async_callable_object (line 46) | async def test_async_callable_object(self): method test_fn_with_invalid_kwargs (line 55) | async def test_fn_with_invalid_kwargs(self): method test_fn_returns_message_list (line 63) | async def test_fn_returns_message_list(self): method test_fn_returns_assistant_message (line 71) | async def test_fn_returns_assistant_message(self): method test_fn_returns_multiple_messages (line 79) | async def test_fn_returns_multiple_messages(self): method test_fn_returns_list_of_strings (line 93) | async def test_fn_returns_list_of_strings(self): method test_fn_returns_resource_content (line 106) | async def test_fn_returns_resource_content(self): method test_fn_returns_mixed_content (line 140) | async def test_fn_returns_mixed_content(self): method test_fn_returns_message_with_resource (line 178) | async def test_fn_returns_message_with_resource(self): class TestPromptTypeConversion (line 213) | class TestPromptTypeConversion: method test_list_of_integers_as_string_args (line 214) | async def test_list_of_integers_as_string_args(self): method test_various_type_conversions (line 237) | async def test_various_type_conversions(self): method test_type_conversion_error_handling (line 267) | async def test_type_conversion_error_handling(self): method test_json_parsing_fallback (line 282) | async def test_json_parsing_fallback(self): method test_mixed_string_and_typed_args (line 298) | async def test_mixed_string_and_typed_args(self): class TestPromptArgumentDescriptions (line 316) | class TestPromptArgumentDescriptions: method test_enhanced_descriptions_for_non_string_types (line 317) | def test_enhanced_descriptions_for_non_string_types(self): method test_enhanced_descriptions_with_existing_descriptions (line 386) | def test_enhanced_descriptions_with_existing_descriptions(self): method test_string_parameters_no_enhancement (line 416) | def test_string_parameters_no_enhancement(self): method test_prompt_meta_parameter (line 433) | def test_prompt_meta_parameter(self): class TestMessage (line 449) | class TestMessage: method test_message_string_content (line 450) | def test_message_string_content(self): method test_message_with_role (line 459) | def test_message_with_role(self): method test_message_auto_serializes_dict (line 468) | def test_message_auto_serializes_dict(self): method test_message_auto_serializes_list (line 478) | def test_message_auto_serializes_list(self): method test_message_to_mcp_prompt_message (line 486) | def test_message_to_mcp_prompt_message(self): method test_message_passthrough_image_content (line 496) | def test_message_passthrough_image_content(self): method test_message_passthrough_audio_content (line 506) | def test_message_passthrough_audio_content(self): method test_message_image_content_to_mcp_prompt_message (line 516) | def test_message_image_content_to_mcp_prompt_message(self): class TestPromptResult (line 527) | class TestPromptResult: method test_promptresult_from_string (line 528) | def test_promptresult_from_string(self): method test_promptresult_from_message_list (line 538) | def test_promptresult_from_message_list(self): method test_promptresult_rejects_single_message (line 550) | def test_promptresult_rejects_single_message(self): method test_promptresult_rejects_dict (line 555) | def test_promptresult_rejects_dict(self): method test_promptresult_with_meta (line 560) | def test_promptresult_with_meta(self): method test_promptresult_with_description (line 567) | def test_promptresult_with_description(self): method test_promptresult_to_mcp (line 572) | def test_promptresult_to_mcp(self): class TestPromptFieldDefaults (line 585) | class TestPromptFieldDefaults: method test_field_with_default (line 588) | async def test_field_with_default(self): method test_annotated_field_with_default_in_signature (line 605) | async def test_annotated_field_with_default_in_signature(self): method test_multiple_field_defaults (line 623) | async def test_multiple_field_defaults(self): method test_field_defaults_with_type_conversion (line 650) | async def test_field_defaults_with_type_conversion(self): class TestPromptCallableAndConcurrency (line 667) | class TestPromptCallableAndConcurrency: method test_callable_object_sync (line 670) | async def test_callable_object_sync(self): method test_callable_object_async (line 684) | async def test_callable_object_async(self): method test_sync_prompt_runs_concurrently (line 698) | async def test_sync_prompt_runs_concurrently(self): FILE: tests/prompts/test_standalone_decorator.py class TestPromptDecorator (line 18) | class TestPromptDecorator: method test_prompt_without_parens (line 21) | def test_prompt_without_parens(self): method test_prompt_with_empty_parens (line 34) | def test_prompt_with_empty_parens(self): method test_prompt_with_name_arg (line 46) | def test_prompt_with_name_arg(self): method test_prompt_with_name_kwarg (line 58) | def test_prompt_with_name_kwarg(self): method test_prompt_with_all_metadata (line 70) | def test_prompt_with_all_metadata(self): method test_prompt_function_still_callable (line 92) | async def test_prompt_function_still_callable(self): method test_prompt_rejects_classmethod_decorator (line 104) | def test_prompt_rejects_classmethod_decorator(self): method test_prompt_with_both_name_args_raises (line 114) | def test_prompt_with_both_name_args_raises(self): method test_prompt_added_to_server (line 122) | async def test_prompt_added_to_server(self): FILE: tests/resources/test_file_resources.py function temp_file (line 14) | def temp_file(): class TestFileResource (line 30) | class TestFileResource: method test_file_resource_creation (line 33) | def test_file_resource_creation(self, temp_file: Path): method test_file_resource_str_path_conversion (line 48) | def test_file_resource_str_path_conversion(self, temp_file: Path): method test_read_text_file (line 58) | async def test_read_text_file(self, temp_file: Path): method test_read_binary_file (line 71) | async def test_read_binary_file(self, temp_file: Path): method test_relative_path_error (line 84) | def test_relative_path_error(self): method test_missing_file_error (line 93) | async def test_missing_file_error(self, temp_file: Path): method test_permission_error (line 109) | async def test_permission_error(self, temp_file: Path): FILE: tests/resources/test_function_resources.py class TestFunctionResource (line 8) | class TestFunctionResource: method test_function_resource_creation (line 11) | def test_function_resource_creation(self): method test_read_text (line 29) | async def test_read_text(self): method test_read_binary (line 50) | async def test_read_binary(self): method test_dict_return_raises_type_error (line 69) | async def test_dict_return_raises_type_error(self): method test_error_handling (line 88) | async def test_error_handling(self): method test_basemodel_return_raises_type_error (line 102) | async def test_basemodel_return_raises_type_error(self): method test_custom_type_return_raises_type_error (line 121) | async def test_custom_type_return_raises_type_error(self): method test_async_read_text (line 144) | async def test_async_read_text(self): method test_resource_content_text (line 164) | async def test_resource_content_text(self): method test_resource_content_binary (line 185) | async def test_resource_content_binary(self): method test_resource_content_without_meta (line 205) | async def test_resource_content_without_meta(self): method test_async_resource_content (line 212) | async def test_async_resource_content(self): class TestResourceContentToMcp (line 232) | class TestResourceContentToMcp: method test_text_content_to_mcp (line 235) | def test_text_content_to_mcp(self): method test_binary_content_to_mcp (line 249) | def test_binary_content_to_mcp(self): method test_default_mime_types (line 263) | def test_default_mime_types(self): method test_none_meta (line 273) | def test_none_meta(self): class TestFunctionResourceCallable (line 281) | class TestFunctionResourceCallable: method test_callable_object_sync (line 284) | async def test_callable_object_sync(self): method test_callable_object_async (line 298) | async def test_callable_object_async(self): method test_sync_resource_runs_concurrently (line 314) | async def test_sync_resource_runs_concurrently(self): FILE: tests/resources/test_resource_template.py class TestResourceTemplate (line 13) | class TestResourceTemplate: method test_template_creation (line 16) | def test_template_creation(self): method test_template_matches (line 33) | def test_template_matches(self): method test_template_matches_with_prefix (line 53) | def test_template_matches_with_prefix(self): method test_template_uri_validation (line 74) | def test_template_uri_validation(self): method test_template_uri_params_subset_of_function_params (line 89) | def test_template_uri_params_subset_of_function_params(self): method test_required_params_subset_of_uri_params (line 114) | def test_required_params_subset_of_uri_params(self): method test_multiple_required_params (line 142) | def test_multiple_required_params(self): method test_create_resource (line 167) | async def test_create_resource(self): method test_async_text_resource (line 194) | async def test_async_text_resource(self): method test_async_binary_resource (line 216) | async def test_async_binary_resource(self): method test_basemodel_conversion (line 238) | async def test_basemodel_conversion(self): method test_custom_type_conversion (line 266) | async def test_custom_type_conversion(self): method test_wildcard_param_can_create_resource (line 296) | async def test_wildcard_param_can_create_resource(self): method test_wildcard_param_matches (line 313) | async def test_wildcard_param_matches(self): method test_multiple_wildcard_params (line 326) | async def test_multiple_wildcard_params(self): method test_wildcard_param_with_regular_param (line 341) | async def test_wildcard_param_with_regular_param(self): method test_function_with_varargs_not_allowed (line 356) | async def test_function_with_varargs_not_allowed(self): method test_function_with_varkwargs_ok (line 370) | async def test_function_with_varkwargs_ok(self): method test_callable_object_as_template (line 381) | async def test_callable_object_as_template(self): class TestMatchUriTemplate (line 408) | class TestMatchUriTemplate: method test_match_uri_template_single_param (line 421) | def test_match_uri_template_single_param( method test_match_uri_template_simple_params (line 453) | def test_match_uri_template_simple_params( method test_match_uri_template_params_and_literal_segments (line 471) | def test_match_uri_template_params_and_literal_segments( method test_match_uri_template_with_prefix (line 489) | def test_match_uri_template_with_prefix( method test_match_uri_template_quoted_params (line 497) | def test_match_uri_template_quoted_params(self): method test_match_uri_template_wildcard_param (line 516) | def test_match_uri_template_wildcard_param( method test_match_uri_template_multiple_wildcard_params (line 533) | def test_match_uri_template_multiple_wildcard_params( method test_match_uri_template_wildcard_and_literal_param (line 541) | def test_match_uri_template_wildcard_and_literal_param(self): method test_match_consecutive_params (line 548) | def test_match_consecutive_params(self): method test_match_uri_template_with_non_slash_suffix (line 565) | def test_match_uri_template_with_non_slash_suffix( method test_match_uri_template_embedded_param (line 585) | def test_match_uri_template_embedded_param( method test_match_uri_template_embedded_param_with_prefix_and_suffix (line 605) | def test_match_uri_template_embedded_param_with_prefix_and_suffix( class TestContextHandling (line 614) | class TestContextHandling: method test_context_parameter_detection (line 617) | def test_context_parameter_detection(self): method test_parameterized_context_parameter_detection (line 639) | def test_parameterized_context_parameter_detection(self): method test_parameterized_union_context_parameter_detection (line 652) | def test_parameterized_union_context_parameter_detection(self): method test_context_injection (line 665) | async def test_context_injection(self): method test_context_optional (line 694) | async def test_context_optional(self): method test_context_with_functools_wraps_decorator (line 721) | async def test_context_with_functools_wraps_decorator(self): class TestMalformedURITemplates (line 752) | class TestMalformedURITemplates: method test_build_regex_returns_none_for_invalid_group_names (line 770) | def test_build_regex_returns_none_for_invalid_group_names(self, templa... method test_build_regex_returns_none_for_duplicate_group_names (line 773) | def test_build_regex_returns_none_for_duplicate_group_names(self): method test_match_uri_template_returns_none_for_malformed_templates (line 789) | def test_match_uri_template_returns_none_for_malformed_templates( method test_resource_template_matches_returns_none_for_malformed_template (line 794) | def test_resource_template_matches_returns_none_for_malformed_template... method test_build_regex_still_works_for_valid_templates (line 802) | def test_build_regex_still_works_for_valid_templates(self): FILE: tests/resources/test_resource_template_meta.py class TestResourceTemplateMeta (line 4) | class TestResourceTemplateMeta: method test_template_meta_parameter (line 7) | def test_template_meta_parameter(self): FILE: tests/resources/test_resource_template_query_params.py class TestQueryParameterExtraction (line 6) | class TestQueryParameterExtraction: method test_single_query_param (line 9) | async def test_single_query_param(self): method test_multiple_query_params (line 29) | async def test_multiple_query_params(self): class TestQueryParameterTypeCoercion (line 54) | class TestQueryParameterTypeCoercion: method test_int_coercion (line 57) | async def test_int_coercion(self): method test_bool_coercion (line 81) | async def test_bool_coercion(self): method test_float_coercion (line 112) | async def test_float_coercion(self): class TestQueryParameterValidation (line 140) | class TestQueryParameterValidation: method test_query_params_must_be_optional (line 143) | def test_query_params_must_be_optional(self): method test_required_params_in_path (line 159) | def test_required_params_in_path(self): class TestQueryParameterWithDefaults (line 174) | class TestQueryParameterWithDefaults: method test_missing_query_param_uses_default (line 177) | async def test_missing_query_param_uses_default(self): method test_partial_query_params (line 201) | async def test_partial_query_params(self): class TestQueryParameterWithWildcards (line 229) | class TestQueryParameterWithWildcards: method test_wildcard_with_query_params (line 232) | async def test_wildcard_with_query_params(self): class TestBooleanQueryParameterValidation (line 266) | class TestBooleanQueryParameterValidation: method _make_template (line 269) | async def _make_template(self): method test_invalid_boolean_value_raises_error (line 279) | async def test_invalid_boolean_value_raises_error(self): method test_valid_true_values (line 293) | async def test_valid_true_values(self, value: str): method test_valid_false_values (line 308) | async def test_valid_false_values(self, value: str): method test_various_invalid_boolean_values (line 321) | async def test_various_invalid_boolean_values(self, value: str): class TestResourceTemplateFieldDefaults (line 333) | class TestResourceTemplateFieldDefaults: method test_field_with_default (line 336) | async def test_field_with_default(self): method test_multiple_field_defaults (line 364) | async def test_multiple_field_defaults(self): FILE: tests/resources/test_resources.py class TestResourceValidation (line 10) | class TestResourceValidation: method test_resource_uri_validation (line 13) | def test_resource_uri_validation(self): method test_resource_name_from_uri (line 43) | def test_resource_name_from_uri(self): method test_provided_name_takes_precedence_over_uri (line 55) | def test_provided_name_takes_precedence_over_uri(self): method test_resource_mime_type (line 69) | def test_resource_mime_type(self): method test_resource_read_not_implemented (line 90) | async def test_resource_read_not_implemented(self): method test_resource_meta_parameter (line 100) | def test_resource_meta_parameter(self): class TestResourceContent (line 121) | class TestResourceContent: method test_string_content (line 124) | def test_string_content(self): method test_bytes_content (line 131) | def test_bytes_content(self): method test_dict_serialized_to_json (line 138) | def test_dict_serialized_to_json(self): method test_list_serialized_to_json (line 144) | def test_list_serialized_to_json(self): method test_pydantic_model_serialized_to_json (line 150) | def test_pydantic_model_serialized_to_json(self): method test_custom_mime_type (line 161) | def test_custom_mime_type(self): method test_with_meta (line 166) | def test_with_meta(self): method test_to_mcp_text_contents (line 171) | def test_to_mcp_text_contents(self): method test_to_mcp_blob_contents (line 183) | def test_to_mcp_blob_contents(self): class TestResourceResult (line 194) | class TestResourceResult: method test_init_from_string (line 197) | def test_init_from_string(self): method test_init_from_bytes (line 204) | def test_init_from_bytes(self): method test_init_from_dict_raises_type_error (line 211) | def test_init_from_dict_raises_type_error(self): method test_init_from_single_resource_content_raises_type_error (line 216) | def test_init_from_single_resource_content_raises_type_error(self): method test_init_from_list_of_resource_content (line 222) | def test_init_from_list_of_resource_content(self): method test_init_from_mixed_list_raises_type_error (line 233) | def test_init_from_mixed_list_raises_type_error(self): method test_init_preserves_meta (line 238) | def test_init_preserves_meta(self): method test_to_mcp_result (line 243) | def test_to_mcp_result(self): method test_to_mcp_result_multiple_contents (line 257) | def test_to_mcp_result_multiple_contents(self): class TestResourceConvertResult (line 272) | class TestResourceConvertResult: method test_passthrough_resource_result (line 275) | def test_passthrough_resource_result(self): method test_converts_raw_value (line 286) | def test_converts_raw_value(self): method test_read_returns_resource_result (line 298) | async def test_read_returns_resource_result(self): class TestResourceMetaPropagation (line 310) | class TestResourceMetaPropagation: method test_resource_result_meta_received_by_client (line 313) | async def test_resource_result_meta_received_by_client(self): method test_resource_content_meta_received_by_client (line 325) | async def test_resource_content_meta_received_by_client(self): method test_both_result_and_content_meta (line 340) | async def test_both_result_and_content_meta(self): FILE: tests/resources/test_standalone_decorator.py class TestResourceDecorator (line 18) | class TestResourceDecorator: method test_resource_requires_uri (line 21) | def test_resource_requires_uri(self): method test_resource_with_uri (line 29) | def test_resource_with_uri(self): method test_resource_with_template_uri (line 42) | def test_resource_with_template_uri(self): method test_resource_with_function_params_becomes_template (line 54) | def test_resource_with_function_params_becomes_template(self): method test_resource_with_all_metadata (line 66) | def test_resource_with_all_metadata(self): method test_resource_function_still_callable (line 92) | async def test_resource_function_still_callable(self): method test_resource_rejects_classmethod_decorator (line 104) | def test_resource_rejects_classmethod_decorator(self): method test_resource_added_to_server (line 115) | async def test_resource_added_to_server(self): method test_template_added_to_server (line 135) | async def test_template_added_to_server(self): FILE: tests/server/auth/oauth_proxy/conftest.py class MockOAuthProvider (line 20) | class MockOAuthProvider: method __init__ (line 29) | def __init__(self, port: int = 0): method authorize_endpoint (line 52) | def authorize_endpoint(self) -> str: method token_endpoint (line 56) | def token_endpoint(self) -> str: method revocation_endpoint (line 60) | def revocation_endpoint(self) -> str: method create_app (line 63) | def create_app(self) -> Starlette: method handle_authorize (line 73) | async def handle_authorize(self, request): method handle_token (line 108) | async def handle_token(self, request): method handle_revoke (line 198) | async def handle_revoke(self, request): method start (line 212) | async def start(self): method stop (line 243) | async def stop(self): method reset (line 249) | def reset(self): class MockTokenVerifier (line 261) | class MockTokenVerifier(TokenVerifier): method __init__ (line 264) | def __init__(self, required_scopes=None): method verify_token (line 268) | async def verify_token(self, token: str) -> AccessToken | None: # typ... function jwt_verifier (line 280) | def jwt_verifier(): function oauth_proxy (line 289) | def oauth_proxy(jwt_verifier): function mock_oauth_provider (line 307) | async def mock_oauth_provider(): FILE: tests/server/auth/oauth_proxy/test_authorization.py class TestOAuthProxyAuthorization (line 14) | class TestOAuthProxyAuthorization: method test_authorize_creates_transaction (line 17) | async def test_authorize_creates_transaction(self, oauth_proxy): class TestOAuthProxyPKCE (line 57) | class TestOAuthProxyPKCE: method proxy_with_pkce (line 61) | def proxy_with_pkce(self, jwt_verifier): method proxy_without_pkce (line 75) | def proxy_without_pkce(self, jwt_verifier): method test_pkce_forwarding_enabled (line 90) | async def test_pkce_forwarding_enabled(self, proxy_with_pkce): method test_pkce_forwarding_disabled (line 126) | async def test_pkce_forwarding_disabled(self, proxy_without_pkce): class TestParameterForwarding (line 160) | class TestParameterForwarding: method test_extra_authorize_params_forwarded (line 163) | async def test_extra_authorize_params_forwarded(self, jwt_verifier): FILE: tests/server/auth/oauth_proxy/test_client_registration.py class TestOAuthProxyClientRegistration (line 7) | class TestOAuthProxyClientRegistration: method test_register_client (line 10) | async def test_register_client(self, oauth_proxy): method test_get_registered_client (line 27) | async def test_get_registered_client(self, oauth_proxy): method test_get_unregistered_client_returns_none (line 40) | async def test_get_unregistered_client_returns_none(self, oauth_proxy): FILE: tests/server/auth/oauth_proxy/test_config.py class TestNormalizeResourceUrl (line 16) | class TestNormalizeResourceUrl: method test_normalizes_urls_correctly (line 47) | def test_normalizes_urls_correctly(self, url: str, expected: str): method test_server_url_has_query (line 61) | def test_server_url_has_query(self, url: str, has_query: bool): class TestResourceURLValidation (line 66) | class TestResourceURLValidation: method proxy_with_resource_url (line 70) | def proxy_with_resource_url(self, jwt_verifier): method test_authorize_rejects_mismatched_resource (line 86) | async def test_authorize_rejects_mismatched_resource(self, proxy_with_... method test_authorize_accepts_matching_resource (line 113) | async def test_authorize_accepts_matching_resource(self, proxy_with_re... method test_authorize_rejects_old_hardcoded_mcp_path (line 137) | async def test_authorize_rejects_old_hardcoded_mcp_path( method test_authorize_accepts_no_resource (line 166) | async def test_authorize_accepts_no_resource(self, proxy_with_resource... method test_authorize_accepts_resource_with_query_params (line 190) | async def test_authorize_accepts_resource_with_query_params( method test_authorize_rejects_different_path_with_query_params (line 221) | async def test_authorize_rejects_different_path_with_query_params( method test_authorize_requires_exact_match_when_server_has_query_params (line 249) | async def test_authorize_requires_exact_match_when_server_has_query_pa... method test_authorize_accepts_exact_match_when_server_has_query_params (line 294) | async def test_authorize_accepts_exact_match_when_server_has_query_par... method test_authorize_rejects_no_query_when_server_has_query_params (line 332) | async def test_authorize_rejects_no_query_when_server_has_query_params( method test_set_mcp_path_creates_jwt_issuer_with_correct_audience (line 372) | def test_set_mcp_path_creates_jwt_issuer_with_correct_audience(self, j... method test_set_mcp_path_uses_base_url_if_no_path (line 396) | def test_set_mcp_path_uses_base_url_if_no_path(self, jwt_verifier): method test_jwt_issuer_property_raises_if_not_initialized (line 413) | def test_jwt_issuer_property_raises_if_not_initialized(self, jwt_verif... method test_get_routes_calls_set_mcp_path (line 431) | def test_get_routes_calls_set_mcp_path(self, jwt_verifier): FILE: tests/server/auth/oauth_proxy/test_e2e.py class TestOAuthProxyE2E (line 20) | class TestOAuthProxyE2E: method test_full_oauth_flow_with_mock_provider (line 23) | async def test_full_oauth_flow_with_mock_provider(self, mock_oauth_pro... method test_token_refresh_with_mock_provider (line 79) | async def test_token_refresh_with_mock_provider(self, mock_oauth_provi... method test_pkce_validation_with_mock_provider (line 194) | async def test_pkce_validation_with_mock_provider(self, mock_oauth_pro... FILE: tests/server/auth/oauth_proxy/test_oauth_proxy.py class TestOAuthProxyInitialization (line 12) | class TestOAuthProxyInitialization: method test_basic_initialization (line 15) | def test_basic_initialization(self, jwt_verifier): method test_all_optional_parameters (line 38) | def test_all_optional_parameters(self, jwt_verifier): method test_redirect_path_normalization (line 66) | def test_redirect_path_normalization(self, jwt_verifier): method test_metadata_advertises_cimd_support (line 81) | async def test_metadata_advertises_cimd_support(self, jwt_verifier): class TestOptionalClientSecret (line 108) | class TestOptionalClientSecret: method test_no_secret_requires_jwt_signing_key (line 111) | def test_no_secret_requires_jwt_signing_key(self, jwt_verifier): method test_no_secret_with_jwt_key_succeeds (line 123) | def test_no_secret_with_jwt_key_succeeds(self, jwt_verifier): method test_factory_method_without_secret (line 137) | def test_factory_method_without_secret(self, jwt_verifier): method test_factory_method_with_secret (line 152) | def test_factory_method_with_secret(self, jwt_verifier): method test_consent_cookies_work_without_secret (line 168) | def test_consent_cookies_work_without_secret(self, jwt_verifier): FILE: tests/server/auth/oauth_proxy/test_tokens.py class TestOAuthProxyTokenEndpointAuth (line 25) | class TestOAuthProxyTokenEndpointAuth: method test_token_auth_method_initialization (line 28) | def test_token_auth_method_initialization(self, jwt_verifier): method test_token_auth_method_passed_to_client (line 71) | async def test_token_auth_method_passed_to_client(self, jwt_verifier): class TestTokenHandlerErrorTransformation (line 191) | class TestTokenHandlerErrorTransformation: method test_transforms_client_auth_failure_to_invalid_client_401 (line 194) | async def test_transforms_client_auth_failure_to_invalid_client_401(se... method test_does_not_transform_grant_type_unauthorized_to_invalid_client (line 219) | def test_does_not_transform_grant_type_unauthorized_to_invalid_client(... method test_transforms_invalid_grant_to_401 (line 235) | async def test_transforms_invalid_grant_to_401(self): method test_does_not_transform_other_400_errors (line 264) | def test_does_not_transform_other_400_errors(self): class TestFallbackAccessTokenExpiry (line 281) | class TestFallbackAccessTokenExpiry: method test_default_constants (line 284) | def test_default_constants(self): method test_fallback_parameter_stored (line 291) | def test_fallback_parameter_stored(self): method test_fallback_parameter_defaults_to_none (line 310) | def test_fallback_parameter_defaults_to_none(self): class TestUpstreamTokenStorageTTL (line 329) | class TestUpstreamTokenStorageTTL: method jwt_verifier (line 338) | def jwt_verifier(self): method proxy (line 346) | def proxy(self, jwt_verifier): method test_ttl_uses_max_when_refresh_shorter_than_access (line 361) | async def test_ttl_uses_max_when_refresh_shorter_than_access(self, pro... method test_ttl_uses_refresh_when_refresh_longer_than_access (line 441) | async def test_ttl_uses_refresh_when_refresh_longer_than_access(self, ... method test_refresh_expires_in_zero_issues_refresh_token (line 510) | async def test_refresh_expires_in_zero_issues_refresh_token(self, proxy): FILE: tests/server/auth/oauth_proxy/test_ui.py class TestErrorPageRendering (line 14) | class TestErrorPageRendering: method test_create_error_html_basic (line 17) | def test_create_error_html_basic(self): method test_create_error_html_with_details (line 31) | def test_create_error_html_with_details(self): method test_create_error_html_escapes_user_input (line 50) | def test_create_error_html_escapes_user_input(self): method test_callback_error_returns_html_page (line 65) | async def test_callback_error_returns_html_page(self): class TestConsentPageRendering (line 104) | class TestConsentPageRendering: method test_create_consent_html_escapes_client_id_in_details (line 107) | def test_create_consent_html_escapes_client_id_in_details(self): FILE: tests/server/auth/providers/test_auth0.py function valid_oidc_configuration_dict (line 21) | def valid_oidc_configuration_dict(): class TestAuth0Provider (line 34) | class TestAuth0Provider: method test_init_with_explicit_params (line 37) | def test_init_with_explicit_params(self, valid_oidc_configuration_dict): method test_init_defaults (line 77) | def test_init_defaults(self, valid_oidc_configuration_dict): FILE: tests/server/auth/providers/test_aws.py function mock_cognito_oidc_discovery (line 12) | def mock_cognito_oidc_discovery(): class TestAWSCognitoProvider (line 37) | class TestAWSCognitoProvider: method test_init_with_explicit_params (line 40) | def test_init_with_explicit_params(self): method test_init_defaults (line 72) | def test_init_defaults(self): method test_oidc_discovery_integration (line 89) | def test_oidc_discovery_integration(self): method test_token_verifier_defaults_audience_to_client_id (line 106) | def test_token_verifier_defaults_audience_to_client_id(self): method test_token_verifier_supports_audience_override (line 121) | def test_token_verifier_supports_audience_override(self): FILE: tests/server/auth/providers/test_azure.py function memory_storage (line 16) | def memory_storage() -> MemoryStore: class TestAzureProvider (line 21) | class TestAzureProvider: method test_init_with_explicit_params (line 24) | def test_init_with_explicit_params(self, memory_storage: MemoryStore): method test_init_defaults (line 46) | def test_init_defaults(self, memory_storage: MemoryStore): method test_offline_access_automatically_included (line 62) | def test_offline_access_automatically_included(self, memory_storage: M... method test_offline_access_not_duplicated (line 77) | def test_offline_access_not_duplicated(self, memory_storage: MemorySto... method test_oauth_endpoints_configured_correctly (line 94) | def test_oauth_endpoints_configured_correctly(self, memory_storage: Me... method test_special_tenant_values (line 119) | def test_special_tenant_values(self, memory_storage: MemoryStore): method test_azure_specific_scopes (line 147) | def test_azure_specific_scopes(self, memory_storage: MemoryStore): method test_init_does_not_require_api_client_id_anymore (line 174) | def test_init_does_not_require_api_client_id_anymore( method test_init_with_custom_audience_uses_jwt_verifier (line 189) | def test_init_with_custom_audience_uses_jwt_verifier( method test_authorize_filters_resource_and_stores_unprefixed_scopes (line 219) | async def test_authorize_filters_resource_and_stores_unprefixed_scopes( method test_authorize_appends_additional_scopes (line 289) | async def test_authorize_appends_additional_scopes( method test_base_authority_defaults_to_public_cloud (line 354) | def test_base_authority_defaults_to_public_cloud(self, memory_storage:... method test_base_authority_azure_government (line 384) | def test_base_authority_azure_government(self, memory_storage: MemoryS... method test_base_authority_from_parameter (line 415) | def test_base_authority_from_parameter(self, memory_storage: MemorySto... method test_base_authority_with_special_tenant_values (line 446) | def test_base_authority_with_special_tenant_values( method test_prepare_scopes_for_upstream_refresh_basic_prefixing (line 465) | def test_prepare_scopes_for_upstream_refresh_basic_prefixing( method test_prepare_scopes_for_upstream_refresh_already_prefixed (line 488) | def test_prepare_scopes_for_upstream_refresh_already_prefixed( method test_prepare_scopes_for_upstream_refresh_with_additional_scopes (line 513) | def test_prepare_scopes_for_upstream_refresh_with_additional_scopes( method test_prepare_scopes_for_upstream_refresh_filters_duplicate_additional_scopes (line 549) | def test_prepare_scopes_for_upstream_refresh_filters_duplicate_additio... method test_prepare_scopes_for_upstream_refresh_mixed_scopes (line 580) | def test_prepare_scopes_for_upstream_refresh_mixed_scopes( method test_prepare_scopes_for_upstream_refresh_scope_with_slash (line 608) | def test_prepare_scopes_for_upstream_refresh_scope_with_slash( method test_prepare_scopes_for_upstream_refresh_empty_scopes (line 633) | def test_prepare_scopes_for_upstream_refresh_empty_scopes( method test_prepare_scopes_for_upstream_refresh_no_additional_scopes (line 657) | def test_prepare_scopes_for_upstream_refresh_no_additional_scopes( method test_prepare_scopes_for_upstream_refresh_deduplicates_scopes (line 680) | def test_prepare_scopes_for_upstream_refresh_deduplicates_scopes( method test_prepare_scopes_for_upstream_refresh_deduplicates_prefixed_variants (line 711) | def test_prepare_scopes_for_upstream_refresh_deduplicates_prefixed_var... FILE: tests/server/auth/providers/test_azure_scopes.py function memory_storage (line 15) | def memory_storage() -> MemoryStore: class TestOIDCScopeHandling (line 20) | class TestOIDCScopeHandling: method test_oidc_scopes_constant (line 31) | def test_oidc_scopes_constant(self, memory_storage: MemoryStore): method test_prefix_scopes_does_not_prefix_oidc_scopes (line 35) | def test_prefix_scopes_does_not_prefix_oidc_scopes( method test_prefix_scopes_mixed_oidc_and_custom (line 57) | def test_prefix_scopes_mixed_oidc_and_custom(self, memory_storage: Mem... method test_prefix_scopes_dot_notation_gets_prefixed (line 83) | def test_prefix_scopes_dot_notation_gets_prefixed( method test_prefix_scopes_fully_qualified_graph_not_prefixed (line 104) | def test_prefix_scopes_fully_qualified_graph_not_prefixed( method test_required_scopes_with_oidc_filters_validation (line 132) | def test_required_scopes_with_oidc_filters_validation( method test_required_scopes_all_oidc_raises_value_error (line 150) | def test_required_scopes_all_oidc_raises_value_error( method test_empty_required_scopes_raises_value_error (line 166) | def test_empty_required_scopes_raises_value_error( method test_only_oidc_scopes_raises_value_error (line 190) | def test_only_oidc_scopes_raises_value_error( method test_valid_scopes_includes_oidc_scopes (line 205) | def test_valid_scopes_includes_oidc_scopes(self, memory_storage: Memor... method test_prepare_scopes_for_refresh_handles_oidc_scopes (line 228) | def test_prepare_scopes_for_refresh_handles_oidc_scopes( class TestAzureTokenExchangeScopes (line 256) | class TestAzureTokenExchangeScopes: method test_prepare_scopes_returns_prefixed_scopes (line 264) | def test_prepare_scopes_returns_prefixed_scopes(self, memory_storage: ... method test_prepare_scopes_includes_additional_oidc_scopes (line 282) | def test_prepare_scopes_includes_additional_oidc_scopes( method test_prepare_scopes_excludes_other_api_scopes (line 305) | def test_prepare_scopes_excludes_other_api_scopes( method test_prepare_scopes_deduplicates_scopes (line 342) | def test_prepare_scopes_deduplicates_scopes(self, memory_storage: Memo... method test_extra_token_params_does_not_contain_scope (line 363) | def test_extra_token_params_does_not_contain_scope( class TestAzureJWTVerifier (line 400) | class TestAzureJWTVerifier: method test_auto_configures_from_client_and_tenant (line 403) | def test_auto_configures_from_client_and_tenant(self): method test_validates_short_form_scopes (line 418) | async def test_validates_short_form_scopes(self): method test_scopes_supported_returns_prefixed_form (line 439) | def test_scopes_supported_returns_prefixed_form(self): method test_already_prefixed_scopes_pass_through (line 450) | def test_already_prefixed_scopes_pass_through(self): method test_oidc_scopes_not_prefixed (line 458) | def test_oidc_scopes_not_prefixed(self): method test_custom_identifier_uri (line 466) | def test_custom_identifier_uri(self): method test_custom_base_authority_for_gov_cloud (line 475) | def test_custom_base_authority_for_gov_cloud(self): method test_scopes_supported_empty_when_no_required_scopes (line 488) | def test_scopes_supported_empty_when_no_required_scopes(self): method test_default_identifier_uri_uses_client_id (line 495) | def test_default_identifier_uri_uses_client_id(self): method test_multi_tenant_organizations_skips_issuer (line 503) | def test_multi_tenant_organizations_skips_issuer(self): method test_multi_tenant_consumers_skips_issuer (line 510) | def test_multi_tenant_consumers_skips_issuer(self): method test_multi_tenant_common_skips_issuer (line 517) | def test_multi_tenant_common_skips_issuer(self): method test_specific_tenant_sets_issuer (line 524) | def test_specific_tenant_sets_issuer(self): class TestAzureOBOIntegration (line 535) | class TestAzureOBOIntegration: method test_get_obo_credential_returns_configured_credential (line 538) | async def test_get_obo_credential_returns_configured_credential(self): method test_get_obo_credential_caches_by_assertion (line 568) | async def test_get_obo_credential_caches_by_assertion(self): method test_get_obo_credential_different_assertions_get_different_credentials (line 591) | async def test_get_obo_credential_different_assertions_get_different_c... method test_get_obo_credential_evicts_oldest_when_over_capacity (line 615) | async def test_get_obo_credential_evicts_oldest_when_over_capacity(self): method test_close_obo_credentials (line 645) | async def test_close_obo_credentials(self): method test_get_obo_credential_with_custom_authority (line 669) | async def test_get_obo_credential_with_custom_authority(self): method test_tenant_and_authority_stored_as_attributes (line 692) | def test_tenant_and_authority_stored_as_attributes(self): method test_entra_obo_token_is_importable (line 707) | def test_entra_obo_token_is_importable(self): method test_entra_obo_token_creates_dependency (line 713) | def test_entra_obo_token_creates_dependency(self): method test_entra_obo_token_is_dependency_instance (line 721) | def test_entra_obo_token_is_dependency_instance(self): FILE: tests/server/auth/providers/test_descope.py class TestDescopeProvider (line 16) | class TestDescopeProvider: method test_init_with_explicit_params (line 19) | def test_init_with_explicit_params(self): method test_environment_variable_loading (line 30) | def test_environment_variable_loading(self): method test_config_url_parsing (line 43) | def test_config_url_parsing(self): method test_requires_config_url_or_project_id_and_descope_base_url (line 69) | def test_requires_config_url_or_project_id_and_descope_base_url(self): method test_backwards_compatibility_with_project_id_and_descope_base_url (line 77) | def test_backwards_compatibility_with_project_id_and_descope_base_url(... method test_backwards_compatibility_descope_base_url_without_scheme (line 99) | def test_backwards_compatibility_descope_base_url_without_scheme(self): method test_config_url_takes_precedence_over_old_api (line 113) | def test_config_url_takes_precedence_over_old_api(self): method test_jwt_verifier_configured_correctly (line 131) | def test_jwt_verifier_configured_correctly(self): method test_required_scopes_support (line 151) | def test_required_scopes_support(self): method test_required_scopes_with_old_api (line 163) | def test_required_scopes_with_old_api(self): method test_required_scopes_from_env (line 176) | def test_required_scopes_from_env(self): function mcp_server_url (line 197) | async def mcp_server_url(): function client_with_headless_oauth (line 215) | def client_with_headless_oauth(mcp_server_url: str) -> Client: class TestDescopeProviderIntegration (line 223) | class TestDescopeProviderIntegration: method test_unauthorized_access (line 224) | async def test_unauthorized_access(self, mcp_server_url: str): FILE: tests/server/auth/providers/test_discord.py function memory_storage (line 12) | def memory_storage() -> MemoryStore: class TestDiscordProvider (line 17) | class TestDiscordProvider: method test_init_with_explicit_params (line 20) | def test_init_with_explicit_params(self, memory_storage: MemoryStore): method test_init_defaults (line 36) | def test_init_defaults(self, memory_storage: MemoryStore): method test_oauth_endpoints_configured_correctly (line 49) | def test_oauth_endpoints_configured_correctly(self, memory_storage: Me... method test_discord_specific_scopes (line 70) | def test_discord_specific_scopes(self, memory_storage: MemoryStore): method test_token_verifier_is_bound_to_provider_client_id (line 88) | def test_token_verifier_is_bound_to_provider_client_id( class TestDiscordTokenVerifier (line 105) | class TestDiscordTokenVerifier: method test_rejects_token_from_different_discord_application (line 108) | async def test_rejects_token_from_different_discord_application(self): FILE: tests/server/auth/providers/test_github.py function memory_storage (line 15) | def memory_storage() -> MemoryStore: class TestGitHubProvider (line 20) | class TestGitHubProvider: method test_init_with_explicit_params (line 23) | def test_init_with_explicit_params(self, memory_storage: MemoryStore): method test_init_defaults (line 45) | def test_init_defaults(self, memory_storage: MemoryStore): class TestGitHubTokenVerifier (line 61) | class TestGitHubTokenVerifier: method test_init_with_custom_scopes (line 64) | def test_init_with_custom_scopes(self, memory_storage: MemoryStore): method test_init_defaults (line 74) | def test_init_defaults(self, memory_storage: MemoryStore): method test_verify_token_github_api_failure (line 83) | async def test_verify_token_github_api_failure(self): method test_verify_token_success (line 101) | async def test_verify_token_success(self): function _mock_github_success (line 142) | def _mock_github_success(mock_client: AsyncMock) -> None: function _mock_github_failure (line 161) | def _mock_github_failure(mock_client: AsyncMock) -> None: class TestGitHubTokenVerifierCaching (line 169) | class TestGitHubTokenVerifierCaching: method test_cache_disabled_by_default (line 172) | def test_cache_disabled_by_default(self): method test_cache_enabled_with_ttl (line 176) | def test_cache_enabled_with_ttl(self): method test_cache_hit_avoids_second_api_call (line 180) | async def test_cache_hit_avoids_second_api_call(self): method test_cache_disabled_makes_every_call (line 203) | async def test_cache_disabled_makes_every_call(self): method test_failures_are_not_cached (line 224) | async def test_failures_are_not_cached(self): method test_cached_result_is_defensive_copy (line 242) | async def test_cached_result_is_defensive_copy(self): method test_scope_failure_skips_cache (line 264) | async def test_scope_failure_skips_cache(self): method test_provider_passes_cache_params (line 295) | def test_provider_passes_cache_params(self, memory_storage: MemoryStore): FILE: tests/server/auth/providers/test_google.py function memory_storage (line 15) | def memory_storage() -> MemoryStore: class TestGoogleProvider (line 20) | class TestGoogleProvider: method test_init_with_explicit_params (line 23) | def test_init_with_explicit_params(self, memory_storage: MemoryStore): method test_init_defaults (line 39) | def test_init_defaults(self, memory_storage: MemoryStore): method test_oauth_endpoints_configured_correctly (line 53) | def test_oauth_endpoints_configured_correctly(self, memory_storage: Me... method test_google_specific_scopes (line 74) | def test_google_specific_scopes(self, memory_storage: MemoryStore): method test_extra_authorize_params_defaults (line 93) | def test_extra_authorize_params_defaults(self, memory_storage: MemoryS... method test_extra_authorize_params_override_defaults (line 109) | def test_extra_authorize_params_override_defaults( method test_extra_authorize_params_add_new_params (line 127) | def test_extra_authorize_params_add_new_params(self, memory_storage: M... method test_valid_scopes_passed_through (line 144) | def test_valid_scopes_passed_through(self, memory_storage: MemoryStore): method test_valid_scopes_defaults_to_required (line 166) | def test_valid_scopes_defaults_to_required(self, memory_storage: Memor... class TestGoogleScopeNormalization (line 187) | class TestGoogleScopeNormalization: method test_normalize_google_scope (line 206) | def test_normalize_google_scope(self, shorthand: str, expected: str): method test_verifier_normalizes_required_scopes (line 209) | def test_verifier_normalizes_required_scopes(self): method test_verifier_full_uris_unchanged (line 221) | def test_verifier_full_uris_unchanged(self): method test_alias_map_is_bidirectional (line 230) | def test_alias_map_is_bidirectional(self): FILE: tests/server/auth/providers/test_http_client.py class TestIntrospectionHttpClient (line 17) | class TestIntrospectionHttpClient: method shared_client (line 21) | def shared_client(self) -> httpx.AsyncClient: method test_stores_http_client (line 24) | def test_stores_http_client(self, shared_client: httpx.AsyncClient): method test_default_http_client_is_none (line 33) | def test_default_http_client_is_none(self): method test_uses_provided_client (line 41) | async def test_uses_provided_client( method test_client_not_closed_after_call (line 67) | async def test_client_not_closed_after_call( method test_reuses_client_across_calls (line 93) | async def test_reuses_client_across_calls( class TestJWTVerifierHttpClient (line 123) | class TestJWTVerifierHttpClient: method rsa_key_pair (line 127) | def rsa_key_pair(self) -> RSAKeyPair: method shared_client (line 131) | def shared_client(self) -> httpx.AsyncClient: method test_stores_http_client (line 134) | def test_stores_http_client(self, shared_client: httpx.AsyncClient): method test_default_http_client_is_none (line 141) | def test_default_http_client_is_none(self): method test_jwks_fetch_uses_provided_client (line 147) | async def test_jwks_fetch_uses_provided_client( method test_ssrf_safe_rejects_http_client_with_jwks (line 183) | def test_ssrf_safe_rejects_http_client_with_jwks( method test_ssrf_safe_allows_http_client_with_static_key (line 195) | def test_ssrf_safe_allows_http_client_with_static_key( class TestGitHubHttpClient (line 211) | class TestGitHubHttpClient: method test_stores_http_client (line 214) | def test_stores_http_client(self): method test_uses_provided_client (line 221) | async def test_uses_provided_client(self, httpx_mock: HTTPXMock): class TestDiscordHttpClient (line 241) | class TestDiscordHttpClient: method test_stores_http_client (line 244) | def test_stores_http_client(self): class TestGoogleHttpClient (line 255) | class TestGoogleHttpClient: method test_stores_http_client (line 258) | def test_stores_http_client(self): class TestWorkOSHttpClient (line 266) | class TestWorkOSHttpClient: method test_stores_http_client (line 269) | def test_stores_http_client(self): class TestProviderHttpClientPassthrough (line 280) | class TestProviderHttpClientPassthrough: method test_github_provider_threads_http_client (line 283) | def test_github_provider_threads_http_client(self): method test_discord_provider_threads_http_client (line 301) | def test_discord_provider_threads_http_client(self): method test_google_provider_threads_http_client (line 318) | def test_google_provider_threads_http_client(self): method test_workos_provider_threads_http_client (line 335) | def test_workos_provider_threads_http_client(self): method test_azure_provider_threads_http_client (line 353) | def test_azure_provider_threads_http_client(self): FILE: tests/server/auth/providers/test_introspection.py class TestIntrospectionTokenVerifier (line 15) | class TestIntrospectionTokenVerifier: method verifier (line 19) | def verifier(self) -> IntrospectionTokenVerifier: method verifier_with_required_scopes (line 29) | def verifier_with_required_scopes(self) -> IntrospectionTokenVerifier: method test_initialization (line 38) | def test_initialization(self): method test_initialization_requires_introspection_url (line 52) | def test_initialization_requires_introspection_url(self): method test_initialization_requires_client_id (line 60) | def test_initialization_requires_client_id(self): method test_initialization_requires_client_secret (line 68) | def test_initialization_requires_client_secret(self): method test_create_basic_auth_header (line 76) | def test_create_basic_auth_header(self, verifier: IntrospectionTokenVe... method test_extract_scopes_from_string (line 86) | def test_extract_scopes_from_string(self, verifier: IntrospectionToken... method test_extract_scopes_from_array (line 93) | def test_extract_scopes_from_array(self, verifier: IntrospectionTokenV... method test_extract_scopes_missing (line 100) | def test_extract_scopes_missing(self, verifier: IntrospectionTokenVeri... method test_extract_scopes_with_extra_whitespace (line 107) | def test_extract_scopes_with_extra_whitespace( method test_valid_token_verification (line 116) | async def test_valid_token_verification( method test_inactive_token_returns_none (line 144) | async def test_inactive_token_returns_none( method test_expired_token_returns_none (line 158) | async def test_expired_token_returns_none( method test_token_without_expiration (line 177) | async def test_token_without_expiration( method test_token_without_scopes (line 196) | async def test_token_without_scopes( method test_required_scopes_validation (line 214) | async def test_required_scopes_validation( method test_required_scopes_validation_success (line 235) | async def test_required_scopes_validation_success( method test_http_error_returns_none (line 256) | async def test_http_error_returns_none( method test_authentication_failure_returns_none (line 271) | async def test_authentication_failure_returns_none( method test_timeout_returns_none (line 286) | async def test_timeout_returns_none( method test_malformed_json_returns_none (line 301) | async def test_malformed_json_returns_none( method test_request_includes_correct_headers (line 316) | async def test_request_includes_correct_headers( method test_request_includes_token_and_hint (line 337) | async def test_request_includes_token_and_hint( method test_client_id_fallback_to_sub (line 357) | async def test_client_id_fallback_to_sub( method test_client_id_defaults_to_unknown (line 376) | async def test_client_id_defaults_to_unknown( method test_initialization_with_client_secret_post (line 394) | def test_initialization_with_client_secret_post(self): method test_initialization_defaults_to_client_secret_basic (line 408) | def test_initialization_defaults_to_client_secret_basic(self): method test_initialization_rejects_invalid_client_auth_method (line 418) | def test_initialization_rejects_invalid_client_auth_method(self): method test_client_secret_post_includes_credentials_in_body (line 442) | async def test_client_secret_post_includes_credentials_in_body( method test_client_secret_post_verification_success (line 476) | async def test_client_secret_post_verification_success(self, httpx_moc... method test_client_secret_basic_still_works (line 502) | async def test_client_secret_basic_still_works( class TestIntrospectionCaching (line 526) | class TestIntrospectionCaching: method verifier_with_cache (line 530) | def verifier_with_cache(self) -> IntrospectionTokenVerifier: method verifier_no_cache (line 541) | def verifier_no_cache(self) -> IntrospectionTokenVerifier: method test_default_cache_settings (line 550) | def test_default_cache_settings(self): method test_custom_cache_settings (line 559) | def test_custom_cache_settings(self): method test_cache_disabled_with_zero_ttl (line 571) | def test_cache_disabled_with_zero_ttl(self): method test_cache_disabled_with_zero_max_size (line 591) | async def test_cache_disabled_with_zero_max_size(self, httpx_mock: HTT... method test_negative_max_cache_size_raises (line 614) | def test_negative_max_cache_size_raises(self): method test_cache_hit_returns_cached_result (line 625) | async def test_cache_hit_returns_cached_result( method test_cache_returns_defensive_copy (line 659) | async def test_cache_returns_defensive_copy( method test_inactive_tokens_not_cached (line 695) | async def test_inactive_tokens_not_cached( method test_cache_disabled_makes_every_call (line 727) | async def test_cache_disabled_makes_every_call( method test_different_tokens_are_cached_separately (line 753) | async def test_different_tokens_are_cached_separately( method test_http_errors_are_not_cached (line 788) | async def test_http_errors_are_not_cached( method test_timeout_errors_are_not_cached (line 819) | async def test_timeout_errors_are_not_cached( method test_token_hashing (line 849) | def test_token_hashing(self, verifier_with_cache: IntrospectionTokenVe... method test_cache_respects_token_expiration (line 862) | async def test_cache_respects_token_expiration( method test_expired_cache_entry_triggers_new_introspection (line 887) | async def test_expired_cache_entry_triggers_new_introspection( method test_cache_eviction_at_max_size (line 921) | async def test_cache_eviction_at_max_size(self, httpx_mock: HTTPXMock): class TestIntrospectionTokenVerifierIntegration (line 952) | class TestIntrospectionTokenVerifierIntegration: method test_verifier_used_by_fastmcp (line 955) | async def test_verifier_used_by_fastmcp(self): FILE: tests/server/auth/providers/test_propelauth.py class TestPropelAuthProvider (line 20) | class TestPropelAuthProvider: method test_init_with_only_required_params (line 23) | def test_init_with_only_required_params(self): method test_auth_url_trailing_slash_normalization (line 49) | def test_auth_url_trailing_slash_normalization(self): method test_required_scopes_passed_to_verifier (line 69) | def test_required_scopes_passed_to_verifier(self): method test_introspection_client_secret_as_secret_str (line 82) | def test_introspection_client_secret_as_secret_str(self): method test_authorization_servers_configuration (line 94) | def test_authorization_servers_configuration(self): method test_token_introspection_overrides_timeout (line 109) | def test_token_introspection_overrides_timeout(self): method test_token_introspection_overrides_cache (line 122) | def test_token_introspection_overrides_cache(self): method test_token_introspection_overrides_http_client (line 139) | def test_token_introspection_overrides_http_client(self): method test_token_introspection_overrides_ignores_unknown_keys (line 153) | def test_token_introspection_overrides_ignores_unknown_keys(self): method test_token_introspection_overrides_ignores_disallowed_known_keys (line 169) | def test_token_introspection_overrides_ignores_disallowed_known_keys(s... class TestPropelAuthResourceChecking (line 186) | class TestPropelAuthResourceChecking: method _make_provider (line 189) | def _make_provider(self, resource: str | None = None) -> PropelAuthPro... method _make_access_token (line 198) | def _make_access_token(self, aud: str) -> AccessToken: method test_no_resource_skips_aud_check (line 206) | async def test_no_resource_skips_aud_check(self, monkeypatch: pytest.M... method test_aud_matches_resource (line 217) | async def test_aud_matches_resource(self, monkeypatch: pytest.MonkeyPa... method test_aud_does_not_match_resource (line 228) | async def test_aud_does_not_match_resource(self, monkeypatch: pytest.M... method test_inner_verifier_returns_none (line 239) | async def test_inner_verifier_returns_none(self, monkeypatch: pytest.M... function mcp_server_url (line 251) | async def mcp_server_url(): class TestPropelAuthProviderIntegration (line 270) | class TestPropelAuthProviderIntegration: method test_unauthorized_access (line 271) | async def test_unauthorized_access(self, mcp_server_url: str): method test_metadata_route_forwards_propelauth_response (line 280) | async def test_metadata_route_forwards_propelauth_response( FILE: tests/server/auth/providers/test_scalekit.py class TestScalekitProvider (line 13) | class TestScalekitProvider: method test_init_with_explicit_params (line 16) | def test_init_with_explicit_params(self): method test_init_with_mcp_url_only (line 30) | def test_init_with_mcp_url_only(self): method test_init_prefers_base_url_over_mcp_url (line 40) | def test_init_prefers_base_url_over_mcp_url(self): method test_environment_variable_loading (line 51) | def test_environment_variable_loading(self): method test_accepts_client_id_argument (line 63) | def test_accepts_client_id_argument(self): method test_url_trailing_slash_handling (line 74) | def test_url_trailing_slash_handling(self): method test_jwt_verifier_configured_correctly (line 85) | def test_jwt_verifier_configured_correctly(self): method test_required_scopes_hooks_into_verifier (line 99) | def test_required_scopes_hooks_into_verifier(self): method test_authorization_servers_configuration (line 111) | def test_authorization_servers_configuration(self): function mcp_server_url (line 127) | async def mcp_server_url(): function client_with_headless_oauth (line 146) | def client_with_headless_oauth(mcp_server_url: str) -> Client: class TestScalekitProviderIntegration (line 154) | class TestScalekitProviderIntegration: method test_unauthorized_access (line 155) | async def test_unauthorized_access(self, mcp_server_url: str): method test_metadata_route_forwards_scalekit_response (line 164) | async def test_metadata_route_forwards_scalekit_response( FILE: tests/server/auth/providers/test_supabase.py class TestSupabaseProvider (line 15) | class TestSupabaseProvider: method test_init_with_explicit_params (line 18) | def test_init_with_explicit_params(self): method test_environment_variable_loading (line 28) | def test_environment_variable_loading(self): method test_project_url_normalization (line 38) | def test_project_url_normalization(self): method test_jwt_verifier_configured_correctly (line 54) | def test_jwt_verifier_configured_correctly(self): method test_jwt_verifier_with_required_scopes (line 70) | def test_jwt_verifier_with_required_scopes(self): method test_authorization_servers_configured (line 81) | def test_authorization_servers_configured(self): method test_algorithm_configuration (line 98) | def test_algorithm_configuration(self, algorithm): method test_algorithm_rejects_hs256 (line 109) | def test_algorithm_rejects_hs256(self): method test_algorithm_default_es256 (line 118) | def test_algorithm_default_es256(self): method test_algorithm_from_parameter (line 128) | def test_algorithm_from_parameter(self): method test_custom_auth_route (line 139) | def test_custom_auth_route(self): method test_custom_auth_route_trailing_slash (line 153) | def test_custom_auth_route_trailing_slash(self): function run_mcp_server (line 163) | def run_mcp_server(host: str, port: int) -> None: function mcp_server_url (line 179) | def mcp_server_url() -> Generator[str]: function client_with_headless_oauth (line 185) | def client_with_headless_oauth( class TestSupabaseProviderIntegration (line 196) | class TestSupabaseProviderIntegration: method test_unauthorized_access (line 197) | async def test_unauthorized_access(self, mcp_server_url: str): FILE: tests/server/auth/providers/test_workos.py function memory_storage (line 21) | def memory_storage() -> MemoryStore: class TestWorkOSProvider (line 26) | class TestWorkOSProvider: method test_init_with_explicit_params (line 29) | def test_init_with_explicit_params(self, memory_storage: MemoryStore): method test_authkit_domain_https_prefix_handling (line 46) | def test_authkit_domain_https_prefix_handling(self, memory_storage: Me... method test_init_defaults (line 90) | def test_init_defaults(self, memory_storage: MemoryStore): method test_oauth_endpoints_configured_correctly (line 105) | def test_oauth_endpoints_configured_correctly(self, memory_storage: Me... function mcp_server_url (line 130) | async def mcp_server_url(): function client_with_headless_oauth (line 148) | def client_with_headless_oauth(mcp_server_url: str) -> Client: class TestAuthKitProvider (line 156) | class TestAuthKitProvider: method test_unauthorized_access (line 157) | async def test_unauthorized_access( class TestWorkOSTokenVerifierScopes (line 176) | class TestWorkOSTokenVerifierScopes: method test_verify_token_rejects_missing_required_scopes (line 177) | async def test_verify_token_rejects_missing_required_scopes( method test_verify_token_returns_actual_token_scopes (line 199) | async def test_verify_token_returns_actual_token_scopes( FILE: tests/server/auth/test_auth_provider.py class TestAuthProviderBase (line 12) | class TestAuthProviderBase: method basic_remote_provider (line 16) | def basic_remote_provider(self): method test_www_authenticate_header_points_to_base_url (line 32) | async def test_www_authenticate_header_points_to_base_url( method test_automatic_resource_url_capture (line 66) | async def test_automatic_resource_url_capture(self, basic_remote_provi... method test_automatic_resource_url_with_nested_path (line 88) | async def test_automatic_resource_url_with_nested_path(self, basic_rem... FILE: tests/server/auth/test_authorization.py function make_token (line 29) | def make_token(scopes: list[str] | None = None) -> AccessToken: function make_tool (line 40) | def make_tool() -> Mock: class TestRequireScopes (line 52) | class TestRequireScopes: method test_returns_true_with_matching_scope (line 53) | def test_returns_true_with_matching_scope(self): method test_returns_true_with_all_required_scopes (line 59) | def test_returns_true_with_all_required_scopes(self): method test_returns_false_with_missing_scope (line 65) | def test_returns_false_with_missing_scope(self): method test_returns_false_with_partial_scopes (line 71) | def test_returns_false_with_partial_scopes(self): method test_returns_false_without_token (line 77) | def test_returns_false_without_token(self): class TestRestrictTag (line 88) | class TestRestrictTag: method test_allows_access_when_tag_not_present (line 89) | def test_allows_access_when_tag_not_present(self): method test_blocks_access_when_tag_present_without_token (line 96) | def test_blocks_access_when_tag_present_without_token(self): method test_blocks_access_when_tag_present_without_scope (line 103) | def test_blocks_access_when_tag_present_without_scope(self): method test_allows_access_when_tag_present_with_scope (line 111) | def test_allows_access_when_tag_present_with_scope(self): class TestRunAuthChecks (line 125) | class TestRunAuthChecks: method test_single_check_passes (line 126) | async def test_single_check_passes(self): method test_single_check_fails (line 130) | async def test_single_check_fails(self): method test_multiple_checks_all_pass (line 134) | async def test_multiple_checks_all_pass(self): method test_multiple_checks_one_fails (line 140) | async def test_multiple_checks_one_fails(self): method test_empty_list_passes (line 146) | async def test_empty_list_passes(self): method test_custom_lambda_check (line 150) | async def test_custom_lambda_check(self): method test_authorization_error_propagates (line 160) | async def test_authorization_error_propagates(self): method test_generic_exception_is_masked (line 170) | async def test_generic_exception_is_masked(self): method test_authorization_error_stops_chain (line 180) | async def test_authorization_error_stops_chain(self): method test_async_check_passes (line 203) | async def test_async_check_passes(self): method test_async_check_fails (line 212) | async def test_async_check_fails(self): method test_mixed_sync_and_async_checks (line 221) | async def test_mixed_sync_and_async_checks(self): method test_async_check_exception_is_masked (line 234) | async def test_async_check_exception_is_masked(self): method test_async_check_authorization_error_propagates (line 243) | async def test_async_check_authorization_error_propagates(self): function set_token (line 259) | def set_token(token: AccessToken | None): class TestToolLevelAuth (line 266) | class TestToolLevelAuth: method test_tool_without_auth_is_visible (line 267) | async def test_tool_without_auth_is_visible(self): method test_tool_with_auth_hidden_without_token (line 278) | async def test_tool_with_auth_hidden_without_token(self): method test_tool_with_auth_visible_with_token (line 289) | async def test_tool_with_auth_visible_with_token(self): method test_tool_with_scope_auth_hidden_without_scope (line 306) | async def test_tool_with_scope_auth_hidden_without_scope(self): method test_tool_with_scope_auth_visible_with_scope (line 322) | async def test_tool_with_scope_auth_visible_with_scope(self): method test_get_tool_returns_none_without_auth (line 339) | async def test_get_tool_returns_none_without_auth(self): method test_get_tool_returns_tool_with_auth (line 351) | async def test_get_tool_returns_tool_with_auth(self): class TestAuthMiddleware (line 373) | class TestAuthMiddleware: method test_middleware_filters_tools_without_token (line 380) | async def test_middleware_filters_tools_without_token(self): method test_middleware_allows_tools_with_token (line 391) | async def test_middleware_allows_tools_with_token(self): method test_middleware_with_scope_check (line 406) | async def test_middleware_with_scope_check(self): method test_middleware_with_restrict_tag (line 431) | async def test_middleware_with_restrict_tag(self): method test_middleware_skips_tool_on_authorization_error (line 458) | async def test_middleware_skips_tool_on_authorization_error(self): method test_middleware_skips_resource_on_authorization_error (line 477) | async def test_middleware_skips_resource_on_authorization_error(self): method test_middleware_skips_resource_template_on_authorization_error (line 498) | async def test_middleware_skips_resource_template_on_authorization_err... method test_middleware_skips_prompt_on_authorization_error (line 521) | async def test_middleware_skips_prompt_on_authorization_error(self): class TestAuthIntegration (line 546) | class TestAuthIntegration: method test_client_only_sees_authorized_tools (line 547) | async def test_client_only_sees_authorized_tools(self): method test_client_with_token_sees_all_authorized_tools (line 564) | async def test_client_with_token_sees_all_authorized_tools(self): class TestAsyncAuthIntegration (line 594) | class TestAsyncAuthIntegration: method test_async_auth_check_filters_tool_listing (line 595) | async def test_async_auth_check_filters_tool_listing(self): method test_async_auth_check_on_tool_call (line 625) | async def test_async_auth_check_on_tool_call(self): method test_async_auth_middleware (line 646) | async def test_async_auth_middleware(self): class TestTransformedToolAuth (line 679) | class TestTransformedToolAuth: method test_transformed_tool_preserves_auth (line 680) | async def test_transformed_tool_preserves_auth(self): method test_transformed_tool_filtered_without_token (line 703) | async def test_transformed_tool_filtered_without_token(self): method test_transformed_tool_visible_with_token (line 722) | async def test_transformed_tool_visible_with_token(self): class TestAuthMiddlewareCallTool (line 753) | class TestAuthMiddlewareCallTool: method test_middleware_blocks_call_without_auth (line 754) | async def test_middleware_blocks_call_without_auth(self): method test_middleware_allows_call_with_auth (line 773) | async def test_middleware_allows_call_with_auth(self): method test_middleware_blocks_call_with_wrong_scope (line 791) | async def test_middleware_blocks_call_with_wrong_scope(self): FILE: tests/server/auth/test_cimd.py class TestCIMDDocument (line 22) | class TestCIMDDocument: method test_valid_minimal_document (line 25) | def test_valid_minimal_document(self): method test_valid_full_document (line 36) | def test_valid_full_document(self): method test_private_key_jwt_auth_method_allowed (line 52) | def test_private_key_jwt_auth_method_allowed(self): method test_client_secret_basic_rejected (line 62) | def test_client_secret_basic_rejected(self): method test_client_secret_post_rejected (line 73) | def test_client_secret_post_rejected(self): method test_client_secret_jwt_rejected (line 83) | def test_client_secret_jwt_rejected(self): method test_missing_redirect_uris_rejected (line 93) | def test_missing_redirect_uris_rejected(self): method test_empty_redirect_uris_rejected (line 99) | def test_empty_redirect_uris_rejected(self): method test_redirect_uri_without_scheme_rejected (line 108) | def test_redirect_uri_without_scheme_rejected(self): method test_redirect_uri_without_host_rejected (line 116) | def test_redirect_uri_without_host_rejected(self): method test_redirect_uri_whitespace_only_rejected (line 124) | def test_redirect_uri_whitespace_only_rejected(self): class TestCIMDFetcher (line 133) | class TestCIMDFetcher: method fetcher (line 137) | def fetcher(self): method test_is_cimd_client_id_valid_urls (line 141) | def test_is_cimd_client_id_valid_urls(self, fetcher: CIMDFetcher): method test_is_cimd_client_id_rejects_http (line 147) | def test_is_cimd_client_id_rejects_http(self, fetcher: CIMDFetcher): method test_is_cimd_client_id_rejects_root_path (line 151) | def test_is_cimd_client_id_rejects_root_path(self, fetcher: CIMDFetcher): method test_is_cimd_client_id_rejects_non_url (line 156) | def test_is_cimd_client_id_rejects_non_url(self, fetcher: CIMDFetcher): method test_validate_redirect_uri_exact_match (line 163) | def test_validate_redirect_uri_exact_match(self, fetcher: CIMDFetcher): method test_validate_redirect_uri_wildcard_match (line 172) | def test_validate_redirect_uri_wildcard_match(self, fetcher: CIMDFetch... class TestCIMDFetcherHTTP (line 183) | class TestCIMDFetcherHTTP: method fetcher (line 192) | def fetcher(self): method mock_dns (line 197) | def mock_dns(self): method test_fetch_success (line 205) | async def test_fetch_success(self, fetcher: CIMDFetcher, httpx_mock, m... method test_fetch_ttl_cache (line 228) | async def test_fetch_ttl_cache(self, fetcher: CIMDFetcher, httpx_mock,... method test_fetch_cache_control_max_age (line 248) | async def test_fetch_cache_control_max_age( method test_fetch_etag_revalidation_304 (line 270) | async def test_fetch_etag_revalidation_304( method test_fetch_last_modified_revalidation_304 (line 307) | async def test_fetch_last_modified_revalidation_304( method test_fetch_cache_control_no_store (line 341) | async def test_fetch_cache_control_no_store( method test_fetch_cache_control_no_cache (line 367) | async def test_fetch_cache_control_no_cache( method test_fetch_304_without_cache_headers_preserves_policy (line 404) | async def test_fetch_304_without_cache_headers_preserves_policy( method test_fetch_304_without_cache_headers_refreshes_cached_freshness (line 445) | async def test_fetch_304_without_cache_headers_refreshes_cached_freshn... method test_fetch_client_id_mismatch (line 485) | async def test_fetch_client_id_mismatch( method test_fetch_http_error (line 504) | async def test_fetch_http_error(self, fetcher: CIMDFetcher, httpx_mock... method test_fetch_invalid_json (line 513) | async def test_fetch_invalid_json(self, fetcher: CIMDFetcher, httpx_mo... method test_fetch_invalid_document (line 525) | async def test_fetch_invalid_document( FILE: tests/server/auth/test_cimd_validators.py class TestCIMDAssertionValidator (line 21) | class TestCIMDAssertionValidator: method validator (line 25) | def validator(self): method key_pair (line 30) | def key_pair(self): method jwks (line 37) | def jwks(self, key_pair): method cimd_doc_with_jwks_uri (line 78) | def cimd_doc_with_jwks_uri(self): method cimd_doc_with_inline_jwks (line 88) | def cimd_doc_with_inline_jwks(self, jwks): method test_valid_assertion_with_jwks_uri (line 97) | async def test_valid_assertion_with_jwks_uri( method test_valid_assertion_with_inline_jwks (line 161) | async def test_valid_assertion_with_inline_jwks( method test_rejects_wrong_issuer (line 183) | async def test_rejects_wrong_issuer( method test_rejects_wrong_audience (line 206) | async def test_rejects_wrong_audience( method test_rejects_wrong_subject (line 229) | async def test_rejects_wrong_subject( method test_rejects_missing_jti (line 252) | async def test_rejects_missing_jti( method test_rejects_replayed_jti (line 275) | async def test_rejects_replayed_jti( method test_rejects_expired_token (line 304) | async def test_rejects_expired_token( class TestCIMDClientManager (line 328) | class TestCIMDClientManager: method manager (line 332) | def manager(self): method disabled_manager (line 337) | def disabled_manager(self): method mock_dns (line 342) | def mock_dns(self): method test_is_cimd_client_id_enabled (line 350) | def test_is_cimd_client_id_enabled(self, manager): method test_is_cimd_client_id_disabled (line 355) | def test_is_cimd_client_id_disabled(self, disabled_manager): method test_get_client_success (line 360) | async def test_get_client_success(self, manager, httpx_mock, mock_dns): method test_get_client_disabled (line 381) | async def test_get_client_disabled(self, disabled_manager): method test_get_client_fetch_failure (line 386) | async def test_get_client_fetch_failure(self, manager, httpx_mock, moc... class TestCIMDClientManagerGetClientOptions (line 397) | class TestCIMDClientManagerGetClientOptions: method mock_dns (line 401) | def mock_dns(self): method test_default_scope_applied_when_doc_has_no_scope (line 409) | async def test_default_scope_applied_when_doc_has_no_scope( method test_doc_scope_takes_precedence_over_default (line 435) | async def test_doc_scope_takes_precedence_over_default(self, httpx_moc... method test_allowed_redirect_uri_patterns_stored_on_client (line 459) | async def test_allowed_redirect_uri_patterns_stored_on_client( method test_cimd_document_attached_to_client (line 485) | async def test_cimd_document_attached_to_client(self, httpx_mock, mock... class TestCIMDClientManagerValidatePrivateKeyJwt (line 508) | class TestCIMDClientManagerValidatePrivateKeyJwt: method manager (line 512) | def manager(self): method test_missing_cimd_document_raises (line 515) | async def test_missing_cimd_document_raises(self, manager): method test_wrong_auth_method_raises (line 531) | async def test_wrong_auth_method_raises(self, manager): method test_success_delegates_to_assertion_validator (line 552) | async def test_success_delegates_to_assertion_validator(self, manager): class TestCIMDRedirectUriEnforcement (line 584) | class TestCIMDRedirectUriEnforcement: method mock_dns (line 593) | def mock_dns(self): method test_cimd_redirect_uris_enforced (line 601) | async def test_cimd_redirect_uris_enforced(self, httpx_mock, mock_dns): method test_proxy_patterns_also_checked (line 641) | async def test_proxy_patterns_also_checked(self, httpx_mock, mock_dns): FILE: tests/server/auth/test_debug_verifier.py class TestDebugTokenVerifier (line 8) | class TestDebugTokenVerifier: method test_init_defaults (line 11) | def test_init_defaults(self): method test_init_custom_parameters (line 20) | def test_init_custom_parameters(self): method test_verify_token_default_accepts_all (line 33) | async def test_verify_token_default_accepts_all(self): method test_verify_token_rejects_empty (line 46) | async def test_verify_token_rejects_empty(self): method test_verify_token_sync_callable_success (line 56) | async def test_verify_token_sync_callable_success(self): method test_verify_token_sync_callable_failure (line 73) | async def test_verify_token_sync_callable_failure(self): method test_verify_token_async_callable_success (line 81) | async def test_verify_token_async_callable_success(self): method test_verify_token_async_callable_failure (line 101) | async def test_verify_token_async_callable_failure(self): method test_verify_token_callable_exception (line 113) | async def test_verify_token_callable_exception(self): method test_verify_token_async_callable_exception (line 125) | async def test_verify_token_async_callable_exception(self): method test_verify_token_whitelist_pattern (line 137) | async def test_verify_token_whitelist_pattern(self): method test_verify_token_pattern_matching (line 151) | async def test_verify_token_pattern_matching(self): FILE: tests/server/auth/test_enhanced_error_responses.py class TestEnhancedAuthorizationHandler (line 21) | class TestEnhancedAuthorizationHandler: method rsa_key_pair (line 25) | def rsa_key_pair(self) -> RSAKeyPair: method oauth_proxy (line 30) | def oauth_proxy(self, rsa_key_pair): method test_unregistered_client_returns_html_for_browser (line 50) | def test_unregistered_client_returns_html_for_browser(self, oauth_proxy): method test_unregistered_client_returns_json_for_api (line 83) | def test_unregistered_client_returns_json_for_api(self, oauth_proxy): method test_successful_authorization_not_enhanced (line 119) | def test_successful_authorization_not_enhanced(self, oauth_proxy): method test_html_error_includes_server_branding (line 153) | def test_html_error_includes_server_branding(self, oauth_proxy): class TestEnhancedRequireAuthMiddleware (line 187) | class TestEnhancedRequireAuthMiddleware: method rsa_key_pair (line 191) | def rsa_key_pair(self) -> RSAKeyPair: method jwt_verifier (line 196) | def jwt_verifier(self, rsa_key_pair): method test_invalid_token_enhanced_error_message (line 205) | def test_invalid_token_enhanced_error_message(self, jwt_verifier): method test_invalid_token_www_authenticate_header_format (line 235) | def test_invalid_token_www_authenticate_header_format(self, jwt_verifi... method test_insufficient_scope_not_enhanced (line 257) | def test_insufficient_scope_not_enhanced(self, rsa_key_pair): class TestContentNegotiation (line 290) | class TestContentNegotiation: method oauth_proxy (line 294) | def oauth_proxy(self): method test_html_preferred_when_both_accepted (line 314) | def test_html_preferred_when_both_accepted(self, oauth_proxy): method test_json_when_only_json_accepted (line 334) | def test_json_when_only_json_accepted(self, oauth_proxy): method test_json_when_no_accept_header (line 353) | def test_json_when_no_accept_header(self, oauth_proxy): FILE: tests/server/auth/test_jwt_issuer.py class TestKeyDerivation (line 15) | class TestKeyDerivation: method test_derive_jwt_key_produces_32_bytes (line 18) | def test_derive_jwt_key_produces_32_bytes(self): method test_derive_jwt_key_with_different_secrets_produces_different_keys (line 36) | def test_derive_jwt_key_with_different_secrets_produces_different_keys... method test_derive_jwt_key_with_different_salts_produces_different_keys (line 46) | def test_derive_jwt_key_with_different_salts_produces_different_keys(s... method test_derive_jwt_key_is_deterministic (line 56) | def test_derive_jwt_key_is_deterministic(self): class TestJWTIssuer (line 67) | class TestJWTIssuer: method issuer (line 71) | def issuer(self): method test_issue_access_token_creates_valid_jwt (line 82) | def test_issue_access_token_creates_valid_jwt(self, issuer): method test_minimal_token_has_no_user_identity (line 106) | def test_minimal_token_has_no_user_identity(self, issuer): method test_issue_refresh_token_creates_valid_jwt (line 126) | def test_issue_refresh_token_creates_valid_jwt(self, issuer): method test_verify_token_validates_signature (line 142) | def test_verify_token_validates_signature(self, issuer): method test_verify_token_validates_expiration (line 164) | def test_verify_token_validates_expiration(self, issuer): method test_verify_token_validates_issuer (line 185) | def test_verify_token_validates_issuer(self, issuer): method test_verify_token_validates_audience (line 203) | def test_verify_token_validates_audience(self, issuer): method test_verify_token_rejects_malformed_tokens (line 221) | def test_verify_token_rejects_malformed_tokens(self, issuer): method test_issue_access_token_with_upstream_claims (line 232) | def test_issue_access_token_with_upstream_claims(self, issuer): method test_issue_access_token_without_upstream_claims (line 257) | def test_issue_access_token_without_upstream_claims(self, issuer): method test_issue_refresh_token_with_upstream_claims (line 269) | def test_issue_refresh_token_with_upstream_claims(self, issuer): method test_verify_token_rejects_refresh_token_as_access (line 289) | def test_verify_token_rejects_refresh_token_as_access(self, issuer): method test_verify_token_rejects_access_token_as_refresh (line 301) | def test_verify_token_rejects_access_token_as_refresh(self, issuer): FILE: tests/server/auth/test_jwt_provider.py class SymmetricKeyHelper (line 16) | class SymmetricKeyHelper: method __init__ (line 19) | def __init__(self, secret: str): method create_token (line 23) | def create_token( function rsa_key_pair (line 77) | def rsa_key_pair() -> RSAKeyPair: function symmetric_key_helper (line 82) | def symmetric_key_helper() -> SymmetricKeyHelper: function bearer_token (line 88) | def bearer_token(rsa_key_pair: RSAKeyPair) -> str: function bearer_provider (line 97) | def bearer_provider(rsa_key_pair: RSAKeyPair) -> JWTVerifier: function symmetric_provider (line 106) | def symmetric_provider(symmetric_key_helper: SymmetricKeyHelper) -> JWTV... function create_mcp_server (line 116) | def create_mcp_server( function mcp_server_url (line 135) | async def mcp_server_url(rsa_key_pair: RSAKeyPair) -> AsyncGenerator[str... class TestRSAKeyPair (line 147) | class TestRSAKeyPair: method test_generate_key_pair (line 148) | def test_generate_key_pair(self): method test_create_basic_token (line 164) | def test_create_basic_token(self, rsa_key_pair: RSAKeyPair): method test_create_token_with_scopes (line 174) | def test_create_token_with_scopes(self, rsa_key_pair: RSAKeyPair): class TestSymmetricKeyJWT (line 186) | class TestSymmetricKeyJWT: method test_initialization_with_symmetric_key (line 189) | def test_initialization_with_symmetric_key( method test_initialization_rejects_hs_algorithm_with_jwks_uri (line 204) | def test_initialization_rejects_hs_algorithm_with_jwks_uri(self): method test_initialization_with_different_symmetric_algorithms (line 213) | def test_initialization_with_different_symmetric_algorithms( method test_symmetric_algorithm_rejects_jwks_uri (line 227) | def test_symmetric_algorithm_rejects_jwks_uri(self): method test_symmetric_algorithm_rejects_pem_public_key (line 236) | def test_symmetric_algorithm_rejects_pem_public_key(self, rsa_key_pair... method test_symmetric_algorithm_accepts_bytes_secret (line 245) | def test_symmetric_algorithm_accepts_bytes_secret(self): method test_valid_symmetric_token_validation (line 253) | async def test_valid_symmetric_token_validation( method test_symmetric_token_with_different_algorithms (line 273) | async def test_symmetric_token_with_different_algorithms( method test_symmetric_token_issuer_validation (line 296) | async def test_symmetric_token_issuer_validation( method test_symmetric_token_audience_validation (line 318) | async def test_symmetric_token_audience_validation( method test_symmetric_token_scope_extraction (line 340) | async def test_symmetric_token_scope_extraction( method test_symmetric_token_expiration (line 355) | async def test_symmetric_token_expiration( method test_symmetric_token_invalid_signature (line 379) | async def test_symmetric_token_invalid_signature( method test_symmetric_token_algorithm_mismatch (line 394) | async def test_symmetric_token_algorithm_mismatch( class TestBearerTokenJWKS (line 417) | class TestBearerTokenJWKS: method jwks_provider (line 425) | def jwks_provider(self, rsa_key_pair: RSAKeyPair) -> JWTVerifier: method mock_jwks_data (line 434) | def mock_jwks_data(self, rsa_key_pair: RSAKeyPair) -> JWKSData: method mock_dns (line 447) | def mock_dns(self): method test_jwks_token_validation (line 455) | async def test_jwks_token_validation( method test_jwks_token_validation_with_invalid_key (line 485) | async def test_jwks_token_validation_with_invalid_key( method test_jwks_token_validation_with_kid (line 503) | async def test_jwks_token_validation_with_kid( method test_jwks_token_validation_with_kid_and_no_kid_in_token (line 524) | async def test_jwks_token_validation_with_kid_and_no_kid_in_token( method test_jwks_token_validation_with_no_kid_and_kid_in_jwks (line 544) | async def test_jwks_token_validation_with_no_kid_and_kid_in_jwks( method test_jwks_token_validation_with_kid_mismatch (line 564) | async def test_jwks_token_validation_with_kid_mismatch( method test_jwks_token_validation_with_multiple_keys_and_no_kid_in_token (line 584) | async def test_jwks_token_validation_with_multiple_keys_and_no_kid_in_... FILE: tests/server/auth/test_jwt_provider_bearer.py function rsa_key_pair (line 17) | def rsa_key_pair() -> RSAKeyPair: function bearer_token (line 22) | def bearer_token(rsa_key_pair: RSAKeyPair) -> str: function bearer_provider (line 31) | def bearer_provider(rsa_key_pair: RSAKeyPair) -> JWTVerifier: function create_mcp_server (line 39) | def create_mcp_server( function mcp_server_url (line 58) | async def mcp_server_url(rsa_key_pair: RSAKeyPair) -> AsyncGenerator[str... class TestBearerToken (line 70) | class TestBearerToken: method test_initialization_with_public_key (line 71) | def test_initialization_with_public_key(self, rsa_key_pair: RSAKeyPair): method test_initialization_with_jwks_uri (line 81) | def test_initialization_with_jwks_uri(self): method test_initialization_requires_key_or_uri (line 92) | def test_initialization_requires_key_or_uri(self): method test_initialization_rejects_both_key_and_uri (line 99) | def test_initialization_rejects_both_key_and_uri(self, rsa_key_pair: R... method test_valid_token_validation (line 110) | async def test_valid_token_validation( method test_expired_token_rejection (line 129) | async def test_expired_token_rejection( method test_invalid_issuer_rejection (line 143) | async def test_invalid_issuer_rejection( method test_invalid_audience_rejection (line 156) | async def test_invalid_audience_rejection( method test_no_issuer_validation_when_none (line 169) | async def test_no_issuer_validation_when_none(self, rsa_key_pair: RSAK... method test_no_audience_validation_when_none (line 183) | async def test_no_audience_validation_when_none(self, rsa_key_pair: RS... method test_multiple_audiences_validation (line 200) | async def test_multiple_audiences_validation(self, rsa_key_pair: RSAKe... method test_provider_with_multiple_expected_audiences (line 219) | async def test_provider_with_multiple_expected_audiences( method test_provider_with_multiple_expected_issuers (line 266) | async def test_provider_with_multiple_expected_issuers( method test_scope_extraction_string (line 281) | async def test_scope_extraction_string( method test_scope_extraction_list (line 297) | async def test_scope_extraction_list( method test_no_scopes (line 313) | async def test_no_scopes( method test_scp_claim_extraction_string (line 329) | async def test_scp_claim_extraction_string( method test_scp_claim_extraction_list (line 345) | async def test_scp_claim_extraction_list( method test_scope_precedence_over_scp (line 363) | async def test_scope_precedence_over_scp( method test_malformed_token_rejection (line 382) | async def test_malformed_token_rejection(self, bearer_provider: JWTVer... method test_invalid_signature_rejection (line 396) | async def test_invalid_signature_rejection( method test_client_id_fallback (line 411) | async def test_client_id_fallback( method test_string_issuer_validation (line 427) | async def test_string_issuer_validation(self, rsa_key_pair: RSAKeyPair): method test_string_issuer_mismatch_rejection (line 445) | async def test_string_issuer_mismatch_rejection(self, rsa_key_pair: RS... method test_url_issuer_still_works (line 462) | async def test_url_issuer_still_works(self, rsa_key_pair: RSAKeyPair): class TestFastMCPBearerAuth (line 481) | class TestFastMCPBearerAuth: method test_bearer_auth (line 482) | def test_bearer_auth(self): method test_unauthorized_access (line 488) | async def test_unauthorized_access(self, mcp_server_url: str): method test_authorized_access (line 496) | async def test_authorized_access(self, mcp_server_url: str, bearer_tok... method test_invalid_token_raises_401 (line 501) | async def test_invalid_token_raises_401(self, mcp_server_url: str): method test_expired_token (line 509) | async def test_expired_token(self, mcp_server_url: str, rsa_key_pair: ... method test_token_with_bad_signature (line 524) | async def test_token_with_bad_signature(self, mcp_server_url: str): method test_token_with_insufficient_scopes (line 535) | async def test_token_with_insufficient_scopes(self, rsa_key_pair: RSAK... method test_token_with_sufficient_scopes (line 559) | async def test_token_with_sufficient_scopes(self, rsa_key_pair: RSAKey... class TestJWTVerifierImport (line 578) | class TestJWTVerifierImport: method test_jwt_verifier_requires_pyjwt (line 581) | def test_jwt_verifier_requires_pyjwt(self): class TestScopesSupported (line 596) | class TestScopesSupported: method test_defaults_to_required_scopes (line 599) | def test_defaults_to_required_scopes(self, rsa_key_pair: RSAKeyPair): method test_empty_when_no_required_scopes (line 606) | def test_empty_when_no_required_scopes(self, rsa_key_pair: RSAKeyPair): FILE: tests/server/auth/test_multi_auth.py class RaisingVerifier (line 11) | class RaisingVerifier(TokenVerifier): method verify_token (line 14) | async def verify_token(self, token: str) -> AccessToken | None: class TestMultiAuthInit (line 18) | class TestMultiAuthInit: method test_requires_server_or_verifiers (line 21) | def test_requires_server_or_verifiers(self): method test_server_only (line 26) | def test_server_only(self): method test_verifiers_only (line 37) | def test_verifiers_only(self): method test_single_verifier_not_in_list (line 43) | def test_single_verifier_not_in_list(self): method test_base_url_from_server (line 49) | def test_base_url_from_server(self): method test_base_url_override (line 59) | def test_base_url_override(self): method test_required_scopes_from_server (line 69) | def test_required_scopes_from_server(self): class TestMultiAuthVerifyToken (line 83) | class TestMultiAuthVerifyToken: method test_server_verified_first (line 86) | async def test_server_verified_first(self): method test_falls_back_to_verifiers (line 106) | async def test_falls_back_to_verifiers(self): method test_verifier_order_matters (line 126) | async def test_verifier_order_matters(self): method test_no_match_returns_none (line 140) | async def test_no_match_returns_none(self): method test_verifiers_only_no_server (line 147) | async def test_verifiers_only_no_server(self): method test_raising_verifier_does_not_break_chain (line 162) | async def test_raising_verifier_does_not_break_chain(self): method test_raising_server_does_not_break_chain (line 173) | async def test_raising_server_does_not_break_chain(self): method test_all_raising_returns_none (line 184) | async def test_all_raising_returns_none(self): method test_server_match_short_circuits (line 190) | async def test_server_match_short_circuits(self): class TestMultiAuthRoutes (line 211) | class TestMultiAuthRoutes: method test_routes_from_server (line 214) | def test_routes_from_server(self): method test_no_routes_without_server (line 226) | def test_no_routes_without_server(self): method test_well_known_routes_delegate_to_server (line 231) | def test_well_known_routes_delegate_to_server(self): method test_well_known_routes_empty_without_server (line 246) | def test_well_known_routes_empty_without_server(self): method test_required_scopes_explicit_empty_list (line 251) | def test_required_scopes_explicit_empty_list(self): class TestMultiAuthIntegration (line 267) | class TestMultiAuthIntegration: method test_multi_auth_rejects_bad_tokens (line 270) | async def test_multi_auth_rejects_bad_tokens(self): method test_multi_auth_with_server_provides_routes (line 307) | async def test_multi_auth_with_server_provides_routes(self): method test_multi_auth_accepts_valid_verifier_token (line 331) | async def test_multi_auth_accepts_valid_verifier_token(self): class TestMultiAuthSetMcpPath (line 387) | class TestMultiAuthSetMcpPath: method test_propagates_to_server (line 390) | def test_propagates_to_server(self): method test_propagates_to_verifiers (line 401) | def test_propagates_to_verifiers(self): FILE: tests/server/auth/test_oauth_consent_flow.py class MockTokenVerifier (line 33) | class MockTokenVerifier(TokenVerifier): method __init__ (line 36) | def __init__(self): method verify_token (line 39) | async def verify_token(self, token: str): class _Verifier (line 49) | class _Verifier(TokenVerifier): method __init__ (line 52) | def __init__(self): method verify_token (line 55) | async def verify_token(self, token: str): function storage (line 62) | def storage(): function oauth_proxy_with_storage (line 68) | def oauth_proxy_with_storage(storage): function oauth_proxy_https (line 84) | def oauth_proxy_https(): function _start_flow (line 98) | async def _start_flow( function _extract_csrf (line 128) | def _extract_csrf(html: str) -> str | None: class TestServerSideStorage (line 134) | class TestServerSideStorage: method test_transaction_stored_in_storage_not_memory (line 137) | async def test_transaction_stored_in_storage_not_memory( method test_authorization_code_stored_in_storage (line 185) | async def test_authorization_code_stored_in_storage( method test_storage_collections_are_isolated (line 270) | async def test_storage_collections_are_isolated(self, oauth_proxy_with... class TestConsentFlowRedirects (line 311) | class TestConsentFlowRedirects: method test_authorize_redirects_to_consent_page (line 314) | async def test_authorize_redirects_to_consent_page(self, oauth_proxy_w... method test_consent_page_contains_transaction_id (line 338) | async def test_consent_page_contains_transaction_id(self, oauth_proxy_... class TestCSRFProtection (line 379) | class TestCSRFProtection: method test_consent_requires_csrf_token (line 382) | async def test_consent_requires_csrf_token(self, oauth_proxy_with_stor... method test_consent_cookie_established_on_page_visit (line 423) | async def test_consent_cookie_established_on_page_visit( class TestCSRFDoubleSubmit (line 465) | class TestCSRFDoubleSubmit: method test_consent_rejected_without_csrf_cookie (line 468) | async def test_consent_rejected_without_csrf_cookie(self, oauth_proxy_... class TestStoragePersistence (line 504) | class TestStoragePersistence: method test_transaction_persists_after_retrieval (line 507) | async def test_transaction_persists_after_retrieval(self, oauth_proxy_... method test_storage_uses_pydantic_adapter (line 542) | async def test_storage_uses_pydantic_adapter(self, oauth_proxy_with_st... class TestConsentSecurity (line 576) | class TestConsentSecurity: method test_consent_sets_xfo_header (line 579) | async def test_consent_sets_xfo_header(self, oauth_proxy_https): method test_deny_sets_cookie_and_redirects_with_error (line 590) | async def test_deny_sets_cookie_and_redirects_with_error(self, oauth_p... method test_approve_sets_cookie_and_redirects_to_upstream (line 619) | async def test_approve_sets_cookie_and_redirects_to_upstream( method test_tampered_cookie_is_ignored (line 646) | async def test_tampered_cookie_is_ignored(self, oauth_proxy_https): method test_autoapprove_cookie_skips_consent (line 663) | async def test_autoapprove_cookie_skips_consent(self, oauth_proxy_https): FILE: tests/server/auth/test_oauth_consent_page.py class _Verifier (line 24) | class _Verifier(TokenVerifier): method __init__ (line 27) | def __init__(self): method verify_token (line 30) | async def verify_token(self, token: str): function oauth_proxy_https (line 37) | def oauth_proxy_https(): function _start_flow (line 51) | async def _start_flow( function _extract_csrf (line 81) | def _extract_csrf(html: str) -> str | None: class TestConsentPageServerIcon (line 87) | class TestConsentPageServerIcon: method test_consent_screen_displays_server_icon (line 90) | async def test_consent_screen_displays_server_icon(self): method test_consent_screen_falls_back_to_fastmcp_logo (line 158) | async def test_consent_screen_falls_back_to_fastmcp_logo(self): method test_consent_screen_escapes_server_name (line 220) | async def test_consent_screen_escapes_server_name(self): class TestConsentCSPPolicy (line 289) | class TestConsentCSPPolicy: method test_default_csp_omits_form_action (line 292) | async def test_default_csp_omits_form_action(self): method test_empty_csp_disables_csp_meta_tag (line 342) | async def test_empty_csp_disables_csp_meta_tag(self): method test_custom_csp_policy_is_used (line 392) | async def test_custom_csp_policy_is_used(self): class TestConsentBindingCookie (line 450) | class TestConsentBindingCookie: method test_approve_sets_consent_binding_cookie (line 458) | async def test_approve_sets_consent_binding_cookie(self, oauth_proxy_h... method test_auto_approve_sets_consent_binding_cookie (line 479) | async def test_auto_approve_sets_consent_binding_cookie(self, oauth_pr... method test_parallel_flows_do_not_interfere (line 513) | async def test_parallel_flows_do_not_interfere(self, oauth_proxy_https): method test_idp_callback_rejects_missing_consent_cookie (line 571) | async def test_idp_callback_rejects_missing_consent_cookie(self, oauth... method test_idp_callback_rejects_wrong_consent_cookie (line 600) | async def test_idp_callback_rejects_wrong_consent_cookie(self, oauth_p... method test_idp_callback_rejects_missing_consent_token_on_transaction (line 622) | async def test_idp_callback_rejects_missing_consent_token_on_transaction( method test_consent_disabled_skips_binding_check (line 638) | async def test_consent_disabled_skips_binding_check(self): FILE: tests/server/auth/test_oauth_mounting.py function test_tokens (line 23) | def test_tokens(): class TestOAuthMounting (line 33) | class TestOAuthMounting: method test_well_known_with_direct_deployment (line 36) | async def test_well_known_with_direct_deployment(self, test_tokens): method test_well_known_with_mounted_app (line 66) | async def test_well_known_with_mounted_app(self, test_tokens): method test_mcp_endpoint_with_mounted_app (line 115) | async def test_mcp_endpoint_with_mounted_app(self, test_tokens): method test_nested_mounting (line 155) | async def test_nested_mounting(self, test_tokens): method test_oauth_authorization_server_metadata_with_base_url_and_issuer_url (line 200) | async def test_oauth_authorization_server_metadata_with_base_url_and_i... method test_oauth_authorization_server_metadata_path_aware_discovery (line 271) | async def test_oauth_authorization_server_metadata_path_aware_discovery( method test_oauth_authorization_server_metadata_root_issuer (line 354) | async def test_oauth_authorization_server_metadata_root_issuer(self, t... FILE: tests/server/auth/test_oauth_proxy_redirect_validation.py class MockTokenVerifier (line 19) | class MockTokenVerifier(TokenVerifier): method __init__ (line 22) | def __init__(self): method verify_token (line 25) | async def verify_token(self, token: str) -> dict | None: # type: igno... class TestProxyDCRClient (line 29) | class TestProxyDCRClient: method test_default_allows_all (line 32) | def test_default_allows_all(self): method test_custom_patterns (line 57) | def test_custom_patterns(self): method test_default_not_applied_when_custom_patterns_supplied (line 81) | def test_default_not_applied_when_custom_patterns_supplied(self): method test_empty_list_allows_none (line 109) | def test_empty_list_allows_none(self): method test_none_redirect_uri (line 130) | def test_none_redirect_uri(self): method test_cimd_none_redirect_uri_single_exact (line 142) | def test_cimd_none_redirect_uri_single_exact(self): method test_cimd_none_redirect_uri_respects_proxy_patterns (line 158) | def test_cimd_none_redirect_uri_respects_proxy_patterns(self): method test_cimd_none_redirect_uri_wildcard_rejected (line 175) | def test_cimd_none_redirect_uri_wildcard_rejected(self): method test_cimd_empty_proxy_allowlist_rejects_redirect_uri (line 191) | def test_cimd_empty_proxy_allowlist_rejects_redirect_uri(self): class TestOAuthProxyRedirectValidation (line 209) | class TestOAuthProxyRedirectValidation: method test_proxy_default_allows_all (line 212) | def test_proxy_default_allows_all(self): method test_proxy_custom_patterns (line 228) | def test_proxy_custom_patterns(self): method test_proxy_empty_list_validation (line 246) | def test_proxy_empty_list_validation(self): method test_proxy_register_client_uses_patterns (line 262) | async def test_proxy_register_client_uses_patterns(self): method test_proxy_unregistered_client_returns_none (line 296) | async def test_proxy_unregistered_client_returns_none(self): class TestOAuthProxyCIMDClient (line 317) | class TestOAuthProxyCIMDClient: method mock_dns (line 321) | def mock_dns(self): method test_proxy_get_client_returns_cimd_client (line 329) | async def test_proxy_get_client_returns_cimd_client(self, httpx_mock, ... method test_proxy_cimd_dual_redirect_validation (line 360) | async def test_proxy_cimd_dual_redirect_validation(self, httpx_mock, m... FILE: tests/server/auth/test_oauth_proxy_storage.py class TestOAuthProxyStorage (line 21) | class TestOAuthProxyStorage: method jwt_verifier (line 25) | def jwt_verifier(self): method temp_storage (line 33) | async def temp_storage(self) -> AsyncGenerator[FileTreeStore, None]: method memory_storage (line 41) | def memory_storage(self) -> MemoryStore: method create_proxy (line 45) | def create_proxy( method test_register_and_get_client (line 61) | async def test_register_and_get_client(self, jwt_verifier, temp_storage): method test_client_persists_across_proxy_instances (line 83) | async def test_client_persists_across_proxy_instances( method test_nonexistent_client_returns_none (line 105) | async def test_nonexistent_client_returns_none( method test_proxy_dcr_client_redirect_validation (line 113) | async def test_proxy_dcr_client_redirect_validation( method test_in_memory_storage_option (line 146) | async def test_in_memory_storage_option(self, jwt_verifier): method test_storage_data_structure (line 171) | async def test_storage_data_structure(self, jwt_verifier, temp_storage): FILE: tests/server/auth/test_oidc_proxy.py function valid_oidc_configuration_dict (line 30) | def valid_oidc_configuration_dict(): function invalid_oidc_configuration_dict (line 44) | def invalid_oidc_configuration_dict(): function valid_google_oidc_configuration_dict (line 55) | def valid_google_oidc_configuration_dict(): function valid_auth0_oidc_configuration_dict (line 129) | def valid_auth0_oidc_configuration_dict(): function validate_config (line 247) | def validate_config(config, source_dict): class TestOIDCConfiguration (line 261) | class TestOIDCConfiguration: method test_default_configuration (line 264) | def test_default_configuration(self, valid_oidc_configuration_dict): method test_default_configuration_with_issuer_trailing_slash (line 269) | def test_default_configuration_with_issuer_trailing_slash( method test_explicit_strict_configuration (line 277) | def test_explicit_strict_configuration(self, valid_oidc_configuration_... method test_explicit_strict_configuration_with_issuer_trailing_slash (line 283) | def test_explicit_strict_configuration_with_issuer_trailing_slash( method test_default_configuration_raises_error (line 291) | def test_default_configuration_raises_error(self, invalid_oidc_configu... method test_explicit_strict_configuration_raises_error (line 296) | def test_explicit_strict_configuration_raises_error( method test_bad_url_raises_error (line 304) | def test_bad_url_raises_error(self, valid_oidc_configuration_dict): method test_explicit_strict_with_bad_url_raises_error (line 310) | def test_explicit_strict_with_bad_url_raises_error( method test_not_strict_configuration (line 319) | def test_not_strict_configuration(self): method test_not_strict_configuration_with_invalid_config (line 331) | def test_not_strict_configuration_with_invalid_config( method test_not_strict_configuration_with_bad_url (line 340) | def test_not_strict_configuration_with_bad_url(self, valid_oidc_config... method test_google_configuration (line 348) | def test_google_configuration(self, valid_google_oidc_configuration_di... method test_auth0_configuration (line 354) | def test_auth0_configuration(self, valid_auth0_oidc_configuration_dict): function validate_get_oidc_configuration (line 361) | def validate_get_oidc_configuration(oidc_configuration, strict, timeout_... class TestGetOIDCConfiguration (line 384) | class TestGetOIDCConfiguration: method test_get_oidc_configuration (line 387) | def test_get_oidc_configuration(self, valid_oidc_configuration_dict): method test_get_oidc_configuration_no_timeout (line 394) | def test_get_oidc_configuration_no_timeout(self, valid_oidc_configurat... method test_get_oidc_configuration_raises_error (line 401) | def test_get_oidc_configuration_raises_error( method test_get_oidc_configuration_not_strict (line 408) | def test_get_oidc_configuration_not_strict( function validate_proxy (line 429) | def validate_proxy(mock_get, proxy, oidc_config): class TestOIDCProxyInitialization (line 445) | class TestOIDCProxyInitialization: method test_default_initialization (line 448) | def test_default_initialization(self, valid_oidc_configuration_dict): method test_timeout_seconds_initialization (line 468) | def test_timeout_seconds_initialization(self, valid_oidc_configuration... method test_token_verifier_initialization (line 492) | def test_token_verifier_initialization(self, valid_oidc_configuration_... method test_extra_parameters_initialization (line 521) | def test_extra_parameters_initialization(self, valid_oidc_configuratio... method test_other_parameters_initialization (line 547) | def test_other_parameters_initialization(self, valid_oidc_configuratio... method test_no_config_url_initialization_raises_error (line 574) | def test_no_config_url_initialization_raises_error( method test_no_client_id_initialization_raises_error (line 595) | def test_no_client_id_initialization_raises_error( method test_no_client_secret_initialization_raises_error (line 615) | def test_no_client_secret_initialization_raises_error( method test_no_base_url_initialization_raises_error (line 638) | def test_no_base_url_initialization_raises_error( method test_custom_token_verifier_initialization (line 658) | def test_custom_token_verifier_initialization(self, valid_oidc_configu... method test_custom_token_verifier_with_algorithm_raises_error (line 694) | def test_custom_token_verifier_with_algorithm_raises_error( method test_custom_token_verifier_with_required_scopes_raises_error (line 726) | def test_custom_token_verifier_with_required_scopes_raises_error( method test_custom_token_verifier_with_audience_allowed (line 758) | def test_custom_token_verifier_with_audience_allowed( method test_extra_authorize_params_initialization (line 791) | def test_extra_authorize_params_initialization(self, valid_oidc_config... method test_extra_token_params_initialization (line 822) | def test_extra_token_params_initialization(self, valid_oidc_configurat... method test_extra_params_merge_with_audience (line 847) | def test_extra_params_merge_with_audience(self, valid_oidc_configurati... FILE: tests/server/auth/test_oidc_proxy_token.py function valid_oidc_configuration_dict (line 29) | def valid_oidc_configuration_dict(): function _make_upstream_token_set (line 47) | def _make_upstream_token_set(*, id_token: str | None = None) -> Upstream... class TestVerifyIdToken (line 71) | class TestVerifyIdToken: method test_verify_id_token_disabled_by_default (line 74) | def test_verify_id_token_disabled_by_default(self, valid_oidc_configur... method test_verify_id_token_returns_id_token (line 95) | def test_verify_id_token_returns_id_token(self, valid_oidc_configurati... method test_verify_id_token_returns_none_when_missing (line 117) | def test_verify_id_token_returns_none_when_missing( method test_verify_id_token_works_with_custom_verifier (line 141) | def test_verify_id_token_works_with_custom_verifier( method test_verify_id_token_survives_refresh_without_id_token (line 172) | def test_verify_id_token_survives_refresh_without_id_token( method test_verify_id_token_updated_when_refresh_includes_it (line 206) | def test_verify_id_token_updated_when_refresh_includes_it( method test_verify_id_token_uses_client_id_as_verifier_audience (line 239) | def test_verify_id_token_uses_client_id_as_verifier_audience( method test_verify_id_token_without_audience_uses_client_id (line 271) | def test_verify_id_token_without_audience_uses_client_id( method test_verify_id_token_does_not_enforce_scopes_on_verifier (line 296) | def test_verify_id_token_does_not_enforce_scopes_on_verifier( class TestUsesAlternateVerification (line 334) | class TestUsesAlternateVerification: method test_disabled_by_default (line 337) | def test_disabled_by_default(self, valid_oidc_configuration_dict): method test_enabled_with_verify_id_token (line 357) | def test_enabled_with_verify_id_token(self, valid_oidc_configuration_d... method test_scope_patch_applied_when_tokens_identical (line 378) | def test_scope_patch_applied_when_tokens_identical( FILE: tests/server/auth/test_redirect_validation.py class TestMatchesAllowedPattern (line 12) | class TestMatchesAllowedPattern: method test_exact_match (line 15) | def test_exact_match(self): method test_port_wildcard (line 24) | def test_port_wildcard(self): method test_path_wildcard (line 31) | def test_path_wildcard(self): method test_subdomain_wildcard (line 38) | def test_subdomain_wildcard(self): method test_multiple_wildcards (line 46) | def test_multiple_wildcards(self): class TestValidateRedirectUri (line 60) | class TestValidateRedirectUri: method test_none_redirect_uri_allowed (line 63) | def test_none_redirect_uri_allowed(self): method test_default_allows_all (line 69) | def test_default_allows_all(self): method test_empty_list_allows_none (line 78) | def test_empty_list_allows_none(self): method test_custom_patterns (line 84) | def test_custom_patterns(self): method test_anyurl_conversion (line 102) | def test_anyurl_conversion(self): class TestSecurityBypass (line 112) | class TestSecurityBypass: method test_userinfo_bypass_blocked (line 115) | def test_userinfo_bypass_blocked(self): method test_userinfo_bypass_with_subdomain_pattern (line 134) | def test_userinfo_bypass_with_subdomain_pattern(self): method test_legitimate_uris_still_work (line 146) | def test_legitimate_uris_still_work(self): method test_scheme_mismatch_blocked (line 155) | def test_scheme_mismatch_blocked(self): method test_host_mismatch_blocked (line 164) | def test_host_mismatch_blocked(self): class TestDefaultPatterns (line 171) | class TestDefaultPatterns: method test_default_patterns_exist (line 174) | def test_default_patterns_exist(self): method test_default_patterns_include_localhost (line 179) | def test_default_patterns_include_localhost(self): method test_explicit_localhost_patterns (line 184) | def test_explicit_localhost_patterns(self): FILE: tests/server/auth/test_remote_auth_provider.py function test_tokens (line 11) | def test_tokens(): class TestRemoteAuthProvider (line 21) | class TestRemoteAuthProvider: method test_init (line 24) | def test_init(self, test_tokens): method test_verify_token_delegates_to_verifier (line 39) | async def test_verify_token_delegates_to_verifier(self, test_tokens): method test_get_routes_creates_protected_resource_routes (line 66) | def test_get_routes_creates_protected_resource_routes(self, test_tokens): method test_get_resource_url_with_well_known_path (line 87) | def test_get_resource_url_with_well_known_path(self): method test_get_resource_url_with_nested_base_url (line 109) | def test_get_resource_url_with_nested_base_url(self): method test_get_resource_url_handles_trailing_slash (line 131) | def test_get_resource_url_handles_trailing_slash(self): class TestRemoteAuthProviderIntegration (line 154) | class TestRemoteAuthProviderIntegration: method basic_auth_provider (line 158) | def basic_auth_provider(self, test_tokens): method _create_test_auth_provider (line 167) | def _create_test_auth_provider( method test_protected_resource_metadata_endpoint_status_code (line 188) | async def test_protected_resource_metadata_endpoint_status_code( method test_protected_resource_metadata_endpoint_resource_field (line 203) | async def test_protected_resource_metadata_endpoint_resource_field(self): method test_protected_resource_metadata_endpoint_authorization_servers_field (line 221) | async def test_protected_resource_metadata_endpoint_authorization_serv... method test_base_url_configurations (line 248) | async def test_base_url_configurations(self, base_url: str, expected_r... method test_multiple_authorization_servers_resource_field (line 273) | async def test_multiple_authorization_servers_resource_field(self): method test_multiple_authorization_servers_list (line 297) | async def test_multiple_authorization_servers_list(self): method test_token_verification_with_valid_auth_succeeds (line 324) | async def test_token_verification_with_valid_auth_succeeds(self): method test_token_verification_with_invalid_auth_fails (line 354) | async def test_token_verification_with_invalid_auth_fails(self): method test_issue_1348_oauth_discovery_returns_correct_url (line 374) | async def test_issue_1348_oauth_discovery_returns_correct_url(self): method test_resource_name_field (line 410) | async def test_resource_name_field(self): method test_resource_documentation_field (line 446) | async def test_resource_documentation_field(self): method test_scopes_supported_overrides_metadata (line 487) | async def test_scopes_supported_overrides_metadata(self): method test_scopes_supported_defaults_to_verifier (line 516) | async def test_scopes_supported_defaults_to_verifier(self): FILE: tests/server/auth/test_ssrf_protection.py class TestIsIPAllowed (line 20) | class TestIsIPAllowed: method test_public_ipv4_allowed (line 23) | def test_public_ipv4_allowed(self): method test_private_ipv4_blocked (line 29) | def test_private_ipv4_blocked(self): method test_loopback_blocked (line 35) | def test_loopback_blocked(self): method test_link_local_blocked (line 40) | def test_link_local_blocked(self): method test_rfc6598_cgnat_blocked (line 44) | def test_rfc6598_cgnat_blocked(self): method test_ipv4_mapped_ipv6_blocked_if_private (line 49) | def test_ipv4_mapped_ipv6_blocked_if_private(self): class TestValidateURL (line 55) | class TestValidateURL: method test_http_rejected (line 58) | async def test_http_rejected(self): method test_missing_host_rejected (line 63) | async def test_missing_host_rejected(self): method test_root_path_rejected_when_required (line 68) | async def test_root_path_rejected_when_required(self): method test_private_ip_rejected (line 77) | async def test_private_ip_rejected(self): class TestSSRFSafeFetch (line 87) | class TestSSRFSafeFetch: method test_private_ip_blocked (line 90) | async def test_private_ip_blocked(self): method test_cgnat_blocked (line 99) | async def test_cgnat_blocked(self): method test_connects_to_pinned_ip (line 108) | async def test_connects_to_pinned_ip(self): method test_fallback_to_second_ip (line 143) | async def test_fallback_to_second_ip(self): method test_host_header_set (line 188) | async def test_host_header_set(self): method test_response_size_limit (line 223) | async def test_response_size_limit(self): class TestJWKSSSRFProtection (line 256) | class TestJWKSSSRFProtection: method test_jwks_private_ip_blocked (line 259) | async def test_jwks_private_ip_blocked(self): method test_jwks_cgnat_blocked (line 277) | async def test_jwks_cgnat_blocked(self): method test_jwks_loopback_blocked (line 294) | async def test_jwks_loopback_blocked(self): class TestIPv6URLFormatting (line 312) | class TestIPv6URLFormatting: method test_format_ip_for_url_ipv4 (line 315) | def test_format_ip_for_url_ipv4(self): method test_format_ip_for_url_ipv6 (line 322) | def test_format_ip_for_url_ipv6(self): method test_format_ip_for_url_invalid (line 330) | def test_format_ip_for_url_invalid(self): method test_ipv6_pinned_url_is_valid (line 337) | async def test_ipv6_pinned_url_is_valid(self): class TestStreamingResponseSizeLimit (line 377) | class TestStreamingResponseSizeLimit: method test_size_limit_enforced_during_streaming (line 380) | async def test_size_limit_enforced_during_streaming(self): method test_content_length_header_checked_first (line 420) | async def test_content_length_header_checked_first(self): FILE: tests/server/auth/test_static_token_verifier.py class TestStaticTokenVerifier (line 10) | class TestStaticTokenVerifier: method test_static_token_verifier_creation (line 13) | def test_static_token_verifier_creation(self): method test_static_token_verifier_verify_token (line 22) | async def test_static_token_verifier_verify_token(self): method test_server_with_token_verifier_http_app (line 53) | async def test_server_with_token_verifier_http_app(self): method test_server_with_token_verifier_redirect_behavior (line 76) | async def test_server_with_token_verifier_redirect_behavior(self): method test_server_rejects_both_oauth_and_token_verifier (line 99) | def test_server_rejects_both_oauth_and_token_verifier(self): FILE: tests/server/http/test_bearer_auth_backend.py class TestBearerAuthBackendTokenVerifierIntegration (line 11) | class TestBearerAuthBackendTokenVerifierIntegration: method rsa_key_pair (line 15) | def rsa_key_pair(self) -> RSAKeyPair: method jwt_verifier (line 20) | def jwt_verifier(self, rsa_key_pair: RSAKeyPair) -> JWTVerifier: method valid_token (line 29) | def valid_token(self, rsa_key_pair: RSAKeyPair) -> str: method test_bearer_auth_backend_constructor_accepts_token_verifier (line 38) | def test_bearer_auth_backend_constructor_accepts_token_verifier( method test_bearer_auth_backend_authenticate_with_valid_token (line 47) | async def test_bearer_auth_backend_authenticate_with_valid_token( method test_bearer_auth_backend_authenticate_with_invalid_token (line 69) | async def test_bearer_auth_backend_authenticate_with_invalid_token( method test_bearer_auth_backend_authenticate_with_no_header (line 85) | async def test_bearer_auth_backend_authenticate_with_no_header( method test_bearer_auth_backend_authenticate_with_non_bearer_token (line 101) | async def test_bearer_auth_backend_authenticate_with_non_bearer_token( class MockTokenVerifier (line 118) | class MockTokenVerifier: method __init__ (line 121) | def __init__(self, return_value: AccessToken | None = None): method verify_token (line 125) | async def verify_token(self, token: str) -> AccessToken | None: class TestBearerAuthBackendWithMockVerifier (line 131) | class TestBearerAuthBackendWithMockVerifier: method test_backend_calls_verify_token_method (line 134) | async def test_backend_calls_verify_token_method(self): method test_backend_handles_verify_token_none_result (line 162) | async def test_backend_handles_verify_token_none_result(self): FILE: tests/server/http/test_custom_routes.py class TestCustomRoutes (line 10) | class TestCustomRoutes: method server_with_custom_route (line 12) | def server_with_custom_route(self): method test_custom_routes_apply_filtering_http_app (line 22) | def test_custom_routes_apply_filtering_http_app(self, server_with_cust... method test_custom_routes_via_streamable_http_app_direct (line 36) | def test_custom_routes_via_streamable_http_app_direct( method test_custom_routes_via_sse_app_direct (line 54) | def test_custom_routes_via_sse_app_direct(self, server_with_custom_rou... method test_multiple_custom_routes (line 70) | def test_multiple_custom_routes( FILE: tests/server/http/test_http_auth_middleware.py class TestStreamableHTTPAppResourceMetadataURL (line 11) | class TestStreamableHTTPAppResourceMetadataURL: method rsa_key_pair (line 15) | def rsa_key_pair(self) -> RSAKeyPair: method bearer_auth_provider (line 20) | def bearer_auth_provider(self, rsa_key_pair): method test_auth_endpoint_wrapped_with_require_auth_middleware (line 29) | def test_auth_endpoint_wrapped_with_require_auth_middleware( method test_auth_endpoint_has_correct_methods (line 46) | def test_auth_endpoint_has_correct_methods(self, rsa_key_pair): method test_no_auth_provider_mounts_without_middleware (line 69) | def test_no_auth_provider_mounts_without_middleware(self, rsa_key_pair): method test_authenticated_requests_still_require_auth (line 81) | def test_authenticated_requests_still_require_auth(self, bearer_auth_p... FILE: tests/server/http/test_http_dependencies.py function fastmcp_server (line 13) | def fastmcp_server(): function shttp_server (line 43) | async def shttp_server(): function sse_server (line 51) | async def sse_server(): function test_http_headers_resource_shttp (line 58) | async def test_http_headers_resource_shttp(shttp_server: str): function test_http_headers_resource_sse (line 72) | async def test_http_headers_resource_sse(sse_server: str): function test_http_headers_tool_shttp (line 84) | async def test_http_headers_tool_shttp(shttp_server: str): function test_http_headers_tool_sse (line 96) | async def test_http_headers_tool_sse(sse_server: str): function test_http_headers_prompt_shttp (line 105) | async def test_http_headers_prompt_shttp(shttp_server: str): function test_http_headers_prompt_sse (line 119) | async def test_http_headers_prompt_sse(sse_server: str): function test_get_http_headers_excludes_content_type (line 131) | async def test_get_http_headers_excludes_content_type(sse_server: str): FILE: tests/server/http/test_http_middleware.py class HeaderMiddleware (line 19) | class HeaderMiddleware(BaseHTTPMiddleware): method __init__ (line 22) | def __init__(self, app: ASGIApp, header_name: str, header_value: str): method dispatch (line 27) | async def dispatch(self, request: Request, call_next: Callable): class RequestModifierMiddleware (line 33) | class RequestModifierMiddleware(BaseHTTPMiddleware): method __init__ (line 36) | def __init__(self, app: ASGIApp, key: str, value: Any): method dispatch (line 41) | async def dispatch(self, request: Request, call_next: Callable): function endpoint_handler (line 46) | async def endpoint_handler(request: Request): function test_sse_app_with_custom_middleware (line 53) | async def test_sse_app_with_custom_middleware(): function test_streamable_http_app_with_custom_middleware (line 86) | async def test_streamable_http_app_with_custom_middleware(): function test_create_sse_app_with_custom_middleware (line 119) | async def test_create_sse_app_with_custom_middleware(): function test_create_streamable_http_app_with_custom_middleware (line 159) | async def test_create_streamable_http_app_with_custom_middleware(): function test_multiple_middleware_ordering (line 198) | async def test_multiple_middleware_ordering(): FILE: tests/server/http/test_stale_access_token.py class TestStaleAccessToken (line 22) | class TestStaleAccessToken: method test_get_access_token_prefers_request_scope_over_stale_context_var (line 25) | def test_get_access_token_prefers_request_scope_over_stale_context_var... method test_get_access_token_falls_back_to_context_var_when_no_request (line 92) | def test_get_access_token_falls_back_to_context_var_when_no_request(se... method test_get_access_token_returns_none_when_no_auth (line 116) | def test_get_access_token_returns_none_when_no_auth(self): method test_get_access_token_falls_back_when_scope_user_is_not_authenticated (line 124) | def test_get_access_token_falls_back_when_scope_user_is_not_authentica... FILE: tests/server/middleware/test_caching.py function sample_resource_fn (line 53) | def sample_resource_fn() -> list[ReadResourceContents]: function sample_prompt_fn (line 57) | def sample_prompt_fn() -> Message: class CrazyModel (line 80) | class CrazyModel(BaseModel): function crazy_model (line 93) | def crazy_model() -> CrazyModel: class TrackingCalculator (line 107) | class TrackingCalculator: method __init__ (line 113) | def __init__(self): method add (line 119) | def add(self, a: int, b: int) -> int: method multiply (line 123) | def multiply(self, a: int, b: int) -> int: method very_large_response (line 127) | def very_large_response(self) -> str: method crazy (line 131) | def crazy(self, a: CrazyModel) -> CrazyModel: method how_to_calculate (line 135) | def how_to_calculate(self, a: int, b: int) -> str: method get_add_calls (line 138) | def get_add_calls(self) -> str: method get_multiply_calls (line 141) | def get_multiply_calls(self) -> str: method get_crazy_calls (line 144) | def get_crazy_calls(self) -> str: method update_tool_list (line 147) | async def update_tool_list(self, context: Context): method add_tools (line 152) | def add_tools(self, fastmcp: FastMCP, prefix: str = ""): method add_prompts (line 171) | def add_prompts(self, fastmcp: FastMCP, prefix: str = ""): method add_resources (line 178) | def add_resources(self, fastmcp: FastMCP, prefix: str = ""): function tracking_calculator (line 203) | def tracking_calculator() -> TrackingCalculator: function mock_context (line 208) | def mock_context() -> MiddlewareContext[mcp.types.CallToolRequestParams]: function mock_call_next (line 219) | def mock_call_next() -> CallNext[mcp.types.CallToolRequestParams, ToolRe... function sample_tool_result (line 230) | def sample_tool_result() -> ToolResult: class TestResponseCachingMiddleware (line 238) | class TestResponseCachingMiddleware: method test_initialization (line 241) | def test_initialization(self): method test_tool_call_filtering (line 269) | def test_tool_call_filtering( class TestResponseCachingMiddlewareIntegration (line 290) | class TestResponseCachingMiddlewareIntegration: method caching_server (line 294) | async def caching_server( method non_caching_server (line 329) | def non_caching_server(self, tracking_calculator: TrackingCalculator): method test_list_tools (line 335) | async def test_list_tools( method test_call_tool (line 354) | async def test_call_tool( method test_call_tool_very_large_value (line 373) | async def test_call_tool_very_large_value( method test_call_tool_crazy_value (line 393) | async def test_call_tool_crazy_value( method test_list_resources (line 414) | async def test_list_resources( method test_read_resource (line 430) | async def test_read_resource( method test_list_prompts (line 446) | async def test_list_prompts( method test_get_prompts (line 463) | async def test_get_prompts( method test_statistics (line 487) | async def test_statistics( class TestCachableToolResult (line 531) | class TestCachableToolResult: method test_wrap_and_unwrap (line 532) | def test_wrap_and_unwrap(self): class TestCachingWithImportedServerPrefixes (line 546) | class TestCachingWithImportedServerPrefixes: method parent_with_imported_child (line 554) | async def parent_with_imported_child(self, tracking_calculator: Tracki... method test_tool_prefixes_preserved_after_cache_hit (line 567) | async def test_tool_prefixes_preserved_after_cache_hit( method test_resource_prefixes_preserved_after_cache_hit (line 585) | async def test_resource_prefixes_preserved_after_cache_hit( method test_prompt_prefixes_preserved_after_cache_hit (line 604) | async def test_prompt_prefixes_preserved_after_cache_hit( method test_prefixed_tool_callable_after_cache_hit (line 622) | async def test_prefixed_tool_callable_after_cache_hit( class TestCacheKeyGeneration (line 639) | class TestCacheKeyGeneration: method test_call_tool_key_is_hashed_and_does_not_include_raw_input (line 640) | def test_call_tool_key_is_hashed_and_does_not_include_raw_input(self): method test_read_resource_key_is_hashed_and_does_not_include_raw_uri (line 652) | def test_read_resource_key_is_hashed_and_does_not_include_raw_uri(self): method test_get_prompt_key_is_hashed_and_stable (line 663) | def test_get_prompt_key_is_hashed_and_stable(self): FILE: tests/server/middleware/test_dereference.py class Color (line 10) | class Color(Enum): class PaintRequest (line 16) | class PaintRequest(pydantic.BaseModel): class TestDereferenceRefsMiddleware (line 21) | class TestDereferenceRefsMiddleware: method test_dereference_schemas_true_inlines_refs (line 24) | async def test_dereference_schemas_true_inlines_refs(self): method test_dereference_schemas_false_preserves_refs (line 41) | async def test_dereference_schemas_false_preserves_refs(self): method test_default_is_true (line 56) | async def test_default_is_true(self): method test_does_not_mutate_original_tool (line 70) | async def test_does_not_mutate_original_tool(self): method test_output_schema_dereferenced (line 90) | async def test_output_schema_dereferenced(self): method test_resource_templates_dereferenced (line 107) | async def test_resource_templates_dereferenced(self): method test_no_ref_schemas_unchanged (line 122) | async def test_no_ref_schemas_unchanged(self): FILE: tests/server/middleware/test_error_handling.py function mock_context (line 18) | def mock_context(): function mock_call_next (line 26) | def mock_call_next(): class TestErrorHandlingMiddleware (line 31) | class TestErrorHandlingMiddleware: method test_init_default (line 34) | def test_init_default(self): method test_init_custom (line 43) | def test_init_custom(self): method test_log_error_basic (line 59) | def test_log_error_basic(self, mock_context, caplog): method test_log_error_with_traceback (line 71) | def test_log_error_with_traceback(self, mock_context, caplog): method test_log_error_with_callback (line 83) | def test_log_error_with_callback(self, mock_context): method test_log_error_callback_exception (line 93) | def test_log_error_callback_exception(self, mock_context, caplog): method test_transform_error_mcp_error (line 104) | def test_transform_error_mcp_error(self, mock_context): method test_transform_error_disabled (line 115) | def test_transform_error_disabled(self, mock_context): method test_transform_error_value_error (line 124) | def test_transform_error_value_error(self, mock_context): method test_transform_error_not_found_for_resource_method (line 135) | def test_transform_error_not_found_for_resource_method(self): method test_transform_error_not_found_for_non_resource_method (line 151) | def test_transform_error_not_found_for_non_resource_method(self, mock_... method test_transform_error_permission_error (line 165) | def test_transform_error_permission_error(self, mock_context): method test_transform_error_timeout_error (line 176) | def test_transform_error_timeout_error(self, mock_context): method test_transform_error_generic (line 187) | def test_transform_error_generic(self, mock_context): method test_on_message_success (line 198) | async def test_on_message_success(self, mock_context, mock_call_next): method test_on_message_error_transform (line 207) | async def test_on_message_error_transform(self, mock_context, caplog): method test_on_message_error_transform_tool_error (line 221) | async def test_on_message_error_transform_tool_error(self, mock_contex... method test_get_error_stats (line 237) | def test_get_error_stats(self, mock_context): class TestRetryMiddleware (line 253) | class TestRetryMiddleware: method test_init_default (line 256) | def test_init_default(self): method test_init_custom (line 266) | def test_init_custom(self): method test_should_retry_true (line 284) | def test_should_retry_true(self): method test_should_retry_false (line 291) | def test_should_retry_false(self): method test_calculate_delay (line 298) | def test_calculate_delay(self): method test_on_request_success_first_try (line 310) | async def test_on_request_success_first_try(self, mock_context, mock_c... method test_on_request_success_after_retries (line 319) | async def test_on_request_success_after_retries(self, mock_context, ca... method test_on_request_max_retries_exceeded (line 339) | async def test_on_request_max_retries_exceeded(self, mock_context, cap... method test_on_request_non_retryable_error (line 353) | async def test_on_request_non_retryable_error(self, mock_context): function error_handling_server (line 365) | def error_handling_server(): class TestErrorHandlingMiddlewareIntegration (line 413) | class TestErrorHandlingMiddlewareIntegration: method test_error_handling_middleware_logs_real_errors (line 416) | async def test_error_handling_middleware_logs_real_errors( method test_error_handling_middleware_tracks_error_statistics (line 441) | async def test_error_handling_middleware_tracks_error_statistics( method test_error_handling_middleware_with_success_and_failure (line 474) | async def test_error_handling_middleware_with_success_and_failure( method test_error_handling_middleware_custom_callback (line 500) | async def test_error_handling_middleware_custom_callback( method test_error_handling_middleware_transform_errors (line 535) | async def test_error_handling_middleware_transform_errors( class TestRetryMiddlewareIntegration (line 554) | class TestRetryMiddlewareIntegration: method test_retry_middleware_with_transient_failures (line 557) | async def test_retry_middleware_with_transient_failures( method test_retry_middleware_with_permanent_failures (line 589) | async def test_retry_middleware_with_permanent_failures( method test_combined_error_handling_and_retry_middleware (line 609) | async def test_combined_error_handling_and_retry_middleware( FILE: tests/server/middleware/test_initialization_middleware.py class InitializationMiddleware (line 16) | class InitializationMiddleware(Middleware): method __init__ (line 24) | def __init__(self): method on_initialize (line 30) | async def on_initialize( class ClientDetectionMiddleware (line 55) | class ClientDetectionMiddleware(Middleware): method __init__ (line 62) | def __init__(self): method on_initialize (line 68) | async def on_initialize( method on_list_tools (line 82) | async def on_list_tools( function test_simple_initialization_hook (line 105) | async def test_simple_initialization_hook(): function test_middleware_receives_initialization (line 131) | async def test_middleware_receives_initialization(): function test_client_detection_middleware (line 152) | async def test_client_detection_middleware(): function test_multiple_middleware_initialization (line 179) | async def test_multiple_middleware_initialization(): function test_session_state_persists_across_tool_calls (line 204) | async def test_session_state_persists_across_tool_calls(): function test_middleware_can_access_initialize_result (line 264) | async def test_middleware_can_access_initialize_result(): function test_middleware_mcp_error_during_initialization (line 301) | async def test_middleware_mcp_error_during_initialization(): function test_middleware_mcp_error_before_call_next (line 327) | async def test_middleware_mcp_error_before_call_next(): function test_middleware_mcp_error_after_call_next (line 351) | async def test_middleware_mcp_error_after_call_next(): function test_state_isolation_between_streamable_http_clients (line 385) | async def test_state_isolation_between_streamable_http_clients(): FILE: tests/server/middleware/test_logging.py function get_log_lines (line 29) | def get_log_lines( function new_mock_context (line 40) | def new_mock_context( function mock_duration_ms (line 57) | def mock_duration_ms() -> Generator[float, None]: function mock_context (line 68) | def mock_context(): function mock_call_next (line 83) | def mock_call_next() -> AsyncMock: class TestStructuredLoggingMiddleware (line 88) | class TestStructuredLoggingMiddleware: method test_init_default (line 91) | def test_init_default(self): method test_init_custom (line 102) | def test_init_custom(self): class TestHelperMethods (line 118) | class TestHelperMethods: method test_create_before_message (line 119) | def test_create_before_message(self, mock_context: MiddlewareContext... method test_create_message_with_payloads (line 133) | def test_create_message_with_payloads( method test_calculate_response_size (line 151) | def test_calculate_response_size(self, mock_context: MiddlewareConte... method test_calculate_response_size_with_token_estimation (line 165) | def test_calculate_response_size_with_token_estimation( method test_on_message_success (line 184) | async def test_on_message_success( method test_on_message_failure (line 205) | async def test_on_message_failure( class TestLoggingMiddleware (line 223) | class TestLoggingMiddleware: method test_init_default (line 226) | def test_init_default(self): method test_format_message (line 235) | def test_format_message(self, mock_context: MiddlewareContext[Any]): method test_create_before_message_long_payload (line 245) | def test_create_before_message_long_payload( method test_on_message_failure (line 259) | async def test_on_message_failure( method test_on_message_with_pydantic_types_in_payload (line 277) | async def test_on_message_with_pydantic_types_in_payload( method test_on_message_with_resource_template_in_payload (line 306) | async def test_on_message_with_resource_template_in_payload( method test_on_message_with_nonserializable_payload_falls_back_to_str (line 334) | async def test_on_message_with_nonserializable_payload_falls_back_to_str( method test_on_message_with_custom_serializer_applied (line 366) | async def test_on_message_with_custom_serializer_applied( function logging_server (line 402) | def logging_server(): class TestLoggingMiddlewareIntegration (line 438) | class TestLoggingMiddlewareIntegration: method logging_server (line 442) | def logging_server(self): method test_logging_middleware_logs_successful_operations (line 475) | async def test_logging_middleware_logs_successful_operations( method test_logging_middleware_logs_failures (line 503) | async def test_logging_middleware_logs_failures( method test_logging_middleware_with_payloads (line 521) | async def test_logging_middleware_with_payloads( method test_structured_logging_middleware_produces_json (line 541) | async def test_structured_logging_middleware_produces_json( method test_structured_logging_middleware_handles_errors (line 564) | async def test_structured_logging_middleware_handles_errors( method test_logging_middleware_with_different_operations (line 587) | async def test_logging_middleware_with_different_operations( method test_logging_middleware_custom_configuration (line 623) | async def test_logging_middleware_custom_configuration( FILE: tests/server/middleware/test_middleware.py class Recording (line 15) | class Recording: class RecordingMiddleware (line 22) | class RecordingMiddleware(Middleware): method __init__ (line 25) | def __init__(self, name: str | None = None): method __getattribute__ (line 30) | def __getattribute__(self, name: str) -> Callable: method get_calls (line 47) | def get_calls( method assert_called (line 73) | def assert_called( method assert_not_called (line 103) | def assert_not_called(self, hook: str | None = None, method: str | Non... method reset (line 109) | def reset(self): function recording_middleware (line 115) | def recording_middleware(): function mcp_server (line 122) | def mcp_server(recording_middleware): class TestMiddlewareHooks (line 168) | class TestMiddlewareHooks: method test_call_tool (line 169) | async def test_call_tool( method test_read_resource (line 181) | async def test_read_resource( method test_read_resource_template (line 193) | async def test_read_resource_template( method test_get_prompt (line 205) | async def test_get_prompt( method test_list_tools (line 217) | async def test_list_tools( method test_list_resources (line 235) | async def test_list_resources( method test_list_resource_templates (line 253) | async def test_list_resource_templates( method test_list_prompts (line 277) | async def test_list_prompts( method test_initialize (line 295) | async def test_initialize( method test_list_tools_filtering_middleware (line 306) | async def test_list_tools_filtering_middleware(self): method test_list_resources_filtering_middleware (line 334) | async def test_list_resources_filtering_middleware(self): method test_list_resource_templates_filtering_middleware (line 364) | async def test_list_resource_templates_filtering_middleware(self): method test_list_prompts_filtering_middleware (line 396) | async def test_list_prompts_filtering_middleware(self): method test_call_tool_middleware (line 426) | async def test_call_tool_middleware(self): class TestApplyMiddlewareParameter (line 466) | class TestApplyMiddlewareParameter: method test_call_tool_with_run_middleware_true (line 469) | async def test_call_tool_with_run_middleware_true(self): method test_call_tool_with_run_middleware_false (line 485) | async def test_call_tool_with_run_middleware_false(self): method test_read_resource_with_run_middleware_true (line 502) | async def test_read_resource_with_run_middleware_true(self): method test_read_resource_with_run_middleware_false (line 519) | async def test_read_resource_with_run_middleware_false(self): method test_read_resource_template_with_run_middleware_false (line 537) | async def test_read_resource_template_with_run_middleware_false(self): method test_render_prompt_with_run_middleware_true (line 554) | async def test_render_prompt_with_run_middleware_true(self): method test_render_prompt_with_run_middleware_false (line 573) | async def test_render_prompt_with_run_middleware_false(self): method test_middleware_modification_skipped_when_run_middleware_false (line 595) | async def test_middleware_modification_skipped_when_run_middleware_fal... FILE: tests/server/middleware/test_middleware_nested.py class Recording (line 16) | class Recording: class RecordingMiddleware (line 23) | class RecordingMiddleware(Middleware): method __init__ (line 26) | def __init__(self, name: str | None = None): method __getattribute__ (line 31) | def __getattribute__(self, name: str) -> Callable: method get_calls (line 48) | def get_calls( method assert_called (line 74) | def assert_called( method assert_not_called (line 104) | def assert_not_called(self, hook: str | None = None, method: str | Non... method reset (line 110) | def reset(self): function recording_middleware (line 116) | def recording_middleware(): function mcp_server (line 123) | def mcp_server(recording_middleware): class TestNestedMiddlewareHooks (line 169) | class TestNestedMiddlewareHooks: method nested_middleware (line 172) | def nested_middleware(): method nested_mcp_server (line 176) | def nested_mcp_server(self, nested_middleware: RecordingMiddleware): method test_call_tool_on_parent_server (line 211) | async def test_call_tool_on_parent_server( method test_call_tool_on_nested_server (line 231) | async def test_call_tool_on_nested_server( method test_read_resource_on_parent_server (line 255) | async def test_read_resource_on_parent_server( method test_read_resource_on_nested_server (line 275) | async def test_read_resource_on_nested_server( method test_read_resource_template_on_parent_server (line 299) | async def test_read_resource_template_on_parent_server( method test_read_resource_template_on_nested_server (line 319) | async def test_read_resource_template_on_nested_server( method test_get_prompt_on_parent_server (line 343) | async def test_get_prompt_on_parent_server( method test_get_prompt_on_nested_server (line 363) | async def test_get_prompt_on_nested_server( method test_list_tools_on_nested_server (line 387) | async def test_list_tools_on_nested_server( method test_list_resources_on_nested_server (line 411) | async def test_list_resources_on_nested_server( method test_list_resource_templates_on_nested_server (line 435) | async def test_list_resource_templates_on_nested_server( class TestProxyServer (line 468) | class TestProxyServer: method test_call_tool (line 469) | async def test_call_tool( method test_proxied_tags_are_visible_to_middleware (line 486) | async def test_proxied_tags_are_visible_to_middleware( class TestToolCallDenial (line 511) | class TestToolCallDenial: method test_deny_tool_call_with_tool_error (line 514) | async def test_deny_tool_call_with_tool_error(self): method test_middleware_can_selectively_deny_tools (line 555) | async def test_middleware_can_selectively_deny_tools(self): class TestMiddlewareRequestState (line 617) | class TestMiddlewareRequestState: method test_non_serializable_state_from_middleware_visible_in_tool (line 623) | async def test_non_serializable_state_from_middleware_visible_in_tool(... method test_non_serializable_state_from_middleware_visible_in_resource (line 649) | async def test_non_serializable_state_from_middleware_visible_in_resou... FILE: tests/server/middleware/test_ping.py class TestPingMiddlewareInit (line 13) | class TestPingMiddlewareInit: method test_init_default (line 16) | def test_init_default(self): method test_init_custom (line 22) | def test_init_custom(self): method test_init_invalid_interval_zero (line 27) | def test_init_invalid_interval_zero(self): method test_init_invalid_interval_negative (line 32) | def test_init_invalid_interval_negative(self): class TestPingMiddlewareOnMessage (line 38) | class TestPingMiddlewareOnMessage: method test_starts_ping_task_on_first_message (line 41) | async def test_starts_ping_task_on_first_message(self): method test_does_not_start_duplicate_task (line 60) | async def test_does_not_start_duplicate_task(self): method test_starts_separate_task_per_session (line 83) | async def test_starts_separate_task_per_session(self): method test_skips_task_when_no_task_group (line 110) | async def test_skips_task_when_no_task_group(self): method test_skips_when_fastmcp_context_is_none (line 128) | async def test_skips_when_fastmcp_context_is_none(self): method test_skips_when_request_context_is_none (line 142) | async def test_skips_when_request_context_is_none(self): class TestPingLoop (line 158) | class TestPingLoop: method test_ping_loop_sends_pings_at_interval (line 161) | async def test_ping_loop_sends_pings_at_interval(self): method test_ping_loop_cleans_up_on_cancellation (line 178) | async def test_ping_loop_cleans_up_on_cancellation(self): class TestPingMiddlewareIntegration (line 196) | class TestPingMiddlewareIntegration: method test_ping_middleware_registers_session (line 199) | async def test_ping_middleware_registers_session(self): method test_ping_task_cancelled_on_disconnect (line 222) | async def test_ping_task_cancelled_on_disconnect(self): FILE: tests/server/middleware/test_rate_limiting.py function mock_context (line 22) | def mock_context(): function mock_call_next (line 30) | def mock_call_next(): class TestTokenBucketRateLimiter (line 35) | class TestTokenBucketRateLimiter: method test_init (line 38) | def test_init(self): method test_consume_success (line 45) | async def test_consume_success(self): method test_consume_failure (line 53) | async def test_consume_failure(self): method test_refill (line 63) | async def test_refill(self): class TestSlidingWindowRateLimiter (line 78) | class TestSlidingWindowRateLimiter: method test_init (line 81) | def test_init(self): method test_is_allowed_success (line 88) | async def test_is_allowed_success(self): method test_is_allowed_failure (line 97) | async def test_is_allowed_failure(self): method test_sliding_window (line 108) | async def test_sliding_window(self): class TestRateLimitingMiddleware (line 124) | class TestRateLimitingMiddleware: method test_init_default (line 127) | def test_init_default(self): method test_init_custom (line 135) | def test_init_custom(self): method test_get_client_identifier_default (line 152) | def test_get_client_identifier_default(self, mock_context): method test_get_client_identifier_custom (line 157) | def test_get_client_identifier_custom(self, mock_context): method test_on_request_success (line 166) | async def test_on_request_success(self, mock_context, mock_call_next): method test_on_request_rate_limited (line 175) | async def test_on_request_rate_limited(self, mock_context, mock_call_n... method test_global_rate_limiting (line 188) | async def test_global_rate_limiting(self, mock_context, mock_call_next): class TestSlidingWindowRateLimitingMiddleware (line 202) | class TestSlidingWindowRateLimitingMiddleware: method test_init_default (line 205) | def test_init_default(self): method test_init_custom (line 212) | def test_init_custom(self): method test_on_request_success (line 225) | async def test_on_request_success(self, mock_context, mock_call_next): method test_on_request_rate_limited (line 234) | async def test_on_request_rate_limited(self, mock_context, mock_call_n... class TestRateLimitError (line 246) | class TestRateLimitError: method test_init_default (line 249) | def test_init_default(self): method test_init_custom (line 255) | def test_init_custom(self): function rate_limit_server (line 263) | def rate_limit_server(): class TestRateLimitingMiddlewareIntegration (line 289) | class TestRateLimitingMiddlewareIntegration: method test_rate_limiting_allows_normal_usage (line 292) | async def test_rate_limiting_allows_normal_usage(self, rate_limit_serv... method test_rate_limiting_blocks_rapid_requests (line 307) | async def test_rate_limiting_blocks_rapid_requests(self, rate_limit_se... method test_rate_limiting_with_concurrent_requests (line 331) | async def test_rate_limiting_with_concurrent_requests(self, rate_limit... method test_sliding_window_rate_limiting (line 362) | async def test_sliding_window_rate_limiting(self, rate_limit_server): method test_rate_limiting_with_different_operations (line 381) | async def test_rate_limiting_with_different_operations(self, rate_limi... method test_custom_client_identification (line 396) | async def test_custom_client_identification(self, rate_limit_server): method test_global_rate_limiting (line 422) | async def test_global_rate_limiting(self, rate_limit_server): method test_rate_limiting_recovery_over_time (line 441) | async def test_rate_limiting_recovery_over_time(self, rate_limit_server): FILE: tests/server/middleware/test_response_limiting.py class TestResponseLimitingMiddleware (line 11) | class TestResponseLimitingMiddleware: method mcp_server (line 15) | def mcp_server(self) -> FastMCP: method test_response_under_limit_passes_unchanged (line 19) | async def test_response_under_limit_passes_unchanged(self, mcp_server:... method test_response_over_limit_is_truncated (line 32) | async def test_response_over_limit_is_truncated(self, mcp_server: Fast... method test_tool_filtering (line 47) | async def test_tool_filtering(self, mcp_server: FastMCP): method test_empty_tools_list_limits_nothing (line 70) | async def test_empty_tools_list_limits_nothing(self, mcp_server: FastM... method test_custom_truncation_suffix (line 83) | async def test_custom_truncation_suffix(self, mcp_server: FastMCP): method test_multiple_text_blocks_combined (line 97) | async def test_multiple_text_blocks_combined(self, mcp_server: FastMCP): method test_binary_only_content_serialized (line 116) | async def test_binary_only_content_serialized(self, mcp_server: FastMCP): method test_default_max_size_is_1mb (line 134) | async def test_default_max_size_is_1mb(self): method test_invalid_max_size_raises (line 139) | def test_invalid_max_size_raises(self): method test_utf8_truncation_preserves_characters (line 146) | def test_utf8_truncation_preserves_characters(self): FILE: tests/server/middleware/test_timing.py function mock_context (line 17) | def mock_context(): function mock_call_next (line 25) | def mock_call_next(): class TestTimingMiddleware (line 30) | class TestTimingMiddleware: method test_init_default (line 33) | def test_init_default(self): method test_init_custom (line 39) | def test_init_custom(self): method test_on_request_success (line 46) | async def test_on_request_success(self, mock_context, mock_call_next, ... method test_on_request_failure (line 57) | async def test_on_request_failure(self, mock_context, caplog): class TestDetailedTimingMiddleware (line 69) | class TestDetailedTimingMiddleware: method test_init_default (line 72) | def test_init_default(self): method test_on_call_tool (line 78) | async def test_on_call_tool(self, caplog): method test_on_read_resource (line 90) | async def test_on_read_resource(self, caplog): method test_on_get_prompt (line 102) | async def test_on_get_prompt(self, caplog): method test_on_list_tools (line 114) | async def test_on_list_tools(self, caplog): method test_operation_failure (line 125) | async def test_operation_failure(self, caplog): function timing_server (line 140) | def timing_server(): class TestTimingMiddlewareIntegration (line 181) | class TestTimingMiddlewareIntegration: method test_timing_middleware_measures_tool_execution (line 184) | async def test_timing_middleware_measures_tool_execution( method test_timing_middleware_handles_failures (line 216) | async def test_timing_middleware_handles_failures(self, timing_server,... method test_detailed_timing_middleware_per_operation (line 229) | async def test_detailed_timing_middleware_per_operation( method test_timing_middleware_concurrent_operations (line 260) | async def test_timing_middleware_concurrent_operations(self, timing_se... method test_timing_middleware_custom_logger (line 282) | async def test_timing_middleware_custom_logger(self, timing_server, ca... FILE: tests/server/middleware/test_tool_injection.py function multiply_fn (line 20) | def multiply_fn(a: int, b: int) -> int: function divide_fn (line 25) | def divide_fn(a: int, b: int) -> float: class TestToolInjectionMiddleware (line 36) | class TestToolInjectionMiddleware: method base_server (line 40) | def base_server(self): method test_list_tools_includes_injected_tools (line 56) | async def test_list_tools_includes_injected_tools(self, base_server: F... method test_call_injected_tool (line 79) | async def test_call_injected_tool(self, base_server: FastMCP): method test_call_base_tool_still_works (line 97) | async def test_call_base_tool_still_works(self, base_server: FastMCP): method test_injected_tool_error_handling (line 115) | async def test_injected_tool_error_handling(self, base_server: FastMCP): method test_multiple_tool_injections (line 128) | async def test_multiple_tool_injections(self, base_server: FastMCP): method test_injected_tool_with_complex_return_type (line 172) | async def test_injected_tool_with_complex_return_type(self, base_serve... method test_injected_tool_metadata_preserved (line 203) | async def test_injected_tool_metadata_preserved(self, base_server: Fas... method test_injected_tool_does_not_conflict_with_base_tool (line 222) | async def test_injected_tool_does_not_conflict_with_base_tool( method test_injected_tool_bypass_filtering (line 245) | async def test_injected_tool_bypass_filtering(self, base_server: FastM... method test_empty_tool_injection (line 258) | async def test_empty_tool_injection(self, base_server: FastMCP): FILE: tests/server/mount/test_advanced.py class TestDynamicChanges (line 13) | class TestDynamicChanges: method test_adding_tool_after_mounting (line 16) | async def test_adding_tool_after_mounting(self): method test_removing_tool_after_mounting (line 41) | async def test_removing_tool_after_mounting(self): class TestCustomRouteForwarding (line 65) | class TestCustomRouteForwarding: method test_get_additional_http_routes_empty (line 68) | async def test_get_additional_http_routes_empty(self): method test_get_additional_http_routes_with_custom_route (line 74) | async def test_get_additional_http_routes_with_custom_route(self): method test_mounted_servers_tracking (line 89) | async def test_mounted_servers_tracking(self): method test_multiple_routes_same_server (line 131) | async def test_multiple_routes_same_server(self): method test_mounted_server_custom_routes_forwarded (line 153) | async def test_mounted_server_custom_routes_forwarded(self): method test_mounted_server_custom_routes_with_namespace (line 176) | async def test_mounted_server_custom_routes_with_namespace(self): method test_deeply_nested_custom_routes_forwarded (line 194) | async def test_deeply_nested_custom_routes_forwarded(self): method test_mounted_custom_routes_http_app_integration (line 221) | async def test_mounted_custom_routes_http_app_integration(self): class TestDeeplyNestedMount (line 246) | class TestDeeplyNestedMount: method test_three_level_nested_tool_invocation (line 254) | async def test_three_level_nested_tool_invocation(self): method test_three_level_nested_resource_invocation (line 279) | async def test_three_level_nested_resource_invocation(self): method test_three_level_nested_resource_template_invocation (line 304) | async def test_three_level_nested_resource_template_invocation(self): method test_three_level_nested_prompt_invocation (line 329) | async def test_three_level_nested_prompt_invocation(self): method test_four_level_nested_tool_invocation (line 356) | async def test_four_level_nested_tool_invocation(self): class TestToolNameOverrides (line 381) | class TestToolNameOverrides: method test_tool_names_override_via_transforms (line 384) | async def test_tool_names_override_via_transforms(self): method test_tool_names_override_applied_in_list_tools (line 412) | async def test_tool_names_override_applied_in_list_tools(self): method test_tool_call_with_overridden_name (line 432) | async def test_tool_call_with_overridden_name(self): method test_duplicate_tool_rename_targets_raises_error (line 451) | def test_duplicate_tool_rename_targets_raises_error(self): class TestMountedServerDocketBehavior (line 463) | class TestMountedServerDocketBehavior: method test_mounted_server_does_not_have_docket (line 472) | async def test_mounted_server_does_not_have_docket(self): class TestComponentServicePrefixLess (line 508) | class TestComponentServicePrefixLess: method test_enable_tool_prefixless_mount (line 511) | async def test_enable_tool_prefixless_mount(self): method test_enable_resource_prefixless_mount (line 538) | async def test_enable_resource_prefixless_mount(self): method test_enable_prompt_prefixless_mount (line 561) | async def test_enable_prompt_prefixless_mount(self): FILE: tests/server/mount/test_filtering.py class TestParentTagFiltering (line 9) | class TestParentTagFiltering: method test_parent_include_tags_filters_mounted_tools (line 12) | async def test_parent_include_tags_filters_mounted_tools(self): method test_parent_exclude_tags_filters_mounted_tools (line 40) | async def test_parent_exclude_tags_filters_mounted_tools(self): method test_parent_filters_apply_to_mounted_resources (line 61) | async def test_parent_filters_apply_to_mounted_resources(self): method test_parent_filters_apply_to_mounted_prompts (line 82) | async def test_parent_filters_apply_to_mounted_prompts(self): FILE: tests/server/mount/test_mount.py class TestBasicMount (line 16) | class TestBasicMount: method test_mount_simple_server (line 19) | async def test_mount_simple_server(self): method test_mount_with_custom_separator (line 47) | async def test_mount_with_custom_separator(self): method test_mount_with_no_prefix (line 68) | async def test_mount_with_no_prefix(self, prefix): method test_mount_with_no_prefix_provided (line 83) | async def test_mount_with_no_prefix_provided(self): method test_mount_tools_no_prefix (line 103) | async def test_mount_tools_no_prefix(self): method test_mount_resources_no_prefix (line 123) | async def test_mount_resources_no_prefix(self): method test_mount_resource_templates_no_prefix (line 143) | async def test_mount_resource_templates_no_prefix(self): method test_mount_prompts_no_prefix (line 163) | async def test_mount_prompts_no_prefix(self): class TestMultipleServerMount (line 184) | class TestMultipleServerMount: method test_mount_multiple_servers (line 187) | async def test_mount_multiple_servers(self): method test_mount_same_prefix (line 216) | async def test_mount_same_prefix(self): method test_mount_with_unreachable_proxy_servers (line 246) | async def test_mount_with_unreachable_proxy_servers(self, caplog): class TestPrefixConflictResolution (line 318) | class TestPrefixConflictResolution: method test_first_server_wins_tools_no_prefix (line 324) | async def test_first_server_wins_tools_no_prefix(self): method test_first_server_wins_tools_same_prefix (line 351) | async def test_first_server_wins_tools_same_prefix(self): method test_first_server_wins_resources_no_prefix (line 378) | async def test_first_server_wins_resources_no_prefix(self): method test_first_server_wins_resources_same_prefix (line 405) | async def test_first_server_wins_resources_same_prefix(self): method test_first_server_wins_resource_templates_no_prefix (line 432) | async def test_first_server_wins_resource_templates_no_prefix(self): method test_first_server_wins_resource_templates_same_prefix (line 459) | async def test_first_server_wins_resource_templates_same_prefix(self): method test_first_server_wins_prompts_no_prefix (line 486) | async def test_first_server_wins_prompts_no_prefix(self): method test_first_server_wins_prompts_same_prefix (line 515) | async def test_first_server_wins_prompts_same_prefix(self): FILE: tests/server/mount/test_prompts.py class TestPrompts (line 6) | class TestPrompts: method test_mount_with_prompts (line 9) | async def test_mount_with_prompts(self): method test_adding_prompt_after_mounting (line 30) | async def test_adding_prompt_after_mounting(self): FILE: tests/server/mount/test_proxy.py class TestProxyServer (line 15) | class TestProxyServer: method test_mount_proxy_server (line 18) | async def test_mount_proxy_server(self): method test_dynamically_adding_to_proxied_server (line 42) | async def test_dynamically_adding_to_proxied_server(self): method test_proxy_server_with_resources (line 67) | async def test_proxy_server_with_resources(self): method test_proxy_server_with_prompts (line 89) | async def test_proxy_server_with_prompts(self): class TestAsProxyKwarg (line 111) | class TestAsProxyKwarg: method test_as_proxy_defaults_false (line 114) | async def test_as_proxy_defaults_false(self): method test_as_proxy_false (line 136) | async def test_as_proxy_false(self): method test_as_proxy_true (line 159) | async def test_as_proxy_true(self): method test_lifespan_server_mounted_directly (line 183) | async def test_lifespan_server_mounted_directly(self): method test_as_proxy_ignored_for_proxy_mounts_default (line 217) | async def test_as_proxy_ignored_for_proxy_mounts_default(self): method test_as_proxy_ignored_for_proxy_mounts_false (line 234) | async def test_as_proxy_ignored_for_proxy_mounts_false(self): method test_as_proxy_ignored_for_proxy_mounts_true (line 251) | async def test_as_proxy_ignored_for_proxy_mounts_true(self): method test_as_proxy_mounts_still_have_live_link (line 268) | async def test_as_proxy_mounts_still_have_live_link(self): method test_sub_lifespan_is_executed (line 282) | async def test_sub_lifespan_is_executed(self): FILE: tests/server/mount/test_resources.py class TestResourcesAndTemplates (line 8) | class TestResourcesAndTemplates: method test_mount_with_resources (line 11) | async def test_mount_with_resources(self): method test_mount_with_resource_templates (line 34) | async def test_mount_with_resource_templates(self): method test_adding_resource_after_mounting (line 57) | async def test_adding_resource_after_mounting(self): class TestResourceUriPrefixing (line 81) | class TestResourceUriPrefixing: method test_resource_uri_prefixing (line 84) | async def test_resource_uri_prefixing(self): method test_resource_template_uri_prefixing (line 110) | async def test_resource_template_uri_prefixing(self): class TestMountedResourceTemplateQueryParams (line 139) | class TestMountedResourceTemplateQueryParams: method test_mounted_template_with_query_param (line 142) | async def test_mounted_template_with_query_param(self): method test_mounted_template_with_query_param_default (line 156) | async def test_mounted_template_with_query_param_default(self): method test_mounted_template_with_multiple_query_params (line 170) | async def test_mounted_template_with_multiple_query_params(self): method test_mounted_template_with_partial_query_params (line 186) | async def test_mounted_template_with_partial_query_params(self): FILE: tests/server/providers/local_provider_tools/test_context.py function _normalize_anyof_order (line 13) | def _normalize_anyof_order(schema): class PersonTypedDict (line 25) | class PersonTypedDict(TypedDict): class PersonModel (line 30) | class PersonModel(BaseModel): class PersonDataclass (line 36) | class PersonDataclass: class TestToolContextInjection (line 41) | class TestToolContextInjection: method test_context_detection (line 44) | async def test_context_detection(self): method test_context_injection_basic (line 58) | async def test_context_injection_basic(self): method test_async_context (line 70) | async def test_async_context(self): method test_optional_context (line 82) | async def test_optional_context(self): method test_context_resource_access (line 93) | async def test_context_resource_access(self): method test_tool_decorator_with_tags (line 113) | async def test_tool_decorator_with_tags(self): method test_callable_object_with_context (line 125) | async def test_callable_object_with_context(self): method test_decorated_tool_with_functools_wraps (line 139) | async def test_decorated_tool_with_functools_wraps(self): FILE: tests/server/providers/local_provider_tools/test_decorator.py function _normalize_anyof_order (line 15) | def _normalize_anyof_order(schema): class PersonTypedDict (line 27) | class PersonTypedDict(TypedDict): class PersonModel (line 32) | class PersonModel(BaseModel): class PersonDataclass (line 38) | class PersonDataclass: class TestToolDecorator (line 43) | class TestToolDecorator: method test_no_tools_before_decorator (line 44) | async def test_no_tools_before_decorator(self): method test_tool_decorator (line 50) | async def test_tool_decorator(self): method test_tool_decorator_without_parentheses (line 60) | async def test_tool_decorator_without_parentheses(self): method test_tool_decorator_with_name (line 74) | async def test_tool_decorator_with_name(self): method test_tool_decorator_with_description (line 84) | async def test_tool_decorator_with_description(self): method test_tool_decorator_instance_method (line 96) | async def test_tool_decorator_instance_method(self): method test_tool_decorator_classmethod (line 111) | async def test_tool_decorator_classmethod(self): method test_tool_decorator_staticmethod (line 125) | async def test_tool_decorator_staticmethod(self): method test_tool_decorator_async_function (line 137) | async def test_tool_decorator_async_function(self): method test_tool_decorator_classmethod_error (line 147) | async def test_tool_decorator_classmethod_error(self): method test_tool_decorator_classmethod_async_function (line 158) | async def test_tool_decorator_classmethod_async_function(self): method test_tool_decorator_staticmethod_async_function (line 172) | async def test_tool_decorator_staticmethod_async_function(self): method test_tool_decorator_staticmethod_order (line 184) | async def test_tool_decorator_staticmethod_order(self): method test_tool_decorator_with_tags (line 197) | async def test_tool_decorator_with_tags(self): method test_add_tool_with_custom_name (line 209) | async def test_add_tool_with_custom_name(self): method test_tool_with_annotated_arguments (line 227) | async def test_tool_with_annotated_arguments(self): method test_tool_with_field_defaults (line 243) | async def test_tool_with_field_defaults(self): method test_tool_direct_function_call (line 259) | async def test_tool_direct_function_call(self): method test_tool_decorator_with_string_name (line 287) | async def test_tool_decorator_with_string_name(self): method test_tool_decorator_conflicting_names_error (line 303) | async def test_tool_decorator_conflicting_names_error(self): method test_tool_decorator_with_output_schema (line 316) | async def test_tool_decorator_with_output_schema(self): method test_tool_decorator_with_meta (line 327) | async def test_tool_decorator_with_meta(self): FILE: tests/server/providers/local_provider_tools/test_enabled.py function _normalize_anyof_order (line 13) | def _normalize_anyof_order(schema): class PersonTypedDict (line 25) | class PersonTypedDict(TypedDict): class PersonModel (line 30) | class PersonModel(BaseModel): class PersonDataclass (line 36) | class PersonDataclass: class TestToolEnabled (line 41) | class TestToolEnabled: method test_toggle_enabled (line 42) | async def test_toggle_enabled(self): method test_tool_disabled_via_server (line 65) | async def test_tool_disabled_via_server(self): method test_tool_toggle_enabled (line 79) | async def test_tool_toggle_enabled(self): method test_tool_toggle_disabled (line 91) | async def test_tool_toggle_disabled(self): method test_get_tool_and_disable (line 105) | async def test_get_tool_and_disable(self): method test_cant_call_disabled_tool (line 122) | async def test_cant_call_disabled_tool(self): FILE: tests/server/providers/local_provider_tools/test_local_provider_tools.py function _normalize_anyof_order (line 23) | def _normalize_anyof_order(schema): class PersonTypedDict (line 35) | class PersonTypedDict(TypedDict): class PersonModel (line 40) | class PersonModel(BaseModel): class PersonDataclass (line 46) | class PersonDataclass: class TestToolReturnTypes (line 51) | class TestToolReturnTypes: method test_string (line 52) | async def test_string(self): method test_bytes (line 62) | async def test_bytes(self, tmp_path: Path): method test_uuid (line 72) | async def test_uuid(self): method test_path (line 84) | async def test_path(self): method test_datetime (line 96) | async def test_datetime(self): method test_image (line 108) | async def test_image(self, tmp_path: Path): method test_audio (line 128) | async def test_audio(self, tmp_path: Path): method test_file (line 147) | async def test_file(self, tmp_path: Path): method test_tool_mixed_content (line 170) | async def test_tool_mixed_content(self, tool_server: FastMCP): method test_tool_mixed_list_with_image (line 191) | async def test_tool_mixed_list_with_image( method test_tool_mixed_list_with_audio (line 218) | async def test_tool_mixed_list_with_audio( method test_tool_mixed_list_with_file (line 245) | async def test_tool_mixed_list_with_file( FILE: tests/server/providers/local_provider_tools/test_output_schema.py function _normalize_anyof_order (line 19) | def _normalize_anyof_order(schema): class PersonTypedDict (line 31) | class PersonTypedDict(TypedDict): class PersonModel (line 36) | class PersonModel(BaseModel): class PersonDataclass (line 42) | class PersonDataclass: class TestToolOutputSchema (line 47) | class TestToolOutputSchema: method test_simple_output_schema (line 49) | async def test_simple_output_schema(self, annotation): method test_structured_output_schema (line 72) | async def test_structured_output_schema(self, annotation): method test_disabled_output_schema_no_structured_content (line 90) | async def test_disabled_output_schema_no_structured_content(self): method test_manual_structured_content (line 103) | async def test_manual_structured_content(self): method test_output_schema_none (line 129) | async def test_output_schema_none(self): method test_output_schema_explicit_object (line 147) | async def test_output_schema_explicit_object(self): method test_output_schema_wrapped_primitive (line 179) | async def test_output_schema_wrapped_primitive(self): method test_output_schema_complex_type (line 200) | async def test_output_schema_complex_type(self): method test_output_schema_dataclass (line 225) | async def test_output_schema_dataclass(self): method test_output_schema_mixed_content_types (line 249) | async def test_output_schema_mixed_content_types(self): method test_wrapped_result_includes_meta_flag (line 271) | async def test_wrapped_result_includes_meta_flag(self): method test_unwrapped_result_has_no_meta_flag (line 283) | async def test_unwrapped_result_has_no_meta_flag(self): method test_output_schema_serialization_edge_cases (line 295) | async def test_output_schema_serialization_edge_cases(self): method test_output_schema_wraps_non_object_ref_schema (line 311) | async def test_output_schema_wraps_non_object_ref_schema(self): class TestIsObjectSchemaRefResolution (line 338) | class TestIsObjectSchemaRefResolution: method test_simple_ref_to_object (line 342) | def test_simple_ref_to_object(self): method test_simple_ref_to_non_object (line 351) | def test_simple_ref_to_non_object(self): method test_nested_defs_path (line 358) | def test_nested_defs_path(self): method test_nested_defs_non_object (line 375) | def test_nested_defs_non_object(self): method test_json_pointer_tilde_escape (line 388) | def test_json_pointer_tilde_escape(self): method test_missing_nested_segment_returns_false (line 396) | def test_missing_nested_segment_returns_false(self): FILE: tests/server/providers/local_provider_tools/test_parameters.py function _normalize_anyof_order (line 22) | def _normalize_anyof_order(schema): class PersonTypedDict (line 34) | class PersonTypedDict(TypedDict): class PersonModel (line 39) | class PersonModel(BaseModel): class PersonDataclass (line 45) | class PersonDataclass: class TestToolParameters (line 50) | class TestToolParameters: method test_parameter_descriptions_with_field_annotations (line 51) | async def test_parameter_descriptions_with_field_annotations(self): method test_parameter_descriptions_with_field_defaults (line 74) | async def test_parameter_descriptions_with_field_defaults(self): method test_tool_with_bytes_input (line 97) | async def test_tool_with_bytes_input(self): method test_tool_with_invalid_input (line 111) | async def test_tool_with_invalid_input(self): method test_tool_int_coercion (line 126) | async def test_tool_int_coercion(self): method test_tool_bool_coercion (line 137) | async def test_tool_bool_coercion(self): method test_annotated_field_validation (line 151) | async def test_annotated_field_validation(self): method test_default_field_validation (line 166) | async def test_default_field_validation(self): method test_default_field_is_still_required_if_no_default_specified (line 181) | async def test_default_field_is_still_required_if_no_default_specified... method test_literal_type_validation_error (line 193) | async def test_literal_type_validation_error(self): method test_literal_type_validation_success (line 208) | async def test_literal_type_validation_success(self): method test_enum_type_validation_error (line 218) | async def test_enum_type_validation_error(self): method test_enum_type_validation_success (line 238) | async def test_enum_type_validation_success(self): method test_union_type_validation (line 253) | async def test_union_type_validation(self): method test_path_type (line 274) | async def test_path_type(self): method test_path_type_error (line 287) | async def test_path_type_error(self): method test_uuid_type (line 299) | async def test_uuid_type(self): method test_uuid_type_error (line 312) | async def test_uuid_type_error(self): method test_datetime_type (line 324) | async def test_datetime_type(self): method test_datetime_type_parse_string (line 336) | async def test_datetime_type_parse_string(self): method test_datetime_type_error (line 346) | async def test_datetime_type_error(self): method test_date_type (line 358) | async def test_date_type(self): method test_date_type_parse_string (line 370) | async def test_date_type_parse_string(self): method test_timedelta_type (line 380) | async def test_timedelta_type(self): method test_timedelta_type_parse_int (line 392) | async def test_timedelta_type_parse_int(self): method test_annotated_string_description (line 407) | async def test_annotated_string_description(self): FILE: tests/server/providers/local_provider_tools/test_tags.py function _normalize_anyof_order (line 13) | def _normalize_anyof_order(schema): class PersonTypedDict (line 25) | class PersonTypedDict(TypedDict): class PersonModel (line 30) | class PersonModel(BaseModel): class PersonDataclass (line 36) | class PersonDataclass: class TestToolTags (line 41) | class TestToolTags: method create_server (line 42) | def create_server(self, include_tags=None, exclude_tags=None): method test_include_tags_all_tools (line 60) | async def test_include_tags_all_tools(self): method test_include_tags_some_tools (line 65) | async def test_include_tags_some_tools(self): method test_exclude_tags_all_tools (line 70) | async def test_exclude_tags_all_tools(self): method test_exclude_tags_some_tools (line 75) | async def test_exclude_tags_some_tools(self): method test_exclude_precedence (line 80) | async def test_exclude_precedence(self): method test_call_included_tool (line 85) | async def test_call_included_tool(self): method test_call_excluded_tool (line 93) | async def test_call_excluded_tool(self): FILE: tests/server/providers/openapi/test_comprehensive.py function create_openapi_server (line 15) | def create_openapi_server( class TestOpenAPIComprehensive (line 27) | class TestOpenAPIComprehensive: method comprehensive_openapi_spec (line 31) | def comprehensive_openapi_spec(self): method openapi_31_spec (line 330) | def openapi_31_spec(self): method test_comprehensive_server_initialization (line 368) | async def test_comprehensive_server_initialization( method test_openapi_31_compatibility (line 403) | async def test_openapi_31_compatibility(self, openapi_31_spec): method test_parameter_collision_handling (line 419) | async def test_parameter_collision_handling(self, comprehensive_openap... method test_deep_object_parameters (line 450) | async def test_deep_object_parameters(self, comprehensive_openapi_spec): method test_request_building_and_execution (line 475) | async def test_request_building_and_execution(self, comprehensive_open... method test_request_uses_localhost_fallback_when_no_base_url (line 515) | async def test_request_uses_localhost_fallback_when_no_base_url( method test_complex_request_with_body_and_parameters (line 547) | async def test_complex_request_with_body_and_parameters( method test_query_parameters (line 597) | async def test_query_parameters(self, comprehensive_openapi_spec): method test_error_handling (line 635) | async def test_error_handling(self, comprehensive_openapi_spec): method test_schema_refs_resolution (line 671) | async def test_schema_refs_resolution(self, comprehensive_openapi_spec): method test_optional_vs_required_parameters (line 692) | async def test_optional_vs_required_parameters(self, comprehensive_ope... method test_server_performance_no_latency (line 719) | async def test_server_performance_no_latency(self, comprehensive_opena... method test_timeout_error_produces_useful_message (line 745) | async def test_timeout_error_produces_useful_message( class TestOpenAPIPostEdgeCases (line 770) | class TestOpenAPIPostEdgeCases: method post_spec_with_empty_content_schema (line 774) | def post_spec_with_empty_content_schema(self): method test_post_with_body_params (line 865) | async def test_post_with_body_params(self, post_spec_with_empty_conten... method test_post_with_path_params_and_body (line 895) | async def test_post_with_path_params_and_body( method test_unexpected_error_in_request_building_gives_useful_message (line 930) | async def test_unexpected_error_in_request_building_gives_useful_messa... FILE: tests/server/providers/openapi/test_deepobject_style.py function create_openapi_server (line 11) | def create_openapi_server( class TestDeepObjectStyle (line 23) | class TestDeepObjectStyle: method deepobject_spec (line 27) | def deepobject_spec(self): method test_deepobject_style_parsing_from_spec (line 190) | async def test_deepobject_style_parsing_from_spec(self, deepobject_spec): method test_deepobject_explode_true_handling (line 223) | async def test_deepobject_explode_true_handling(self, deepobject_spec): method test_deepobject_explode_false_handling (line 248) | async def test_deepobject_explode_false_handling(self, deepobject_spec): method test_nested_object_structure_in_request_body (line 276) | async def test_nested_object_structure_in_request_body(self, deepobjec... method test_deepobject_tool_functionality (line 320) | async def test_deepobject_tool_functionality(self, deepobject_spec): FILE: tests/server/providers/openapi/test_end_to_end_compatibility.py function create_openapi_server (line 11) | def create_openapi_server( class TestEndToEndFunctionality (line 23) | class TestEndToEndFunctionality: method simple_spec (line 27) | def simple_spec(self): method collision_spec (line 58) | def collision_spec(self): method test_tool_schema_generation (line 97) | async def test_tool_schema_generation(self, simple_spec): method test_collision_handling (line 128) | async def test_collision_handling(self, collision_spec): method test_tool_execution_parameter_mapping (line 165) | async def test_tool_execution_parameter_mapping(self, collision_spec): method test_optional_parameter_handling (line 195) | async def test_optional_parameter_handling(self, simple_spec): FILE: tests/server/providers/openapi/test_openapi_features.py function create_openapi_server (line 20) | def create_openapi_server( class TestParameterHandling (line 32) | class TestParameterHandling: method parameter_spec (line 36) | def parameter_spec(self): method test_query_parameters_in_tools (line 149) | async def test_query_parameters_in_tools(self, parameter_spec): method test_path_parameters_in_tools (line 197) | async def test_path_parameters_in_tools(self, parameter_spec): class TestRequestBodyHandling (line 227) | class TestRequestBodyHandling: method request_body_spec (line 231) | def request_body_spec(self): method test_request_body_properties_in_tool (line 302) | async def test_request_body_properties_in_tool(self, request_body_spec): class TestResponseSchemas (line 334) | class TestResponseSchemas: method response_schema_spec (line 338) | def response_schema_spec(self): method test_tool_has_output_schema (line 403) | async def test_tool_has_output_schema(self, response_schema_spec): class TestMimeTypeExtraction (line 426) | class TestMimeTypeExtraction: method test_json_response (line 429) | def test_json_response(self): method test_text_plain_response (line 442) | def test_text_plain_response(self): method test_text_html_response (line 453) | def test_text_html_response(self): method test_image_response (line 464) | def test_image_response(self): method test_no_responses_defaults_to_json (line 477) | def test_no_responses_defaults_to_json(self): method test_no_content_schema_defaults_to_json (line 482) | def test_no_content_schema_defaults_to_json(self): method test_prefers_json_when_multiple_types (line 491) | def test_prefers_json_when_multiple_types(self): method test_non_standard_2xx_code (line 507) | def test_non_standard_2xx_code(self): method test_ignores_error_responses (line 525) | def test_ignores_error_responses(self): method test_201_response (line 538) | def test_201_response(self): method test_media_type_without_schema (line 549) | def test_media_type_without_schema(self): class TestResourceTemplateMimeType (line 559) | class TestResourceTemplateMimeType: method text_plain_spec (line 563) | def text_plain_spec(self): method html_spec (line 596) | def html_spec(self): method test_resource_template_text_plain_mime_type (line 628) | async def test_resource_template_text_plain_mime_type(self, text_plain... method test_resource_template_html_mime_type (line 642) | async def test_resource_template_html_mime_type(self, html_spec): method test_resource_template_defaults_json_mime_type (line 656) | async def test_resource_template_defaults_json_mime_type(self): class TestResourceMimeType (line 708) | class TestResourceMimeType: method test_resource_text_plain_mime_type (line 711) | async def test_resource_text_plain_mime_type(self): method test_resource_mime_type_without_schema (line 746) | async def test_resource_mime_type_without_schema(self): class TestValidateOutput (line 780) | class TestValidateOutput: method spec_with_output_schema (line 784) | def spec_with_output_schema(self): method test_validate_output_true_preserves_extracted_schema (line 849) | async def test_validate_output_true_preserves_extracted_schema( method test_validate_output_false_uses_permissive_schema (line 865) | async def test_validate_output_false_uses_permissive_schema( method test_validate_output_false_preserves_wrap_result_flag (line 883) | async def test_validate_output_false_preserves_wrap_result_flag( method test_validate_output_false_allows_nonconforming_response (line 901) | async def test_validate_output_false_allows_nonconforming_response( method test_validate_output_false_wraps_non_dict_response (line 937) | async def test_validate_output_false_wraps_non_dict_response( method test_from_openapi_threads_validate_output (line 968) | async def test_from_openapi_threads_validate_output(self, spec_with_ou... class TestRedactHeaders (line 990) | class TestRedactHeaders: method test_known_sensitive_headers_are_redacted (line 993) | def test_known_sensitive_headers_are_redacted(self): method test_arbitrary_auth_headers_are_redacted (line 1012) | def test_arbitrary_auth_headers_are_redacted(self): method test_safe_only_headers (line 1026) | def test_safe_only_headers(self): FILE: tests/server/providers/openapi/test_openapi_performance.py class TestOpenAPIPerformance (line 16) | class TestOpenAPIPerformance: method test_github_api_schema_performance (line 22) | async def test_github_api_schema_performance(self): method test_medium_schema_performance (line 68) | def test_medium_schema_performance(self): FILE: tests/server/providers/openapi/test_parameter_collisions.py function create_openapi_server (line 11) | def create_openapi_server( class TestParameterCollisions (line 23) | class TestParameterCollisions: method collision_spec (line 27) | def collision_spec(self): method test_path_body_collision_handling (line 134) | async def test_path_body_collision_handling(self, collision_spec): method test_query_header_collision_handling (line 174) | async def test_query_header_collision_handling(self, collision_spec): method test_collision_resolution_maintains_functionality (line 204) | async def test_collision_resolution_maintains_functionality(self, coll... FILE: tests/server/providers/openapi/test_performance_comparison.py function create_openapi_server (line 13) | def create_openapi_server( class TestPerformance (line 25) | class TestPerformance: method comprehensive_spec (line 29) | def comprehensive_spec(self): method test_provider_initialization_performance (line 169) | def test_provider_initialization_performance(self, comprehensive_spec): method test_server_initialization_performance (line 198) | def test_server_initialization_performance(self, comprehensive_spec): method test_functionality_after_optimization (line 225) | async def test_functionality_after_optimization(self, comprehensive_sp... method test_memory_efficiency (line 252) | def test_memory_efficiency(self, comprehensive_spec): FILE: tests/server/providers/openapi/test_server.py class TestOpenAPIProviderBasicFunctionality (line 12) | class TestOpenAPIProviderBasicFunctionality: method simple_openapi_spec (line 16) | def simple_openapi_spec(self): method test_provider_initialization (line 95) | def test_provider_initialization(self, simple_openapi_spec): method test_server_with_provider (line 104) | def test_server_with_provider(self, simple_openapi_spec): method test_provider_creates_tools_from_spec (line 114) | async def test_provider_creates_tools_from_spec(self, simple_openapi_s... method test_provider_tool_execution (line 132) | async def test_provider_tool_execution(self, simple_openapi_spec): method test_provider_creates_default_client_from_spec (line 150) | def test_provider_creates_default_client_from_spec(self, simple_openap... method test_provider_default_client_requires_servers (line 156) | def test_provider_default_client_requires_servers(self): method test_provider_with_empty_spec (line 166) | def test_provider_with_empty_spec(self): method test_clean_schema_output_no_unused_defs (line 181) | async def test_clean_schema_output_no_unused_defs(self): FILE: tests/server/providers/proxy/test_proxy_client.py function fastmcp_server (line 24) | def fastmcp_server(): function proxy_server (line 87) | async def proxy_server(fastmcp_server: FastMCP): class TestProxyClient (line 94) | class TestProxyClient: method test_forward_tool_meta (line 95) | async def test_forward_tool_meta(self, proxy_server: FastMCP): method test_forward_error_response (line 104) | async def test_forward_error_response(self, proxy_server: FastMCP): method test_forward_list_roots_request (line 112) | async def test_forward_list_roots_request(self, proxy_server: FastMCP): method test_forward_list_roots_response (line 128) | async def test_forward_list_roots_response(self, proxy_server: FastMCP): method test_forward_sampling_request (line 136) | async def test_forward_sampling_request(self, proxy_server: FastMCP): method test_forward_sampling_response (line 168) | async def test_forward_sampling_response(self, proxy_server: FastMCP): method test_elicit_request (line 178) | async def test_elicit_request(self, proxy_server: FastMCP): method test_elicit_accept_response (line 207) | async def test_elicit_accept_response(self, proxy_server: FastMCP): method test_elicit_decline_response (line 224) | async def test_elicit_decline_response(self, proxy_server: FastMCP): method test_log_request (line 240) | async def test_log_request(self, proxy_server: FastMCP): method test_report_progress_request (line 260) | async def test_report_progress_request(self, proxy_server: FastMCP): method test_concurrent_log_requests_no_mixing (line 284) | async def test_concurrent_log_requests_no_mixing(self, proxy_server: F... method test_concurrent_elicitation_no_mixing (line 313) | async def test_concurrent_elicitation_no_mixing(self, proxy_server: Fa... method test_elicit_with_default_values (line 356) | async def test_elicit_with_default_values(self, fastmcp_server: FastMCP): method test_client_factory_creates_fresh_sessions (line 403) | async def test_client_factory_creates_fresh_sessions(self, fastmcp_ser... method test_connected_proxy_client_uses_fresh_sessions (line 422) | async def test_connected_proxy_client_uses_fresh_sessions( FILE: tests/server/providers/proxy/test_proxy_server.py function fastmcp_server (line 39) | def fastmcp_server(): function proxy_server (line 159) | async def proxy_server(fastmcp_server): function test_create_proxy_with_client (line 164) | async def test_create_proxy_with_client(fastmcp_server): function test_create_proxy_with_server (line 174) | async def test_create_proxy_with_server(fastmcp_server): function test_create_proxy_with_transport (line 182) | async def test_create_proxy_with_transport(fastmcp_server): function test_create_proxy_with_url (line 190) | def test_create_proxy_with_url(): function test_as_proxy_deprecated_with_server (line 202) | async def test_as_proxy_deprecated_with_server(fastmcp_server): function test_as_proxy_deprecated_with_url (line 218) | def test_as_proxy_deprecated_with_url(): function test_proxy_with_async_client_factory (line 231) | async def test_proxy_with_async_client_factory(): class TestTools (line 248) | class TestTools: method test_get_tools (line 249) | async def test_get_tools(self, proxy_server): method test_get_tools_meta (line 256) | async def test_get_tools_meta(self, proxy_server): method test_get_transformed_tools (line 263) | async def test_get_transformed_tools(self): method test_call_transformed_tools (line 284) | async def test_call_transformed_tools(self): method test_tool_without_description (line 305) | async def test_tool_without_description(self, proxy_server): method test_list_tools_same_as_original (line 310) | async def test_list_tools_same_as_original(self, fastmcp_server, proxy... method test_call_tool_result_same_as_original (line 315) | async def test_call_tool_result_same_as_original( method test_call_tool_calls_tool (line 323) | async def test_call_tool_calls_tool(self, proxy_server): method test_error_tool_raises_error (line 328) | async def test_error_tool_raises_error(self, proxy_server): method test_call_tool_forwards_meta (line 333) | async def test_call_tool_forwards_meta(self, fastmcp_server, proxy_ser... method test_proxy_can_overwrite_proxied_tool (line 351) | async def test_proxy_can_overwrite_proxied_tool(self, proxy_server): method test_proxy_can_list_overwritten_tool (line 364) | async def test_proxy_can_list_overwritten_tool(self, proxy_server): class TestResources (line 379) | class TestResources: method test_get_resources (line 380) | async def test_get_resources(self, proxy_server): method test_get_resources_meta (line 388) | async def test_get_resources_meta(self, proxy_server): method test_list_resources_same_as_original (line 395) | async def test_list_resources_same_as_original(self, fastmcp_server, p... method test_read_resource (line 400) | async def test_read_resource(self, proxy_server: FastMCPProxy): method test_read_resource_same_as_original (line 406) | async def test_read_resource_same_as_original(self, fastmcp_server, pr... method test_read_json_resource (line 413) | async def test_read_json_resource(self, proxy_server: FastMCPProxy): method test_proxy_returns_all_resource_contents (line 422) | async def test_proxy_returns_all_resource_contents( method test_read_resource_returns_none_if_not_found (line 456) | async def test_read_resource_returns_none_if_not_found(self, proxy_ser... method test_proxy_can_overwrite_proxied_resource (line 463) | async def test_proxy_can_overwrite_proxied_resource(self, proxy_server): method test_proxy_can_list_overwritten_resource (line 477) | async def test_proxy_can_list_overwritten_resource(self, proxy_server): class TestResourceTemplates (line 494) | class TestResourceTemplates: method test_get_resource_templates (line 495) | async def test_get_resource_templates(self, proxy_server): method test_get_resource_templates_meta (line 499) | async def test_get_resource_templates_meta(self, proxy_server): method test_list_resource_templates_same_as_original (line 510) | async def test_list_resource_templates_same_as_original( method test_read_resource_template (line 522) | async def test_read_resource_template(self, proxy_server: FastMCPProxy... method test_read_resource_template_same_as_original (line 528) | async def test_read_resource_template_same_as_original( method test_proxy_template_returns_all_resource_contents (line 537) | async def test_proxy_template_returns_all_resource_contents( method test_proxy_can_overwrite_proxied_resource_template (line 568) | async def test_proxy_can_overwrite_proxied_resource_template(self, pro... method test_proxy_can_list_overwritten_resource_template (line 591) | async def test_proxy_can_list_overwritten_resource_template(self, prox... class TestPrompts (line 608) | class TestPrompts: method test_get_prompts_server_method (line 609) | async def test_get_prompts_server_method(self, proxy_server: FastMCPPr... method test_get_prompts_meta (line 613) | async def test_get_prompts_meta(self, proxy_server): method test_list_prompts_same_as_original (line 622) | async def test_list_prompts_same_as_original(self, fastmcp_server, pro... method test_render_prompt_same_as_original (line 629) | async def test_render_prompt_same_as_original( method test_render_prompt_calls_prompt (line 638) | async def test_render_prompt_calls_prompt(self, proxy_server): method test_proxy_can_overwrite_proxied_prompt (line 645) | async def test_proxy_can_overwrite_proxied_prompt(self, proxy_server): method test_proxy_can_list_overwritten_prompt (line 665) | async def test_proxy_can_list_overwritten_prompt(self, proxy_server): method test_proxy_prompt_preserves_image_content (line 681) | async def test_proxy_prompt_preserves_image_content( function test_proxy_handles_multiple_concurrent_tasks_correctly (line 698) | async def test_proxy_handles_multiple_concurrent_tasks_correctly( class TestProxyComponentEnableDisable (line 723) | class TestProxyComponentEnableDisable: method test_proxy_tool_enable_raises_not_implemented (line 726) | async def test_proxy_tool_enable_raises_not_implemented(self, proxy_se... method test_proxy_tool_disable_raises_not_implemented (line 734) | async def test_proxy_tool_disable_raises_not_implemented(self, proxy_s... method test_proxy_resource_enable_raises_not_implemented (line 742) | async def test_proxy_resource_enable_raises_not_implemented(self, prox... method test_proxy_resource_disable_raises_not_implemented (line 750) | async def test_proxy_resource_disable_raises_not_implemented(self, pro... method test_proxy_prompt_enable_raises_not_implemented (line 758) | async def test_proxy_prompt_enable_raises_not_implemented(self, proxy_... method test_proxy_prompt_disable_raises_not_implemented (line 766) | async def test_proxy_prompt_disable_raises_not_implemented(self, proxy... class TestProxyProviderCache (line 775) | class TestProxyProviderCache: method test_get_tool_uses_cached_list (line 778) | async def test_get_tool_uses_cached_list(self, fastmcp_server): method test_get_tool_fetches_on_cold_cache (line 796) | async def test_get_tool_fetches_on_cold_cache(self, fastmcp_server): method test_cache_expires_after_ttl (line 806) | async def test_cache_expires_after_ttl(self, fastmcp_server): method test_list_tools_refreshes_cache (line 823) | async def test_list_tools_refreshes_cache(self, fastmcp_server): method test_cache_ttl_zero_disables_caching (line 837) | async def test_cache_ttl_zero_disables_caching(self, fastmcp_server): method test_get_resource_uses_cache (line 857) | async def test_get_resource_uses_cache(self, fastmcp_server): method test_call_tool_through_server_uses_cache (line 870) | async def test_call_tool_through_server_uses_cache(self, fastmcp_server): FILE: tests/server/providers/proxy/test_stateful_proxy_client.py function fastmcp_server (line 19) | def fastmcp_server(): function stateful_proxy_server (line 49) | async def stateful_proxy_server(fastmcp_server: FastMCP): function stateless_server (line 55) | async def stateless_server(stateful_proxy_server: FastMCP): class TestStatefulProxyClient (line 73) | class TestStatefulProxyClient: method test_concurrent_log_requests_no_mixing (line 74) | async def test_concurrent_log_requests_no_mixing( method test_stateful_proxy (line 105) | async def test_stateful_proxy(self, stateful_proxy_server: FastMCP): method test_stateless_proxy (line 115) | async def test_stateless_proxy(self, stateless_server: str): method test_multi_proxies_no_mixing (line 124) | async def test_multi_proxies_no_mixing(self): method test_stateful_proxy_elicitation_over_http (line 153) | async def test_stateful_proxy_elicitation_over_http(self): FILE: tests/server/providers/test_base_provider.py class CustomTool (line 11) | class CustomTool(Tool): method run (line 17) | async def run(self, arguments: dict[str, Any]) -> ToolResult: class SimpleProvider (line 21) | class SimpleProvider(Provider): method __init__ (line 24) | def __init__(self, tools: list[Tool] | None = None): method _list_tools (line 28) | async def _list_tools(self) -> list[Tool]: class TestBaseProviderGetTasks (line 32) | class TestBaseProviderGetTasks: method test_get_tasks_includes_custom_tool_subclasses (line 35) | async def test_get_tasks_includes_custom_tool_subclasses(self): method test_get_tasks_filters_forbidden_custom_tools (line 46) | async def test_get_tasks_filters_forbidden_custom_tools(self): method test_get_tasks_mixed_custom_and_forbidden (line 63) | async def test_get_tasks_mixed_custom_and_forbidden(self): method test_get_tasks_applies_transforms (line 82) | async def test_get_tasks_applies_transforms(self): FILE: tests/server/providers/test_fastmcp_provider.py class ToolTracingMiddleware (line 14) | class ToolTracingMiddleware(Middleware): method __init__ (line 17) | def __init__(self, name: str, calls: list[str]): method on_call_tool (line 22) | async def on_call_tool( class ResourceTracingMiddleware (line 33) | class ResourceTracingMiddleware(Middleware): method __init__ (line 36) | def __init__(self, name: str, calls: list[str]): method on_read_resource (line 41) | async def on_read_resource( class PromptTracingMiddleware (line 52) | class PromptTracingMiddleware(Middleware): method __init__ (line 55) | def __init__(self, name: str, calls: list[str]): method on_get_prompt (line 60) | async def on_get_prompt( class TestToolOperations (line 71) | class TestToolOperations: method test_list_tools (line 74) | async def test_list_tools(self): method test_get_tool (line 93) | async def test_get_tool(self): method test_get_nonexistent_tool_returns_none (line 107) | async def test_get_nonexistent_tool_returns_none(self): method test_call_tool_via_client (line 115) | async def test_call_tool_via_client(self): class TestResourceOperations (line 131) | class TestResourceOperations: method test_list_resources (line 134) | async def test_list_resources(self): method test_get_resource (line 153) | async def test_get_resource(self): method test_read_resource_via_client (line 167) | async def test_read_resource_via_client(self): class TestResourceTemplateOperations (line 184) | class TestResourceTemplateOperations: method test_list_resource_templates (line 187) | async def test_list_resource_templates(self): method test_get_resource_template (line 201) | async def test_get_resource_template(self): method test_read_resource_template_via_client (line 214) | async def test_read_resource_template_via_client(self): class TestPromptOperations (line 231) | class TestPromptOperations: method test_list_prompts (line 234) | async def test_list_prompts(self): method test_get_prompt (line 253) | async def test_get_prompt(self): method test_render_prompt_via_client (line 267) | async def test_render_prompt_via_client(self): class TestServerReference (line 284) | class TestServerReference: method test_server_attribute (line 287) | def test_server_attribute(self): method test_server_name_accessible (line 294) | def test_server_name_accessible(self): class TestMiddlewareChain (line 302) | class TestMiddlewareChain: method test_tool_middleware_three_levels (line 305) | async def test_tool_middleware_three_levels(self): method test_resource_middleware_three_levels (line 340) | async def test_resource_middleware_three_levels(self): method test_prompt_middleware_three_levels (line 376) | async def test_prompt_middleware_three_levels(self): method test_resource_template_middleware_three_levels (line 412) | async def test_resource_template_middleware_three_levels(self): FILE: tests/server/providers/test_local_provider.py class TestLocalProviderStorage (line 24) | class TestLocalProviderStorage: method test_add_tool (line 27) | def test_add_tool(self): method test_add_multiple_tools (line 41) | def test_add_multiple_tools(self): method test_remove_tool (line 61) | def test_remove_tool(self): method test_remove_nonexistent_tool_raises (line 75) | def test_remove_nonexistent_tool_raises(self): method test_add_resource (line 82) | def test_add_resource(self): method test_remove_resource (line 92) | def test_remove_resource(self): method test_add_template (line 104) | def test_add_template(self): method test_remove_template (line 114) | def test_remove_template(self): method test_add_prompt (line 126) | def test_add_prompt(self): method test_remove_prompt (line 138) | def test_remove_prompt(self): class TestLocalProviderInterface (line 152) | class TestLocalProviderInterface: method test_list_tools_empty (line 155) | async def test_list_tools_empty(self): method test_list_tools (line 161) | async def test_list_tools(self): method test_get_tool_found (line 175) | async def test_get_tool_found(self): method test_get_tool_not_found (line 190) | async def test_get_tool_not_found(self): method test_list_resources (line 196) | async def test_list_resources(self): method test_get_resource_found (line 208) | async def test_get_resource_found(self): method test_get_resource_not_found (line 220) | async def test_get_resource_not_found(self): method test_list_resource_templates (line 226) | async def test_list_resource_templates(self): method test_get_resource_template_match (line 238) | async def test_get_resource_template_match(self): method test_get_resource_template_no_match (line 250) | async def test_get_resource_template_no_match(self): method test_list_prompts (line 261) | async def test_list_prompts(self): method test_get_prompt_found (line 275) | async def test_get_prompt_found(self): method test_get_prompt_not_found (line 289) | async def test_get_prompt_not_found(self): class TestLocalProviderDecorators (line 296) | class TestLocalProviderDecorators: method test_tool_decorator_registers (line 305) | def test_tool_decorator_registers(self): method test_tool_decorator_with_custom_name_registers (line 316) | def test_tool_decorator_with_custom_name_registers(self): method test_tool_direct_call (line 327) | def test_tool_direct_call(self): method test_tool_enabled_false (line 338) | def test_tool_enabled_false(self): method test_tool_enabled_false_not_listed (line 357) | async def test_tool_enabled_false_not_listed(self): method test_server_enable_overrides_provider_disable (line 376) | async def test_server_enable_overrides_provider_disable(self): method test_tool_roundtrip (line 395) | async def test_tool_roundtrip(self): method test_resource_decorator_registers (line 409) | def test_resource_decorator_registers(self): method test_resource_with_custom_name_registers (line 419) | def test_resource_with_custom_name_registers(self): method test_resource_enabled_false (line 429) | def test_resource_enabled_false(self): method test_resource_enabled_false_not_listed (line 448) | async def test_resource_enabled_false_not_listed(self): method test_template_enabled_false (line 467) | def test_template_enabled_false(self): method test_template_enabled_false_not_listed (line 486) | async def test_template_enabled_false_not_listed(self): method test_resource_roundtrip (line 505) | async def test_resource_roundtrip(self): method test_prompt_decorator_registers (line 519) | def test_prompt_decorator_registers(self): method test_prompt_with_custom_name_registers (line 529) | def test_prompt_with_custom_name_registers(self): method test_prompt_enabled_false (line 540) | def test_prompt_enabled_false(self): method test_prompt_enabled_false_not_listed (line 559) | async def test_prompt_enabled_false_not_listed(self): method test_prompt_roundtrip (line 578) | async def test_prompt_roundtrip(self): class TestProviderToolTransformations (line 593) | class TestProviderToolTransformations: method test_add_transform_applies_tool_transforms (line 596) | async def test_add_transform_applies_tool_transforms(self): method test_transform_layer_get_tool (line 617) | async def test_transform_layer_get_tool(self): method test_transform_layer_description_change (line 644) | async def test_transform_layer_description_change(self): method test_provider_unaffected_by_transforms (line 666) | async def test_provider_unaffected_by_transforms(self): method test_transform_layer_duplicate_target_name_raises_error (line 689) | def test_transform_layer_duplicate_target_name_raises_error(self): class TestLocalProviderTaskRegistration (line 703) | class TestLocalProviderTaskRegistration: method test_get_tasks_returns_task_eligible_tools (line 706) | async def test_get_tasks_returns_task_eligible_tools(self): method test_get_tasks_filters_forbidden_tools (line 718) | async def test_get_tasks_filters_forbidden_tools(self): method test_get_tasks_includes_custom_tool_subclasses (line 729) | async def test_get_tasks_includes_custom_tool_subclasses(self): class TestLocalProviderStandaloneUsage (line 747) | class TestLocalProviderStandaloneUsage: method test_attach_provider_to_server (line 750) | async def test_attach_provider_to_server(self): method test_attach_provider_to_multiple_servers (line 764) | async def test_attach_provider_to_multiple_servers(self): method test_tools_visible_via_server_get_tools (line 783) | async def test_tools_visible_via_server_get_tools(self): method test_server_decorator_and_provider_tools_coexist (line 796) | async def test_server_decorator_and_provider_tools_coexist(self): method test_local_provider_first_wins_duplicates (line 814) | async def test_local_provider_first_wins_duplicates(self): FILE: tests/server/providers/test_local_provider_prompts.py class TestPromptContext (line 15) | class TestPromptContext: method test_prompt_context (line 16) | async def test_prompt_context(self): method test_prompt_context_with_callable_object (line 30) | async def test_prompt_context_with_callable_object(self): class TestPromptDecorator (line 48) | class TestPromptDecorator: method test_prompt_decorator (line 49) | async def test_prompt_decorator(self): method test_prompt_decorator_without_parentheses (line 65) | async def test_prompt_decorator_without_parentheses(self): method test_prompt_decorator_with_name (line 80) | async def test_prompt_decorator_with_name(self): method test_prompt_decorator_with_description (line 96) | async def test_prompt_decorator_with_description(self): method test_prompt_decorator_with_parameters (line 112) | async def test_prompt_decorator_with_parameters(self): method test_prompt_decorator_instance_method (line 143) | async def test_prompt_decorator_instance_method(self): method test_prompt_decorator_classmethod (line 162) | async def test_prompt_decorator_classmethod(self): method test_prompt_decorator_classmethod_error (line 180) | async def test_prompt_decorator_classmethod_error(self): method test_prompt_decorator_staticmethod (line 191) | async def test_prompt_decorator_staticmethod(self): method test_prompt_decorator_async_function (line 206) | async def test_prompt_decorator_async_function(self): method test_prompt_decorator_with_tags (line 219) | async def test_prompt_decorator_with_tags(self): method test_prompt_decorator_with_string_name (line 232) | async def test_prompt_decorator_with_string_name(self): method test_prompt_direct_function_call (line 250) | async def test_prompt_direct_function_call(self): method test_prompt_decorator_conflicting_names_error (line 280) | async def test_prompt_decorator_conflicting_names_error(self): method test_prompt_decorator_staticmethod_order (line 293) | async def test_prompt_decorator_staticmethod_order(self): method test_prompt_decorator_with_meta (line 309) | async def test_prompt_decorator_with_meta(self): class TestPromptEnabled (line 325) | class TestPromptEnabled: method test_toggle_enabled (line 326) | async def test_toggle_enabled(self): method test_prompt_disabled (line 346) | async def test_prompt_disabled(self): method test_prompt_toggle_enabled (line 357) | async def test_prompt_toggle_enabled(self): method test_prompt_toggle_disabled (line 372) | async def test_prompt_toggle_disabled(self): method test_get_prompt_and_disable (line 387) | async def test_get_prompt_and_disable(self): method test_cant_get_disabled_prompt (line 405) | async def test_cant_get_disabled_prompt(self): class TestPromptTags (line 419) | class TestPromptTags: method create_server (line 420) | def create_server(self, include_tags=None, exclude_tags=None): method test_include_tags_all_prompts (line 438) | async def test_include_tags_all_prompts(self): method test_include_tags_some_prompts (line 443) | async def test_include_tags_some_prompts(self): method test_exclude_tags_all_prompts (line 448) | async def test_exclude_tags_all_prompts(self): method test_exclude_tags_some_prompts (line 453) | async def test_exclude_tags_some_prompts(self): method test_exclude_takes_precedence_over_include (line 458) | async def test_exclude_takes_precedence_over_include(self): method test_read_prompt_includes_tags (line 463) | async def test_read_prompt_includes_tags(self): method test_read_prompt_excludes_tags (line 473) | async def test_read_prompt_excludes_tags(self): FILE: tests/server/providers/test_local_provider_resources.py class TestResourceContext (line 25) | class TestResourceContext: method test_resource_with_context_annotation_gets_context (line 26) | async def test_resource_with_context_annotation_gets_context(self): class TestResourceTemplates (line 40) | class TestResourceTemplates: method test_resource_with_params_not_in_uri (line 41) | async def test_resource_with_params_not_in_uri(self): method test_resource_with_uri_params_without_args (line 55) | async def test_resource_with_uri_params_without_args(self): method test_resource_with_untyped_params (line 68) | async def test_resource_with_untyped_params(self): method test_resource_matching_params (line 76) | async def test_resource_matching_params(self): method test_resource_mismatched_params (line 87) | async def test_resource_mismatched_params(self): method test_resource_multiple_params (line 100) | async def test_resource_multiple_params(self): method test_resource_multiple_mismatched_params (line 111) | async def test_resource_multiple_mismatched_params(self): method test_template_with_varkwargs (line 124) | async def test_template_with_varkwargs(self): method test_template_with_default_params (line 135) | async def test_template_with_default_params(self): method test_template_to_resource_conversion (line 153) | async def test_template_to_resource_conversion(self): method test_template_decorator_with_tags (line 168) | async def test_template_decorator_with_tags(self): method test_template_decorator_wildcard_param (line 179) | async def test_template_decorator_wildcard_param(self): method test_template_with_query_params (line 189) | async def test_template_with_query_params(self): method test_templates_match_in_order_of_definition (line 206) | async def test_templates_match_in_order_of_definition(self): method test_templates_shadow_each_other_reorder (line 224) | async def test_templates_shadow_each_other_reorder(self): method test_resource_template_with_annotations (line 242) | async def test_resource_template_with_annotations(self): class TestResourceTemplateContext (line 266) | class TestResourceTemplateContext: method test_resource_template_context (line 267) | async def test_resource_template_context(self): method test_resource_template_context_with_callable_object (line 280) | async def test_resource_template_context_with_callable_object(self): class TestResourceDecorator (line 298) | class TestResourceDecorator: method test_no_resources_before_decorator (line 299) | async def test_no_resources_before_decorator(self): method test_resource_decorator (line 305) | async def test_resource_decorator(self): method test_resource_decorator_incorrect_usage (line 315) | async def test_resource_decorator_incorrect_usage(self): method test_resource_decorator_with_name (line 326) | async def test_resource_decorator_with_name(self): method test_resource_decorator_with_description (line 340) | async def test_resource_decorator_with_description(self): method test_resource_decorator_with_tags (line 351) | async def test_resource_decorator_with_tags(self): method test_resource_decorator_instance_method (line 363) | async def test_resource_decorator_instance_method(self): method test_resource_decorator_classmethod (line 384) | async def test_resource_decorator_classmethod(self): method test_resource_decorator_classmethod_error (line 403) | async def test_resource_decorator_classmethod_error(self): method test_resource_decorator_staticmethod (line 414) | async def test_resource_decorator_staticmethod(self): method test_resource_decorator_async_function (line 426) | async def test_resource_decorator_async_function(self): method test_resource_decorator_staticmethod_order (line 436) | async def test_resource_decorator_staticmethod_order(self): method test_resource_decorator_with_meta (line 449) | async def test_resource_decorator_with_meta(self): method test_resource_content_with_meta_in_response (line 464) | async def test_resource_content_with_meta_in_response(self): method test_resource_content_binary_with_meta (line 486) | async def test_resource_content_binary_with_meta(self): method test_resource_content_without_meta (line 506) | async def test_resource_content_without_meta(self): class TestTemplateDecorator (line 520) | class TestTemplateDecorator: method test_template_decorator (line 521) | async def test_template_decorator(self): method test_template_decorator_incorrect_usage (line 536) | async def test_template_decorator_incorrect_usage(self): method test_template_decorator_with_name (line 547) | async def test_template_decorator_with_name(self): method test_template_decorator_with_description (line 561) | async def test_template_decorator_with_description(self): method test_template_decorator_instance_method (line 572) | async def test_template_decorator_instance_method(self): method test_template_decorator_classmethod (line 593) | async def test_template_decorator_classmethod(self): method test_template_decorator_staticmethod (line 613) | async def test_template_decorator_staticmethod(self): method test_template_decorator_async_function (line 625) | async def test_template_decorator_async_function(self): method test_template_decorator_with_tags (line 635) | async def test_template_decorator_with_tags(self): method test_template_decorator_wildcard_param (line 647) | async def test_template_decorator_wildcard_param(self): method test_template_decorator_with_meta (line 659) | async def test_template_decorator_with_meta(self): class TestResourceTags (line 677) | class TestResourceTags: method create_server (line 678) | def create_server(self, include_tags=None, exclude_tags=None): method test_include_tags_all_resources (line 696) | async def test_include_tags_all_resources(self): method test_include_tags_some_resources (line 701) | async def test_include_tags_some_resources(self): method test_exclude_tags_all_resources (line 706) | async def test_exclude_tags_all_resources(self): method test_exclude_tags_some_resources (line 711) | async def test_exclude_tags_some_resources(self): method test_exclude_precedence (line 716) | async def test_exclude_precedence(self): method test_read_included_resource (line 721) | async def test_read_included_resource(self): method test_read_excluded_resource (line 729) | async def test_read_excluded_resource(self): class TestResourceEnabled (line 735) | class TestResourceEnabled: method test_toggle_enabled (line 736) | async def test_toggle_enabled(self): method test_resource_disabled (line 756) | async def test_resource_disabled(self): method test_resource_toggle_enabled (line 770) | async def test_resource_toggle_enabled(self): method test_resource_toggle_disabled (line 785) | async def test_resource_toggle_disabled(self): method test_get_resource_and_disable (line 799) | async def test_get_resource_and_disable(self): method test_cant_read_disabled_resource (line 816) | async def test_cant_read_disabled_resource(self): class TestResourceTemplatesTags (line 829) | class TestResourceTemplatesTags: method create_server (line 830) | def create_server(self, include_tags=None, exclude_tags=None): method test_include_tags_all_resources (line 848) | async def test_include_tags_all_resources(self): method test_include_tags_some_resources (line 856) | async def test_include_tags_some_resources(self): method test_exclude_tags_all_resources (line 861) | async def test_exclude_tags_all_resources(self): method test_exclude_tags_some_resources (line 866) | async def test_exclude_tags_some_resources(self): method test_exclude_takes_precedence_over_include (line 871) | async def test_exclude_takes_precedence_over_include(self): method test_read_resource_template_includes_tags (line 876) | async def test_read_resource_template_includes_tags(self): method test_read_resource_template_excludes_tags (line 884) | async def test_read_resource_template_excludes_tags(self): class TestResourceTemplateEnabled (line 893) | class TestResourceTemplateEnabled: method test_toggle_enabled (line 894) | async def test_toggle_enabled(self): method test_template_disabled (line 914) | async def test_template_disabled(self): method test_template_toggle_enabled (line 928) | async def test_template_toggle_enabled(self): method test_template_toggle_disabled (line 943) | async def test_template_toggle_disabled(self): method test_get_template_and_disable (line 957) | async def test_get_template_and_disable(self): method test_cant_read_disabled_template (line 974) | async def test_cant_read_disabled_template(self): FILE: tests/server/providers/test_skills_provider.py class TestParseFrontmatter (line 20) | class TestParseFrontmatter: method test_no_frontmatter (line 21) | def test_no_frontmatter(self): method test_basic_frontmatter (line 27) | def test_basic_frontmatter(self): method test_frontmatter_with_tags_list (line 40) | def test_frontmatter_with_tags_list(self): method test_frontmatter_with_quoted_strings (line 51) | def test_frontmatter_with_quoted_strings(self): class TestSkillProvider (line 64) | class TestSkillProvider: method single_skill_dir (line 68) | def single_skill_dir(self, tmp_path: Path) -> Path: method test_loads_skill_at_init (line 88) | def test_loads_skill_at_init(self, single_skill_dir: Path): method test_raises_if_directory_missing (line 94) | def test_raises_if_directory_missing(self, tmp_path: Path): method test_raises_if_main_file_missing (line 98) | def test_raises_if_main_file_missing(self, tmp_path: Path): method test_list_resources_default_template_mode (line 104) | async def test_list_resources_default_template_mode(self, single_skill... method test_list_resources_supporting_files_as_resources (line 114) | async def test_list_resources_supporting_files_as_resources( method test_list_templates_default_mode (line 131) | async def test_list_templates_default_mode(self, single_skill_dir: Path): method test_list_templates_resources_mode (line 139) | async def test_list_templates_resources_mode(self, single_skill_dir: P... method test_read_main_file (line 148) | async def test_read_main_file(self, single_skill_dir: Path): method test_read_manifest (line 158) | async def test_read_manifest(self, single_skill_dir: Path): method test_manifest_ignores_symlink_target_outside_skill (line 172) | async def test_manifest_ignores_symlink_target_outside_skill(self, tmp... method test_read_supporting_file_via_template (line 194) | async def test_read_supporting_file_via_template(self, single_skill_di... method test_read_supporting_file_via_resource_mode (line 202) | async def test_read_supporting_file_via_resource_mode(self, single_ski... method test_skill_resource_meta (line 212) | async def test_skill_resource_meta(self, single_skill_dir: Path): method test_skill_file_resource_meta (line 231) | async def test_skill_file_resource_meta(self, single_skill_dir: Path): method test_skill_meta_survives_mounting (line 242) | async def test_skill_meta_survives_mounting(self, single_skill_dir: Pa... class TestSkillsDirectoryProvider (line 266) | class TestSkillsDirectoryProvider: method skills_dir (line 270) | def skills_dir(self, tmp_path: Path) -> Path: method test_list_resources_discovers_skills (line 316) | async def test_list_resources_discovers_skills(self, skills_dir: Path): method test_list_resources_includes_descriptions (line 330) | async def test_list_resources_includes_descriptions(self, skills_dir: ... method test_read_main_skill_file (line 338) | async def test_read_main_skill_file(self, skills_dir: Path): method test_read_manifest (line 348) | async def test_read_manifest(self, skills_dir: Path): method test_list_resource_templates (line 374) | async def test_list_resource_templates(self, skills_dir: Path): method test_read_supporting_file_via_template (line 385) | async def test_read_supporting_file_via_template(self, skills_dir: Path): method test_read_nested_file_via_template (line 397) | async def test_read_nested_file_via_template(self, skills_dir: Path): method test_empty_skills_directory (line 409) | async def test_empty_skills_directory(self, tmp_path: Path): method test_nonexistent_skills_directory (line 420) | async def test_nonexistent_skills_directory(self, tmp_path: Path): method test_reload_mode (line 427) | async def test_reload_mode(self, skills_dir: Path): method test_skill_without_frontmatter_uses_header_as_description (line 450) | async def test_skill_without_frontmatter_uses_header_as_description( method test_supporting_files_as_resources (line 467) | async def test_supporting_files_as_resources(self, skills_dir: Path): method test_supporting_files_as_resources_no_templates (line 483) | async def test_supporting_files_as_resources_no_templates(self, skills... class TestMultiDirectoryProvider (line 492) | class TestMultiDirectoryProvider: method multi_skills_dirs (line 496) | def multi_skills_dirs(self, tmp_path: Path) -> tuple[Path, Path]: method test_multiple_roots_discover_all_skills (line 524) | async def test_multiple_roots_discover_all_skills(self, multi_skills_d... method test_duplicate_skill_names_first_wins (line 539) | async def test_duplicate_skill_names_first_wins(self, tmp_path: Path): method test_single_path_as_list (line 577) | async def test_single_path_as_list(self, multi_skills_dirs): method test_single_path_as_string (line 585) | async def test_single_path_as_string(self, multi_skills_dirs): method test_nonexistent_roots_handled_gracefully (line 593) | async def test_nonexistent_roots_handled_gracefully(self, tmp_path: Pa... method test_empty_roots_list (line 609) | async def test_empty_roots_list(self, tmp_path: Path): class TestSkillsProviderAlias (line 616) | class TestSkillsProviderAlias: method test_skills_provider_is_alias (line 619) | def test_skills_provider_is_alias(self): class TestClaudeSkillsProvider (line 623) | class TestClaudeSkillsProvider: method test_default_root_is_claude_skills_dir (line 624) | def test_default_root_is_claude_skills_dir(self, tmp_path: Path, monke... method test_main_file_name_is_skill_md (line 631) | def test_main_file_name_is_skill_md(self): method test_supporting_files_parameter (line 635) | def test_supporting_files_parameter(self): class TestPathTraversalPrevention (line 640) | class TestPathTraversalPrevention: method test_path_traversal_blocked (line 641) | async def test_path_traversal_blocked(self, tmp_path: Path): FILE: tests/server/providers/test_skills_vendor_providers.py class TestVendorProviders (line 19) | class TestVendorProviders: method test_cursor_skills_provider_path (line 22) | def test_cursor_skills_provider_path(self, tmp_path: Path, monkeypatch): method test_vscode_skills_provider_path (line 29) | def test_vscode_skills_provider_path(self, tmp_path: Path, monkeypatch): method test_codex_skills_provider_paths (line 36) | def test_codex_skills_provider_paths(self, tmp_path: Path, monkeypatch): method test_gemini_skills_provider_path (line 48) | def test_gemini_skills_provider_path(self, tmp_path: Path, monkeypatch): method test_goose_skills_provider_path (line 55) | def test_goose_skills_provider_path(self, tmp_path: Path, monkeypatch): method test_copilot_skills_provider_path (line 62) | def test_copilot_skills_provider_path(self, tmp_path: Path, monkeypatch): method test_opencode_skills_provider_path (line 69) | def test_opencode_skills_provider_path(self, tmp_path: Path, monkeypat... method test_claude_skills_provider_path (line 76) | def test_claude_skills_provider_path(self, tmp_path: Path, monkeypatch): method test_all_providers_instantiable (line 83) | def test_all_providers_instantiable(self): method test_all_providers_support_reload (line 100) | def test_all_providers_support_reload(self): method test_all_providers_support_supporting_files (line 116) | def test_all_providers_support_supporting_files(self): method test_codex_scans_both_paths (line 132) | async def test_codex_scans_both_paths(self, tmp_path: Path, monkeypatch): method test_nonexistent_paths_handled_gracefully (line 179) | async def test_nonexistent_paths_handled_gracefully( FILE: tests/server/providers/test_transforming_provider.py class TestNamespaceTransform (line 12) | class TestNamespaceTransform: method test_namespace_prefixes_tool_names (line 15) | async def test_namespace_prefixes_tool_names(self): method test_namespace_prefixes_prompt_names (line 33) | async def test_namespace_prefixes_prompt_names(self): method test_namespace_prefixes_resource_uris (line 50) | async def test_namespace_prefixes_resource_uris(self): method test_namespace_prefixes_template_uris (line 67) | async def test_namespace_prefixes_template_uris(self): class TestToolTransformRenames (line 85) | class TestToolTransformRenames: method test_tool_rename (line 88) | async def test_tool_rename(self): method test_renamed_tool_is_callable_via_mount (line 105) | async def test_renamed_tool_is_callable_via_mount(self): method test_duplicate_rename_targets_raises_error (line 125) | def test_duplicate_rename_targets_raises_error(self): class TestTransformReverseLookup (line 136) | class TestTransformReverseLookup: method test_namespace_get_tool (line 139) | async def test_namespace_get_tool(self): method test_transform_layer_get_tool (line 159) | async def test_transform_layer_get_tool(self): method test_namespace_get_resource (line 178) | async def test_namespace_get_resource(self): method test_nonmatching_namespace_returns_none (line 197) | async def test_nonmatching_namespace_returns_none(self): class TestTransformStacking (line 217) | class TestTransformStacking: method test_stacked_namespaces_compose (line 220) | async def test_stacked_namespaces_compose(self): method test_stacked_transforms_are_callable (line 240) | async def test_stacked_transforms_are_callable(self): class TestNoTransformation (line 262) | class TestNoTransformation: method test_transform_passthrough (line 265) | async def test_transform_passthrough(self): method test_empty_transform_layer_passthrough (line 284) | async def test_empty_transform_layer_passthrough(self): FILE: tests/server/sampling/test_prepare_tools.py class TestPrepareTools (line 11) | class TestPrepareTools: method test_prepare_tools_with_none (line 14) | def test_prepare_tools_with_none(self): method test_prepare_tools_with_sampling_tool (line 19) | def test_prepare_tools_with_sampling_tool(self): method test_prepare_tools_with_function (line 32) | def test_prepare_tools_with_function(self): method test_prepare_tools_with_function_tool (line 46) | def test_prepare_tools_with_function_tool(self): method test_prepare_tools_with_transformed_tool (line 62) | def test_prepare_tools_with_transformed_tool(self): method test_prepare_tools_with_mixed_types (line 84) | def test_prepare_tools_with_mixed_types(self): method test_prepare_tools_with_invalid_type (line 102) | def test_prepare_tools_with_invalid_type(self): method test_prepare_tools_empty_list (line 108) | def test_prepare_tools_empty_list(self): FILE: tests/server/sampling/test_sampling_tool.py class TestSamplingToolFromFunction (line 15) | class TestSamplingToolFromFunction: method test_from_simple_function (line 18) | def test_from_simple_function(self): method test_from_function_with_overrides (line 30) | def test_from_function_with_overrides(self): method test_from_lambda_requires_name (line 43) | def test_from_lambda_requires_name(self): method test_from_lambda_with_name (line 47) | def test_from_lambda_with_name(self): method test_from_async_function (line 52) | def test_from_async_function(self): method test_multiple_parameters (line 62) | def test_multiple_parameters(self): class TestSamplingToolRun (line 75) | class TestSamplingToolRun: method test_run_sync_function (line 78) | async def test_run_sync_function(self): method test_run_async_function (line 87) | async def test_run_async_function(self): method test_run_with_no_arguments (line 96) | async def test_run_with_no_arguments(self): method test_run_with_none_arguments (line 105) | async def test_run_with_none_arguments(self): class TestSamplingToolSDKConversion (line 115) | class TestSamplingToolSDKConversion: method test_to_sdk_tool (line 118) | def test_to_sdk_tool(self): class TestSamplingToolFromCallableTool (line 131) | class TestSamplingToolFromCallableTool: method test_from_function_tool (line 134) | def test_from_function_tool(self): method test_from_function_tool_with_overrides (line 150) | def test_from_function_tool_with_overrides(self): method test_from_transformed_tool (line 167) | def test_from_transformed_tool(self): method test_from_function_tool_execution (line 189) | async def test_from_function_tool_execution(self): method test_from_transformed_tool_execution (line 202) | async def test_from_transformed_tool_execution(self): method test_from_invalid_tool_type (line 222) | def test_from_invalid_tool_type(self): method test_from_plain_function_fails (line 234) | def test_from_plain_function_fails(self): method test_from_function_tool_with_output_schema (line 243) | async def test_from_function_tool_with_output_schema(self): method test_from_function_tool_without_wrap_result (line 272) | async def test_from_function_tool_without_wrap_result(self): class TestSamplingToolAuthEnforcement (line 300) | class TestSamplingToolAuthEnforcement: method test_auth_protected_tool_blocked_without_token (line 303) | async def test_auth_protected_tool_blocked_without_token(self): method test_auth_protected_tool_blocked_with_wrong_scopes (line 324) | async def test_auth_protected_tool_blocked_with_wrong_scopes(self): method test_auth_protected_tool_allowed_with_correct_scopes (line 354) | async def test_auth_protected_tool_allowed_with_correct_scopes(self): method test_auth_protected_tool_skipped_on_stdio (line 384) | async def test_auth_protected_tool_skipped_on_stdio(self): method test_tool_without_auth_runs_normally (line 405) | async def test_tool_without_auth_runs_normally(self): method test_auth_protected_transformed_tool_blocked (line 418) | async def test_auth_protected_transformed_tool_blocked(self): FILE: tests/server/tasks/test_context_background_task.py class TestContextBackgroundTaskSupport (line 29) | class TestContextBackgroundTaskSupport: method test_context_not_background_task_by_default (line 32) | def test_context_not_background_task_by_default(self): method test_context_is_background_task_when_task_id_provided (line 39) | def test_context_is_background_task_when_task_id_provided(self): method test_context_task_id_is_readonly (line 46) | def test_context_task_id_is_readonly(self): class TestContextSessionProperty (line 54) | class TestContextSessionProperty: method test_session_raises_when_no_session_available (line 57) | def test_session_raises_when_no_session_available(self): method test_session_uses_stored_session_in_background_task (line 65) | def test_session_uses_stored_session_in_background_task(self): method test_session_uses_stored_session_during_on_initialize (line 79) | def test_session_uses_stored_session_during_on_initialize(self): class TestContextElicitBackgroundTask (line 92) | class TestContextElicitBackgroundTask: method test_elicit_raises_when_background_task_but_no_docket (line 95) | async def test_elicit_raises_when_background_task_but_no_docket(self): class TestElicitFailFast (line 109) | class TestElicitFailFast: method test_elicit_returns_cancel_when_notification_push_fails (line 112) | async def test_elicit_returns_cancel_when_notification_push_fails(self): class TestContextDocumentation (line 156) | class TestContextDocumentation: method test_is_background_task_has_docstring (line 159) | def test_is_background_task_has_docstring(self): method test_task_id_has_docstring (line 164) | def test_task_id_has_docstring(self): method test_session_has_docstring (line 169) | def test_session_has_docstring(self): class TestBackgroundTaskIntegration (line 180) | class TestBackgroundTaskIntegration: method test_report_progress_in_background_task (line 188) | async def test_report_progress_in_background_task(self): method test_context_wiring_in_background_task (line 208) | async def test_context_wiring_in_background_task(self): method test_origin_request_id_round_trips_through_background_task (line 233) | async def test_origin_request_id_round_trips_through_background_task(s... method test_elicit_accept_flow (line 270) | async def test_elicit_accept_flow(self): method test_elicit_decline_flow (line 290) | async def test_elicit_decline_flow(self): method test_elicit_with_pydantic_model (line 312) | async def test_elicit_with_pydantic_model(self): method test_handle_task_input_rejects_when_not_waiting (line 339) | async def test_handle_task_input_rejects_when_not_waiting(self): class TestAccessTokenInBackgroundTasks (line 362) | class TestAccessTokenInBackgroundTasks: method test_token_round_trips_through_background_task (line 372) | async def test_token_round_trips_through_background_task(self): method test_no_token_when_unauthenticated (line 399) | async def test_no_token_when_unauthenticated(self): method test_expired_token_returns_none (line 413) | async def test_expired_token_returns_none(self): method test_valid_token_with_future_expiry (line 428) | async def test_valid_token_with_future_expiry(self): method test_token_without_expiry_always_valid (line 445) | async def test_token_without_expiry_always_valid(self): class TestLifespanContextInBackgroundTasks (line 460) | class TestLifespanContextInBackgroundTasks: method test_lifespan_context_falls_back_to_server_result (line 463) | def test_lifespan_context_falls_back_to_server_result(self): method test_lifespan_context_returns_empty_dict_when_no_lifespan (line 475) | def test_lifespan_context_returns_empty_dict_when_no_lifespan(self): FILE: tests/server/tasks/test_custom_subclass_tasks.py class CustomTool (line 20) | class CustomTool(Tool): method run (line 26) | async def run(self, arguments: dict[str, Any]) -> ToolResult: class CustomToolWithLogic (line 30) | class CustomToolWithLogic(Tool): method run (line 39) | async def run(self, arguments: dict[str, Any]) -> ToolResult: class CustomToolForbidden (line 45) | class CustomToolForbidden(Tool): method run (line 50) | async def run(self, arguments: dict[str, Any]) -> ToolResult: function custom_tool_server (line 55) | def custom_tool_server(): function test_custom_tool_sync_execution (line 68) | async def test_custom_tool_sync_execution(custom_tool_server): function test_custom_tool_background_execution (line 75) | async def test_custom_tool_background_execution(custom_tool_server): function test_custom_tool_with_arguments (line 89) | async def test_custom_tool_with_arguments(custom_tool_server): function test_custom_tool_forbidden_sync_only (line 99) | async def test_custom_tool_forbidden_sync_only(custom_tool_server): function test_custom_tool_forbidden_rejects_task (line 107) | async def test_custom_tool_forbidden_rejects_task(custom_tool_server): function test_custom_tool_registers_with_docket (line 116) | async def test_custom_tool_registers_with_docket(): function test_custom_tool_forbidden_does_not_register (line 131) | async def test_custom_tool_forbidden_does_not_register(): class TestFastMCPComponentDocketMethods (line 147) | class TestFastMCPComponentDocketMethods: method test_default_task_config_is_forbidden (line 150) | def test_default_task_config_is_forbidden(self): method test_register_with_docket_is_noop (line 155) | def test_register_with_docket_is_noop(self): method test_add_to_docket_raises_when_forbidden (line 166) | async def test_add_to_docket_raises_when_forbidden(self): method test_add_to_docket_raises_not_implemented_when_allowed (line 174) | async def test_add_to_docket_raises_not_implemented_when_allowed(self): FILE: tests/server/tasks/test_notifications.py class NotificationCaptureHandler (line 23) | class NotificationCaptureHandler(MessageHandler): method __init__ (line 26) | def __init__(self) -> None: method on_notification (line 30) | async def on_notification(self, message: mcp_types.ServerNotification)... method for_method (line 33) | def for_method(self, method: str) -> list[mcp_types.ServerNotification]: class TestNotificationIntegration (line 41) | class TestNotificationIntegration: method test_notification_delivered_during_elicitation (line 51) | async def test_notification_delivered_during_elicitation(self): method test_subscriber_started_and_cleaned_up (line 114) | async def test_subscriber_started_and_cleaned_up(self): FILE: tests/server/tasks/test_progress_dependency.py function test_progress_in_immediate_execution (line 8) | async def test_progress_in_immediate_execution(): function test_progress_in_background_task (line 27) | async def test_progress_in_background_task(): function test_progress_tracks_multiple_increments (line 47) | async def test_progress_tracks_multiple_increments(): function test_progress_status_message_in_background_task (line 66) | async def test_progress_status_message_in_background_task(): function test_inmemory_progress_state (line 111) | async def test_inmemory_progress_state(): FILE: tests/server/tasks/test_resource_task_meta_parameter.py class TestResourceTaskMetaParameter (line 18) | class TestResourceTaskMetaParameter: method test_task_meta_none_returns_resource_result (line 21) | async def test_task_meta_none_returns_resource_result(self): method test_task_meta_none_on_task_enabled_resource_still_returns_result (line 33) | async def test_task_meta_none_on_task_enabled_resource_still_returns_r... method test_task_meta_on_forbidden_resource_raises_error (line 46) | async def test_task_meta_on_forbidden_resource_raises_error(self): method test_task_meta_fn_key_enrichment_for_resource (line 59) | async def test_task_meta_fn_key_enrichment_for_resource(self): method test_task_meta_fn_key_enrichment_for_template (line 66) | async def test_task_meta_fn_key_enrichment_for_template(self): class TestResourceTemplateTaslMeta (line 74) | class TestResourceTemplateTaslMeta: method test_template_task_meta_none_returns_resource_result (line 77) | async def test_template_task_meta_none_returns_resource_result(self): method test_template_task_meta_on_task_enabled_template_returns_result (line 89) | async def test_template_task_meta_on_task_enabled_template_returns_res... method test_template_task_meta_on_forbidden_template_raises_error (line 102) | async def test_template_task_meta_on_forbidden_template_raises_error(s... class TestResourceTaskMetaClientIntegration (line 116) | class TestResourceTaskMetaClientIntegration: method test_client_read_resource_without_task_gets_immediate_result (line 119) | async def test_client_read_resource_without_task_gets_immediate_result... method test_client_read_resource_with_task_creates_task (line 133) | async def test_client_read_resource_with_task_creates_task(self): method test_client_read_template_with_task_creates_task (line 152) | async def test_client_read_template_with_task_creates_task(self): class TestResourceTaskMetaDirectServerCall (line 172) | class TestResourceTaskMetaDirectServerCall: method test_resource_can_read_another_resource_with_task (line 175) | async def test_resource_can_read_another_resource_with_task(self): method test_resource_can_read_another_resource_synchronously (line 194) | async def test_resource_can_read_another_resource_synchronously(self): method test_resource_can_read_template_with_task (line 213) | async def test_resource_can_read_template_with_task(self): method test_resource_can_read_with_custom_ttl (line 230) | async def test_resource_can_read_with_custom_ttl(self): class TestResourceTaskMetaTypeNarrowing (line 251) | class TestResourceTaskMetaTypeNarrowing: method test_read_resource_without_task_meta_type_is_resource_result (line 254) | async def test_read_resource_without_task_meta_type_is_resource_result... method test_read_resource_with_task_meta_type_is_create_task_result (line 269) | async def test_read_resource_with_task_meta_type_is_create_task_result... FILE: tests/server/tasks/test_server_tasks_parameter.py function test_server_tasks_true_defaults_all_components (line 16) | async def test_server_tasks_true_defaults_all_components(): function test_server_tasks_false_defaults_all_components (line 54) | async def test_server_tasks_false_defaults_all_components(): function test_server_tasks_none_defaults_to_false (line 90) | async def test_server_tasks_none_defaults_to_false(): function test_component_explicit_false_overrides_server_true (line 107) | async def test_component_explicit_false_overrides_server_true(): function test_component_explicit_true_overrides_server_false (line 140) | async def test_component_explicit_true_overrides_server_false(): function test_mixed_explicit_and_inherited (line 170) | async def test_mixed_explicit_and_inherited(): function test_server_tasks_parameter_sets_component_defaults (line 252) | async def test_server_tasks_parameter_sets_component_defaults(): function test_resource_template_inherits_server_tasks_default (line 281) | async def test_resource_template_inherits_server_tasks_default(): function test_multiple_components_same_name_different_tasks (line 295) | async def test_multiple_components_same_name_different_tasks(): function test_task_with_custom_tool_name (line 320) | async def test_task_with_custom_tool_name(): function test_task_with_custom_resource_name (line 346) | async def test_task_with_custom_resource_name(): function test_task_with_custom_template_name (line 370) | async def test_task_with_custom_template_name(): FILE: tests/server/tasks/test_sync_function_task_disabled.py function test_sync_tool_with_explicit_task_true_raises (line 16) | async def test_sync_tool_with_explicit_task_true_raises(): function test_sync_tool_with_inherited_task_true_raises (line 30) | async def test_sync_tool_with_inherited_task_true_raises(): function test_sync_prompt_with_explicit_task_true_raises (line 44) | async def test_sync_prompt_with_explicit_task_true_raises(): function test_sync_prompt_with_inherited_task_true_raises (line 58) | async def test_sync_prompt_with_inherited_task_true_raises(): function test_sync_resource_with_explicit_task_true_raises (line 72) | async def test_sync_resource_with_explicit_task_true_raises(): function test_sync_resource_with_inherited_task_true_raises (line 86) | async def test_sync_resource_with_inherited_task_true_raises(): function test_async_tool_with_task_true_remains_enabled (line 100) | async def test_async_tool_with_task_true_remains_enabled(): function test_async_prompt_with_task_true_remains_enabled (line 115) | async def test_async_prompt_with_task_true_remains_enabled(): function test_async_resource_with_task_true_remains_enabled (line 130) | async def test_async_resource_with_task_true_remains_enabled(): function test_sync_tool_with_task_false_works (line 145) | async def test_sync_tool_with_task_false_works(): function test_sync_prompt_with_task_false_works (line 159) | async def test_sync_prompt_with_task_false_works(): function test_sync_resource_with_task_false_works (line 173) | async def test_sync_resource_with_task_false_works(): function test_async_callable_class_tool_with_task_true_works (line 192) | async def test_async_callable_class_tool_with_task_true_works(): function test_async_callable_class_prompt_with_task_true_works (line 205) | async def test_async_callable_class_prompt_with_task_true_works(): function test_sync_callable_class_tool_with_task_true_raises (line 218) | async def test_sync_callable_class_tool_with_task_true_raises(): FILE: tests/server/tasks/test_task_capabilities.py function test_capabilities_include_tasks (line 13) | async def test_capabilities_include_tasks(): function test_client_uses_task_capable_session (line 32) | async def test_client_uses_task_capable_session(): FILE: tests/server/tasks/test_task_config.py class TestTaskConfigNormalization (line 22) | class TestTaskConfigNormalization: method test_task_true_normalizes_to_optional (line 25) | async def test_task_true_normalizes_to_optional(self): method test_task_false_normalizes_to_forbidden (line 37) | async def test_task_false_normalizes_to_forbidden(self): method test_task_config_passed_directly (line 49) | async def test_task_config_passed_directly(self): method test_default_task_inherits_server_default (line 61) | async def test_default_task_inherits_server_default(self): class TestToolModeEnforcement (line 86) | class TestToolModeEnforcement: method server (line 90) | def server(self): method test_required_mode_without_task_returns_error (line 111) | async def test_required_mode_without_task_returns_error(self, server): method test_required_mode_with_task_succeeds (line 119) | async def test_required_mode_with_task_succeeds(self, server): method test_forbidden_mode_with_task_returns_error (line 127) | async def test_forbidden_mode_with_task_returns_error(self, server): method test_forbidden_mode_without_task_succeeds (line 139) | async def test_forbidden_mode_without_task_succeeds(self, server): method test_optional_mode_without_task_succeeds (line 145) | async def test_optional_mode_without_task_succeeds(self, server): method test_optional_mode_with_task_succeeds (line 151) | async def test_optional_mode_with_task_succeeds(self, server): class TestResourceModeEnforcement (line 160) | class TestResourceModeEnforcement: method server (line 164) | def server(self): method test_required_resource_without_task_returns_error (line 185) | async def test_required_resource_without_task_returns_error(self, serv... method test_required_resource_with_task_succeeds (line 196) | async def test_required_resource_with_task_succeeds(self, server): method test_forbidden_resource_without_task_succeeds (line 205) | async def test_forbidden_resource_without_task_succeeds(self, server): class TestPromptModeEnforcement (line 212) | class TestPromptModeEnforcement: method server (line 216) | def server(self): method test_required_prompt_without_task_returns_error (line 237) | async def test_required_prompt_without_task_returns_error(self, server): method test_required_prompt_with_task_succeeds (line 248) | async def test_required_prompt_with_task_succeeds(self, server): method test_forbidden_prompt_without_task_succeeds (line 257) | async def test_forbidden_prompt_without_task_succeeds(self, server): class TestToolExecutionMetadata (line 265) | class TestToolExecutionMetadata: method test_optional_tool_exposes_task_support (line 268) | async def test_optional_tool_exposes_task_support(self): method test_required_tool_exposes_task_support (line 283) | async def test_required_tool_exposes_task_support(self): method test_forbidden_tool_has_no_execution (line 298) | async def test_forbidden_tool_has_no_execution(self): class TestSyncFunctionValidation (line 312) | class TestSyncFunctionValidation: method test_sync_function_with_task_true_raises (line 315) | def test_sync_function_with_task_true_raises(self): method test_sync_function_with_required_mode_raises (line 325) | def test_sync_function_with_required_mode_raises(self): method test_sync_function_with_optional_mode_raises (line 335) | def test_sync_function_with_optional_mode_raises(self): method test_sync_function_with_forbidden_mode_ok (line 345) | async def test_sync_function_with_forbidden_mode_ok(self): class TestPollIntervalConfiguration (line 358) | class TestPollIntervalConfiguration: method test_default_poll_interval_is_5_seconds (line 361) | async def test_default_poll_interval_is_5_seconds(self): method test_custom_poll_interval_preserved (line 366) | async def test_custom_poll_interval_preserved(self): method test_tool_inherits_poll_interval (line 371) | async def test_tool_inherits_poll_interval(self): method test_task_true_uses_default_poll_interval (line 383) | async def test_task_true_uses_default_poll_interval(self): FILE: tests/server/tasks/test_task_dependencies.py function dependency_server (line 19) | async def dependency_server(): function test_background_tool_receives_docket_dependency (line 75) | async def test_background_tool_receives_docket_dependency(dependency_ser... function test_background_tool_receives_server_dependency (line 94) | async def test_background_tool_receives_server_dependency(dependency_ser... function test_background_tool_receives_custom_depends (line 114) | async def test_background_tool_receives_custom_depends(dependency_server): function test_background_tool_with_multiple_dependencies (line 135) | async def test_background_tool_with_multiple_dependencies(dependency_ser... function test_background_prompt_receives_dependencies (line 162) | async def test_background_prompt_receives_dependencies(dependency_server): function test_background_resource_receives_dependencies (line 182) | async def test_background_resource_receives_dependencies(dependency_serv... function test_foreground_tool_dependencies_unaffected (line 200) | async def test_foreground_tool_dependencies_unaffected(dependency_server): function test_dependency_context_managers_cleaned_up_in_background (line 217) | async def test_dependency_context_managers_cleaned_up_in_background(): function test_dependency_errors_propagate_to_task_failure (line 247) | async def test_dependency_errors_propagate_to_task_failure(): FILE: tests/server/tasks/test_task_elicitation_relay.py class TestElicitationRelay (line 29) | class TestElicitationRelay: method test_accept_via_elicitation_handler (line 32) | async def test_accept_via_elicitation_handler(self): method test_decline_via_elicitation_handler (line 52) | async def test_decline_via_elicitation_handler(self): method test_cancel_via_elicitation_handler (line 73) | async def test_cancel_via_elicitation_handler(self): method test_dataclass_round_trips_through_relay (line 92) | async def test_dataclass_round_trips_through_relay(self): method test_pydantic_model_round_trips_through_relay (line 117) | async def test_pydantic_model_round_trips_through_relay(self): method test_multiple_sequential_elicitations (line 143) | async def test_multiple_sequential_elicitations(self): method test_no_elicitation_handler_returns_cancel (line 175) | async def test_no_elicitation_handler_returns_cancel(self): FILE: tests/server/tasks/test_task_meta_parameter.py class TestTaskMetaParameter (line 19) | class TestTaskMetaParameter: method test_task_meta_none_returns_tool_result (line 22) | async def test_task_meta_none_returns_tool_result(self): method test_task_meta_none_on_task_enabled_tool_still_returns_tool_result (line 36) | async def test_task_meta_none_on_task_enabled_tool_still_returns_tool_... method test_task_meta_on_forbidden_tool_raises_error (line 51) | async def test_task_meta_on_forbidden_tool_raises_error(self): method test_task_meta_fn_key_auto_populated_in_call_tool (line 65) | async def test_task_meta_fn_key_auto_populated_in_call_tool(self): method test_task_meta_fn_key_enrichment_logic (line 86) | async def test_task_meta_fn_key_enrichment_logic(self): class TestTaskMetaTTL (line 95) | class TestTaskMetaTTL: method test_task_with_custom_ttl_creates_task (line 98) | async def test_task_with_custom_ttl_creates_task(self): method test_task_without_ttl_uses_default (line 120) | async def test_task_without_ttl_uses_default(self): class TrackingMiddleware (line 141) | class TrackingMiddleware(Middleware): method __init__ (line 144) | def __init__(self, calls: list[str]): method on_call_tool (line 148) | async def on_call_tool( class TestTaskMetaMiddleware (line 158) | class TestTaskMetaMiddleware: method test_task_meta_propagated_through_middleware (line 161) | async def test_task_meta_propagated_through_middleware(self): class TestTaskMetaClientIntegration (line 185) | class TestTaskMetaClientIntegration: method test_client_task_true_maps_to_task_meta (line 188) | async def test_client_task_true_maps_to_task_meta(self): method test_client_without_task_gets_immediate_result (line 209) | async def test_client_without_task_gets_immediate_result(self): method test_client_task_with_custom_ttl (line 224) | async def test_client_task_with_custom_ttl(self): class TestTaskMetaDirectServerCall (line 248) | class TestTaskMetaDirectServerCall: method test_tool_can_call_another_tool_with_task (line 251) | async def test_tool_can_call_another_tool_with_task(self): method test_tool_can_call_another_tool_synchronously (line 274) | async def test_tool_can_call_another_tool_synchronously(self): method test_tool_can_call_another_tool_with_custom_ttl (line 295) | async def test_tool_can_call_another_tool_with_custom_ttl(self): FILE: tests/server/tasks/test_task_metadata.py function metadata_server (line 15) | async def metadata_server(): function test_tasks_get_includes_related_task_metadata (line 26) | async def test_tasks_get_includes_related_task_metadata(metadata_server:... function test_tasks_result_includes_related_task_metadata (line 42) | async def test_tasks_result_includes_related_task_metadata(metadata_serv... function test_tasks_list_includes_related_task_metadata (line 55) | async def test_tasks_list_includes_related_task_metadata(metadata_server... FILE: tests/server/tasks/test_task_methods.py function endpoint_server (line 17) | async def endpoint_server(): function test_tasks_get_endpoint_returns_status (line 40) | async def test_tasks_get_endpoint_returns_status(endpoint_server): function test_tasks_get_endpoint_includes_poll_interval (line 59) | async def test_tasks_get_endpoint_includes_poll_interval(endpoint_server): function test_tasks_result_endpoint_returns_result_when_completed (line 69) | async def test_tasks_result_endpoint_returns_result_when_completed(endpo... function test_tasks_result_endpoint_errors_if_not_completed (line 79) | async def test_tasks_result_endpoint_errors_if_not_completed(endpoint_se... function test_tasks_result_endpoint_errors_if_task_not_found (line 100) | async def test_tasks_result_endpoint_errors_if_task_not_found(endpoint_s... function test_tasks_result_endpoint_returns_error_for_failed_task (line 108) | async def test_tasks_result_endpoint_returns_error_for_failed_task(endpo... function test_tasks_list_endpoint_session_isolation (line 126) | async def test_tasks_list_endpoint_session_isolation(endpoint_server): function test_get_status_nonexistent_task_raises_error (line 148) | async def test_get_status_nonexistent_task_raises_error(endpoint_server): function test_task_cancellation_workflow (line 157) | async def test_task_cancellation_workflow(endpoint_server): function test_task_cancellation_interrupts_running_coroutine (line 178) | async def test_task_cancellation_interrupts_running_coroutine(endpoint_s... FILE: tests/server/tasks/test_task_mount.py function reset_docket_memory_server (line 25) | def reset_docket_memory_server(): function child_server (line 42) | def child_server(): function parent_server (line 81) | def parent_server(child_server): function parent_server_no_prefix (line 97) | def parent_server_no_prefix(child_server): class TestMountedToolTasks (line 104) | class TestMountedToolTasks: method test_mounted_tool_task_returns_task_object (line 107) | async def test_mounted_tool_task_returns_task_object(self, parent_serv... method test_mounted_tool_task_executes_in_background (line 118) | async def test_mounted_tool_task_executes_in_background(self, parent_s... method test_mounted_tool_task_returns_correct_result (line 126) | async def test_mounted_tool_task_returns_correct_result( method test_mounted_tool_task_status (line 136) | async def test_mounted_tool_task_status(self, parent_server): method test_mounted_tool_task_cancellation (line 155) | async def test_mounted_tool_task_cancellation(self, parent_server): method test_graceful_degradation_sync_mounted_tool (line 172) | async def test_graceful_degradation_sync_mounted_tool(self, parent_ser... method test_parent_and_mounted_tools_both_work (line 185) | async def test_parent_and_mounted_tools_both_work(self, parent_server): class TestMountedToolTasksNoPrefix (line 202) | class TestMountedToolTasksNoPrefix: method test_mounted_tool_without_prefix_task_works (line 205) | async def test_mounted_tool_without_prefix_task_works( class TestMountedPromptTasks (line 219) | class TestMountedPromptTasks: method test_mounted_prompt_task_returns_task_object (line 222) | async def test_mounted_prompt_task_returns_task_object(self, parent_se... method test_mounted_prompt_task_executes_in_background (line 234) | async def test_mounted_prompt_task_executes_in_background(self, parent... method test_mounted_prompt_task_returns_correct_result (line 243) | async def test_mounted_prompt_task_returns_correct_result( class TestMountedResourceTasks (line 257) | class TestMountedResourceTasks: method test_mounted_resource_task_returns_task_object (line 260) | async def test_mounted_resource_task_returns_task_object(self, parent_... method test_mounted_resource_task_executes_in_background (line 270) | async def test_mounted_resource_task_executes_in_background(self, pare... method test_mounted_resource_task_returns_correct_result (line 277) | async def test_mounted_resource_task_returns_correct_result(self, pare... method test_mounted_resource_template_task (line 286) | async def test_mounted_resource_template_task(self, parent_server): class TestMountedTaskDependencies (line 298) | class TestMountedTaskDependencies: method test_mounted_task_receives_docket_dependency (line 301) | async def test_mounted_task_receives_docket_dependency(self): method test_mounted_task_receives_server_dependency (line 322) | async def test_mounted_task_receives_server_dependency(self): class TestMultipleMounts (line 345) | class TestMultipleMounts: method test_tasks_work_with_multiple_mounts (line 348) | async def test_tasks_work_with_multiple_mounts(self): class TestMountedFunctionNameCollisions (line 378) | class TestMountedFunctionNameCollisions: method test_multiple_mounts_with_same_function_names (line 381) | async def test_multiple_mounts_with_same_function_names(self): method test_no_prefix_mount_collision (line 409) | async def test_no_prefix_mount_collision(self): method test_nested_mount_prefix_accumulation (line 432) | async def test_nested_mount_prefix_accumulation(self): class TestMountedTaskList (line 452) | class TestMountedTaskList: method test_list_tasks_includes_mounted_tasks (line 455) | async def test_list_tasks_includes_mounted_tasks(self, parent_server): class TestMountedTaskConfigModes (line 476) | class TestMountedTaskConfigModes: method child_with_modes (line 480) | def child_with_modes(self): method parent_with_modes (line 502) | def parent_with_modes(self, child_with_modes): method test_optional_mode_sync_through_mount (line 508) | async def test_optional_mode_sync_through_mount(self, parent_with_modes): method test_optional_mode_task_through_mount (line 514) | async def test_optional_mode_task_through_mount(self, parent_with_modes): method test_required_mode_with_task_through_mount (line 522) | async def test_required_mode_with_task_through_mount(self, parent_with... method test_required_mode_without_task_through_mount (line 530) | async def test_required_mode_without_task_through_mount(self, parent_w... method test_forbidden_mode_sync_through_mount (line 540) | async def test_forbidden_mode_sync_through_mount(self, parent_with_mod... method test_forbidden_mode_with_task_through_mount (line 546) | async def test_forbidden_mode_with_task_through_mount(self, parent_wit... class ToolTracingMiddleware (line 564) | class ToolTracingMiddleware(Middleware): method __init__ (line 567) | def __init__(self, name: str, calls: list[str]): method on_call_tool (line 572) | async def on_call_tool( class ResourceTracingMiddleware (line 583) | class ResourceTracingMiddleware(Middleware): method __init__ (line 586) | def __init__(self, name: str, calls: list[str]): method on_read_resource (line 591) | async def on_read_resource( class PromptTracingMiddleware (line 602) | class PromptTracingMiddleware(Middleware): method __init__ (line 605) | def __init__(self, name: str, calls: list[str]): method on_get_prompt (line 610) | async def on_get_prompt( class TestMiddlewareWithMountedTasks (line 621) | class TestMiddlewareWithMountedTasks: method test_tool_middleware_runs_with_background_task (line 629) | async def test_tool_middleware_runs_with_background_task(self): method test_resource_middleware_runs_with_background_task (line 667) | async def test_resource_middleware_runs_with_background_task(self): method test_prompt_middleware_runs_with_background_task (line 704) | async def test_prompt_middleware_runs_with_background_task(self): method test_resource_template_middleware_runs_with_background_task (line 741) | async def test_resource_template_middleware_runs_with_background_task(... class TestMountedTasksWithTaskMetaParameter (line 779) | class TestMountedTasksWithTaskMetaParameter: method test_mounted_tool_with_task_meta_creates_task (line 790) | async def test_mounted_tool_with_task_meta_creates_task(self): method test_mounted_resource_with_task_meta_creates_task (line 815) | async def test_mounted_resource_with_task_meta_creates_task(self): method test_mounted_template_with_task_meta_creates_task (line 839) | async def test_mounted_template_with_task_meta_creates_task(self): method test_deeply_nested_tool_with_task_meta (line 863) | async def test_deeply_nested_tool_with_task_meta(self): method test_deeply_nested_template_with_task_meta (line 890) | async def test_deeply_nested_template_with_task_meta(self): method test_mounted_prompt_with_task_meta_creates_task (line 917) | async def test_mounted_prompt_with_task_meta_creates_task(self): method test_deeply_nested_prompt_with_task_meta (line 941) | async def test_deeply_nested_prompt_with_task_meta(self): FILE: tests/server/tasks/test_task_prompts.py function prompt_server (line 15) | async def prompt_server(): function test_synchronous_prompt_unchanged (line 32) | async def test_synchronous_prompt_unchanged(prompt_server): function test_prompt_with_task_metadata_returns_immediately (line 42) | async def test_prompt_with_task_metadata_returns_immediately(prompt_serv... function test_prompt_task_executes_in_background (line 54) | async def test_prompt_task_executes_in_background(prompt_server): function test_forbidden_mode_prompt_rejects_task_calls (line 71) | async def test_forbidden_mode_prompt_rejects_task_calls(prompt_server): FILE: tests/server/tasks/test_task_protocol.py function task_enabled_server (line 15) | async def task_enabled_server(): function test_task_metadata_includes_task_id_and_ttl (line 32) | async def test_task_metadata_includes_task_id_and_ttl(task_enabled_server): function test_task_notification_sent_after_submission (line 50) | async def test_task_notification_sent_after_submission(task_enabled_serv... function test_failed_task_stores_error (line 67) | async def test_failed_task_stores_error(task_enabled_server): FILE: tests/server/tasks/test_task_proxy.py function backend_server (line 24) | def backend_server() -> FastMCP: function proxy_server (line 61) | def proxy_server(backend_server: FastMCP) -> FastMCP: class TestProxyToolsSyncExecution (line 66) | class TestProxyToolsSyncExecution: method test_tool_sync_execution_works (line 69) | async def test_tool_sync_execution_works(self, proxy_server: FastMCP): method test_sync_only_tool_works (line 75) | async def test_sync_only_tool_works(self, proxy_server: FastMCP): class TestProxyToolsTaskForbidden (line 82) | class TestProxyToolsTaskForbidden: method test_tool_task_returns_error_immediately (line 85) | async def test_tool_task_returns_error_immediately(self, proxy_server:... method test_sync_only_tool_task_returns_error_immediately (line 97) | async def test_sync_only_tool_task_returns_error_immediately( class TestProxyPromptsSyncExecution (line 111) | class TestProxyPromptsSyncExecution: method test_prompt_sync_execution_works (line 114) | async def test_prompt_sync_execution_works(self, proxy_server: FastMCP): class TestProxyPromptsTaskForbidden (line 122) | class TestProxyPromptsTaskForbidden: method test_prompt_task_raises_mcp_error (line 125) | async def test_prompt_task_raises_mcp_error(self, proxy_server: FastMCP): class TestProxyResourcesSyncExecution (line 134) | class TestProxyResourcesSyncExecution: method test_resource_sync_execution_works (line 137) | async def test_resource_sync_execution_works(self, proxy_server: FastM... method test_resource_template_sync_execution_works (line 144) | async def test_resource_template_sync_execution_works(self, proxy_serv... class TestProxyResourcesTaskForbidden (line 152) | class TestProxyResourcesTaskForbidden: method test_resource_task_raises_mcp_error (line 155) | async def test_resource_task_raises_mcp_error(self, proxy_server: Fast... method test_resource_template_task_raises_mcp_error (line 163) | async def test_resource_template_task_raises_mcp_error(self, proxy_ser... FILE: tests/server/tasks/test_task_resources.py function resource_server (line 15) | async def resource_server(): function test_synchronous_resource_unchanged (line 37) | async def test_synchronous_resource_unchanged(resource_server): function test_resource_with_task_metadata_returns_immediately (line 47) | async def test_resource_with_task_metadata_returns_immediately(resource_... function test_resource_task_executes_in_background (line 59) | async def test_resource_task_executes_in_background(resource_server): function test_resource_template_with_task (line 73) | async def test_resource_template_with_task(resource_server): function test_forbidden_mode_resource_rejects_task_calls (line 86) | async def test_forbidden_mode_resource_rejects_task_calls(resource_server): FILE: tests/server/tasks/test_task_return_types.py class UserData (line 24) | class UserData(BaseModel): function return_type_server (line 33) | async def return_type_server(): function test_task_basic_types (line 92) | async def test_task_basic_types( function test_task_model_return (line 106) | async def test_task_model_return(return_type_server): function test_task_vs_immediate_equivalence (line 119) | async def test_task_vs_immediate_equivalence(return_type_server): function prompt_return_server (line 140) | async def prompt_return_server(): function test_prompt_task_single_message (line 161) | async def test_prompt_task_single_message(prompt_return_server): function test_prompt_task_multiple_messages (line 171) | async def test_prompt_task_multiple_messages(prompt_return_server): function resource_return_server (line 184) | async def resource_return_server(): function test_resource_task_text_content (line 203) | async def test_resource_task_text_content(resource_return_server): function test_resource_task_json_content (line 213) | async def test_resource_task_json_content(resource_return_server): function binary_type_server (line 233) | async def binary_type_server(): function test_task_binary_types (line 281) | async def test_task_binary_types( function collection_server (line 301) | async def collection_server(): function test_task_collection_types (line 332) | async def test_task_collection_types( function test_task_empty_dict_return (line 346) | async def test_task_empty_dict_return(collection_server): function media_server (line 363) | async def media_server(tmp_path): function test_task_media_types (line 421) | async def test_task_media_types( class PersonTypedDict (line 438) | class PersonTypedDict(TypedDict): class PersonDataclass (line 446) | class PersonDataclass: function structured_type_server (line 454) | async def structured_type_server(): function test_task_structured_dict_types (line 492) | async def test_task_structured_dict_types( function test_task_union_types (line 514) | async def test_task_union_types( function test_task_optional_types (line 535) | async def test_task_optional_types( function mcp_content_server (line 555) | async def mcp_content_server(tmp_path): function test_task_mcp_content_types (line 648) | async def test_task_mcp_content_types( function test_task_mixed_content_return (line 660) | async def test_task_mixed_content_return(mcp_content_server): FILE: tests/server/tasks/test_task_security.py function task_server (line 15) | async def task_server(): function test_same_session_can_access_all_its_tasks (line 27) | async def test_same_session_can_access_all_its_tasks(task_server): FILE: tests/server/tasks/test_task_status_notifications.py function notification_server (line 21) | async def notification_server(): function test_subscription_spawned_for_tool_task (line 56) | async def test_subscription_spawned_for_tool_task(notification_server: F... function test_subscription_handles_task_completion (line 70) | async def test_subscription_handles_task_completion(notification_server:... function test_subscription_handles_task_failure (line 92) | async def test_subscription_handles_task_failure(notification_server: Fa... function test_subscription_for_prompt_tasks (line 105) | async def test_subscription_for_prompt_tasks(notification_server: FastMCP): function test_subscription_for_resource_tasks (line 118) | async def test_subscription_for_resource_tasks(notification_server: Fast... function test_subscriptions_cleanup_on_session_disconnect (line 130) | async def test_subscriptions_cleanup_on_session_disconnect( function test_multiple_concurrent_subscriptions (line 146) | async def test_multiple_concurrent_subscriptions(notification_server: Fa... FILE: tests/server/tasks/test_task_tools.py function tool_server (line 18) | async def tool_server(): function test_synchronous_tool_call_unchanged (line 35) | async def test_synchronous_tool_call_unchanged(tool_server): function test_tool_with_task_metadata_returns_immediately (line 45) | async def test_tool_with_task_metadata_returns_immediately(tool_server): function test_tool_task_executes_in_background (line 58) | async def test_tool_task_executes_in_background(tool_server): function test_forbidden_mode_tool_rejects_task_calls (line 90) | async def test_forbidden_mode_tool_rejects_task_calls(tool_server): FILE: tests/server/tasks/test_task_ttl.py function keepalive_server (line 17) | async def keepalive_server(): function test_keepalive_returned_in_submitted_state (line 33) | async def test_keepalive_returned_in_submitted_state(keepalive_server: F... function test_keepalive_returned_in_completed_state (line 56) | async def test_keepalive_returned_in_completed_state(keepalive_server: F... function test_default_keepalive_when_not_specified (line 78) | async def test_default_keepalive_when_not_specified(keepalive_server: Fa... FILE: tests/server/telemetry/test_provider_tracing.py class TestFastMCPProviderTracing (line 10) | class TestFastMCPProviderTracing: method test_mounted_tool_creates_delegate_span (line 13) | async def test_mounted_tool_creates_delegate_span( method test_mounted_resource_creates_delegate_span (line 48) | async def test_mounted_resource_creates_delegate_span( method test_mounted_prompt_creates_delegate_span (line 74) | async def test_mounted_prompt_creates_delegate_span( class TestProviderSpanHierarchy (line 104) | class TestProviderSpanHierarchy: method test_delegate_span_is_child_of_server_span (line 107) | async def test_delegate_span_is_child_of_server_span( FILE: tests/server/telemetry/test_server_tracing.py class TestToolTracing (line 16) | class TestToolTracing: method test_call_tool_creates_span (line 17) | async def test_call_tool_creates_span(self, trace_exporter: InMemorySp... method test_call_tool_with_error_sets_status (line 45) | async def test_call_tool_with_error_sets_status( method test_call_nonexistent_tool_sets_error (line 65) | async def test_call_nonexistent_tool_sets_error( class TestResourceTracing (line 81) | class TestResourceTracing: method test_read_resource_creates_span (line 82) | async def test_read_resource_creates_span( method test_read_resource_template_creates_span (line 113) | async def test_read_resource_template_creates_span( method test_read_nonexistent_resource_sets_error (line 144) | async def test_read_nonexistent_resource_sets_error( class TestPromptTracing (line 160) | class TestPromptTracing: method test_render_prompt_creates_span (line 161) | async def test_render_prompt_creates_span( method test_render_nonexistent_prompt_sets_error (line 191) | async def test_render_nonexistent_prompt_sets_error( class TestAuthAttributesOnSpans (line 207) | class TestAuthAttributesOnSpans: method test_tool_span_includes_auth_attributes_when_authenticated (line 208) | async def test_tool_span_includes_auth_attributes_when_authenticated( method test_resource_span_includes_auth_attributes_when_authenticated (line 236) | async def test_resource_span_includes_auth_attributes_when_authenticated( method test_prompt_span_includes_auth_attributes_when_authenticated (line 264) | async def test_prompt_span_includes_auth_attributes_when_authenticated( method test_span_omits_auth_attributes_when_not_authenticated (line 292) | async def test_span_omits_auth_attributes_when_not_authenticated( method test_span_omits_scope_when_no_scopes (line 313) | async def test_span_omits_scope_when_no_scopes( FILE: tests/server/test_app_state.py function test_http_app_sets_mcp_server_state (line 5) | def test_http_app_sets_mcp_server_state(): function test_http_app_sse_sets_mcp_server_state (line 11) | def test_http_app_sse_sets_mcp_server_state(): function test_create_streamable_http_app_sets_state (line 17) | def test_create_streamable_http_app_sets_state(): function test_create_sse_app_sets_state (line 23) | def test_create_sse_app_sets_state(): FILE: tests/server/test_auth_integration.py class MockOAuthProvider (line 34) | class MockOAuthProvider(OAuthAuthorizationServerProvider): method __init__ (line 35) | def __init__(self): method get_client (line 41) | async def get_client(self, client_id: str) -> OAuthClientInformationFu... method register_client (line 44) | async def register_client(self, client_info: OAuthClientInformationFull): method authorize (line 47) | async def authorize( method load_authorization_code (line 69) | async def load_authorization_code( method exchange_authorization_code (line 74) | async def exchange_authorization_code( method load_refresh_token (line 106) | async def load_refresh_token( method exchange_refresh_token (line 126) | async def exchange_refresh_token( method load_access_token (line 172) | async def load_access_token(self, token: str) -> AccessToken | None: method revoke_token (line 186) | async def revoke_token(self, token: AccessToken | RefreshToken) -> None: function mock_oauth_provider (line 203) | def mock_oauth_provider(): function auth_app (line 208) | def auth_app(mock_oauth_provider): function test_client (line 229) | async def test_client(auth_app): function registered_client (line 237) | async def registered_client(test_client: httpx.AsyncClient, request): function pkce_challenge (line 264) | def pkce_challenge(): function auth_code (line 277) | async def auth_code(test_client, registered_client, pkce_challenge, requ... function tokens (line 318) | async def tokens(test_client, registered_client, auth_code, pkce_challen... class TestAuthEndpoints (line 349) | class TestAuthEndpoints: method test_metadata_endpoint (line 350) | async def test_metadata_endpoint(self, test_client: httpx.AsyncClient): method test_token_validation_error (line 379) | async def test_token_validation_error(self, test_client: httpx.AsyncCl... method test_token_invalid_auth_code (line 396) | async def test_token_invalid_auth_code( method test_token_expired_auth_code (line 422) | async def test_token_expired_auth_code( method test_token_redirect_uri_mismatch (line 478) | async def test_token_redirect_uri_mismatch( method test_token_code_verifier_mismatch (line 500) | async def test_token_code_verifier_mismatch( method test_token_invalid_refresh_token (line 522) | async def test_token_invalid_refresh_token(self, test_client, register... method test_token_expired_refresh_token (line 539) | async def test_token_expired_refresh_token( method test_token_invalid_scope (line 589) | async def test_token_invalid_scope( method test_client_registration (line 626) | async def test_client_registration( method test_client_registration_missing_required_fields (line 653) | async def test_client_registration_missing_required_fields( method test_client_registration_invalid_uri (line 673) | async def test_client_registration_invalid_uri( method test_client_registration_empty_redirect_uris (line 695) | async def test_client_registration_empty_redirect_uris( method test_authorize_form_post (line 717) | async def test_authorize_form_post( method test_authorization_get (line 760) | async def test_authorization_get( method test_revoke_invalid_token (line 874) | async def test_revoke_invalid_token(self, test_client, registered_clie... method test_revoke_with_malformed_token (line 887) | async def test_revoke_with_malformed_token(self, test_client, register... method test_client_registration_disallowed_scopes (line 902) | async def test_client_registration_disallowed_scopes( method test_client_registration_default_scopes (line 923) | async def test_client_registration_default_scopes( method test_client_registration_invalid_grant_type (line 951) | async def test_client_registration_invalid_grant_type( FILE: tests/server/test_auth_integration_errors.py class MockOAuthProvider (line 33) | class MockOAuthProvider(OAuthAuthorizationServerProvider): method __init__ (line 34) | def __init__(self): method get_client (line 40) | async def get_client(self, client_id: str) -> OAuthClientInformationFu... method register_client (line 43) | async def register_client(self, client_info: OAuthClientInformationFull): method authorize (line 46) | async def authorize( method load_authorization_code (line 68) | async def load_authorization_code( method exchange_authorization_code (line 73) | async def exchange_authorization_code( method load_refresh_token (line 105) | async def load_refresh_token( method exchange_refresh_token (line 125) | async def exchange_refresh_token( method load_access_token (line 171) | async def load_access_token(self, token: str) -> AccessToken | None: method revoke_token (line 181) | async def revoke_token(self, token: AccessToken | RefreshToken) -> None: function mock_oauth_provider (line 198) | def mock_oauth_provider(): function auth_app (line 203) | def auth_app(mock_oauth_provider): function test_client (line 224) | async def test_client(auth_app): function registered_client (line 232) | async def registered_client(test_client: httpx.AsyncClient, request): function pkce_challenge (line 259) | def pkce_challenge(): class TestAuthorizeEndpointErrors (line 271) | class TestAuthorizeEndpointErrors: method test_authorize_missing_client_id (line 274) | async def test_authorize_missing_client_id( method test_authorize_invalid_client_id (line 299) | async def test_authorize_invalid_client_id( method test_authorize_missing_redirect_uri (line 324) | async def test_authorize_missing_redirect_uri( method test_authorize_invalid_redirect_uri (line 349) | async def test_authorize_invalid_redirect_uri( method test_authorize_missing_redirect_uri_multiple_registered (line 388) | async def test_authorize_missing_redirect_uri_multiple_registered( method test_authorize_unsupported_response_type (line 413) | async def test_authorize_unsupported_response_type( method test_authorize_missing_response_type (line 446) | async def test_authorize_missing_response_type( method test_authorize_missing_pkce_challenge (line 478) | async def test_authorize_missing_pkce_challenge( method test_authorize_invalid_scope (line 508) | async def test_authorize_invalid_scope( FILE: tests/server/test_context.py function context (line 17) | def context(): class TestParseModelPreferences (line 21) | class TestParseModelPreferences: method test_parse_model_preferences_string (line 22) | def test_parse_model_preferences_string(self, context): method test_parse_model_preferences_list (line 28) | def test_parse_model_preferences_list(self, context): method test_parse_model_preferences_object (line 34) | def test_parse_model_preferences_object(self, context): method test_parse_model_preferences_invalid_type (line 38) | def test_parse_model_preferences_invalid_type(self, context): class TestSessionId (line 43) | class TestSessionId: method test_session_id_with_http_headers (line 44) | def test_session_id_with_http_headers(self, context): method test_session_id_without_http_headers (line 66) | def test_session_id_without_http_headers(self, context): class TestContextState (line 97) | class TestContextState: method test_context_state_basic (line 100) | async def test_context_state_basic(self): method test_context_state_session_isolation (line 126) | async def test_context_state_session_isolation(self): method test_context_state_persists_across_requests (line 145) | async def test_context_state_persists_across_requests(self): method test_context_state_nested_contexts_share_state (line 164) | async def test_context_state_nested_contexts_share_state(self): method test_two_clients_same_key_isolated_by_session (line 182) | async def test_two_clients_same_key_isolated_by_session(self): class TestContextStateSerializable (line 245) | class TestContextStateSerializable: method test_set_state_serializable_false_stores_arbitrary_objects (line 248) | async def test_set_state_serializable_false_stores_arbitrary_objects(s... method test_set_state_serializable_false_does_not_persist_across_requests (line 265) | async def test_set_state_serializable_false_does_not_persist_across_re... method test_set_state_serializable_true_rejects_non_serializable (line 277) | async def test_set_state_serializable_true_rejects_non_serializable(se... method test_set_state_serializable_false_shadows_session_state (line 286) | async def test_set_state_serializable_false_shadows_session_state(self): method test_delete_state_removes_from_both_stores (line 298) | async def test_delete_state_removes_from_both_stores(self): method test_serializable_state_still_persists_across_requests (line 311) | async def test_serializable_state_still_persists_across_requests(self): method test_serializable_write_clears_request_scoped_shadow (line 322) | async def test_serializable_write_clears_request_scoped_shadow(self): class TestContextMeta (line 336) | class TestContextMeta: method test_request_context_meta_access (line 339) | def test_request_context_meta_access(self, context): method test_request_context_meta_none (line 371) | def test_request_context_meta_none(self, context): class TestTransport (line 392) | class TestTransport: method test_transport_returns_none_outside_server_context (line 395) | def test_transport_returns_none_outside_server_context(self, context): method test_transport_returns_stdio (line 399) | def test_transport_returns_stdio(self, context): method test_transport_returns_sse (line 407) | def test_transport_returns_sse(self, context): method test_transport_returns_streamable_http (line 415) | def test_transport_returns_streamable_http(self, context): method test_transport_reset (line 423) | def test_transport_reset(self, context): class TestTransportIntegration (line 432) | class TestTransportIntegration: method test_transport_in_tool_via_client (line 435) | async def test_transport_in_tool_via_client(self): method test_transport_set_manually_is_visible_in_tool (line 455) | async def test_transport_set_manually_is_visible_in_tool(self): method test_transport_set_via_http_middleware (line 478) | async def test_transport_set_via_http_middleware(self): FILE: tests/server/test_dependencies.py class Connection (line 17) | class Connection: method __init__ (line 20) | def __init__(self): method __aenter__ (line 23) | async def __aenter__(self): method __aexit__ (line 27) | async def __aexit__(self, exc_type, exc_val, exc_tb): function get_connection (line 32) | async def get_connection(): function mcp (line 39) | def mcp(): function test_depends_with_sync_function (line 44) | async def test_depends_with_sync_function(mcp: FastMCP): function test_depends_with_async_function (line 63) | async def test_depends_with_async_function(mcp: FastMCP): function test_depends_with_async_context_manager (line 78) | async def test_depends_with_async_context_manager(mcp: FastMCP): function test_nested_dependencies (line 104) | async def test_nested_dependencies(mcp: FastMCP): function test_dependencies_excluded_from_schema (line 127) | async def test_dependencies_excluded_from_schema(mcp: FastMCP): function test_current_context_dependency (line 148) | async def test_current_context_dependency(mcp: FastMCP): function test_current_context_and_legacy_context_coexist (line 161) | async def test_current_context_and_legacy_context_coexist(mcp: FastMCP): function test_backward_compat_context_still_works (line 179) | async def test_backward_compat_context_still_works(mcp: FastMCP): function test_sync_tool_with_async_dependency (line 194) | async def test_sync_tool_with_async_dependency(mcp: FastMCP): function test_dependency_caching (line 209) | async def test_dependency_caching(mcp: FastMCP): function test_context_and_depends_together (line 231) | async def test_context_and_depends_together(mcp: FastMCP): function test_resource_with_dependency (line 257) | async def test_resource_with_dependency(mcp: FastMCP): function test_resource_with_context_and_dependency (line 272) | async def test_resource_with_context_and_dependency(mcp: FastMCP): function test_prompt_with_dependency (line 291) | async def test_prompt_with_dependency(mcp: FastMCP): function test_prompt_with_context_and_dependency (line 309) | async def test_prompt_with_context_and_dependency(mcp: FastMCP): function test_resource_template_with_dependency (line 332) | async def test_resource_template_with_dependency(mcp: FastMCP): function test_resource_template_with_context_and_dependency (line 347) | async def test_resource_template_with_context_and_dependency(mcp: FastMCP): function test_async_tool_context_manager_stays_open (line 369) | async def test_async_tool_context_manager_stays_open(mcp: FastMCP): function test_async_resource_context_manager_stays_open (line 389) | async def test_async_resource_context_manager_stays_open(mcp: FastMCP): function test_async_resource_template_context_manager_stays_open (line 401) | async def test_async_resource_template_context_manager_stays_open(mcp: F... function test_async_prompt_context_manager_stays_open (line 417) | async def test_async_prompt_context_manager_stays_open(mcp: FastMCP): function test_argument_validation_with_dependencies (line 435) | async def test_argument_validation_with_dependencies(mcp: FastMCP): function test_connection_dependency_excluded_from_tool_schema (line 460) | async def test_connection_dependency_excluded_from_tool_schema(mcp: Fast... function test_sync_tool_context_manager_stays_open (line 477) | async def test_sync_tool_context_manager_stays_open(mcp: FastMCP): function test_sync_resource_context_manager_stays_open (line 503) | async def test_sync_resource_context_manager_stays_open(mcp: FastMCP): function test_sync_resource_template_context_manager_stays_open (line 525) | async def test_sync_resource_template_context_manager_stays_open(mcp: Fa... function test_sync_prompt_context_manager_stays_open (line 551) | async def test_sync_prompt_context_manager_stays_open(mcp: FastMCP): function test_external_user_cannot_override_dependency (line 579) | async def test_external_user_cannot_override_dependency(mcp: FastMCP): function test_prompt_dependency_cannot_be_overridden_externally (line 608) | async def test_prompt_dependency_cannot_be_overridden_externally(mcp: Fa... function test_resource_dependency_cannot_be_overridden_externally (line 642) | async def test_resource_dependency_cannot_be_overridden_externally(mcp: ... function test_resource_template_dependency_cannot_be_overridden_externally (line 661) | async def test_resource_template_dependency_cannot_be_overridden_externa... function test_resource_template_uri_cannot_match_dependency_name (line 686) | async def test_resource_template_uri_cannot_match_dependency_name(mcp: F... function test_toolerror_propagates_from_dependency (line 705) | async def test_toolerror_propagates_from_dependency(mcp: FastMCP): function test_validation_error_propagates_from_dependency (line 729) | async def test_validation_error_propagates_from_dependency(mcp: FastMCP): class TestDependencyInjection (line 751) | class TestDependencyInjection: method test_is_docket_available (line 754) | def test_is_docket_available(self): method test_require_docket_passes_when_installed (line 760) | def test_require_docket_passes_when_installed(self): method test_dependency_class_exists (line 766) | def test_dependency_class_exists(self): method test_depends_works (line 773) | def test_depends_works(self): method test_depends_import_from_fastmcp (line 786) | async def test_depends_import_from_fastmcp(self): method test_get_dependency_parameters (line 796) | def test_get_dependency_parameters(self): class TestAuthDependencies (line 816) | class TestAuthDependencies: method test_current_access_token_is_importable (line 819) | def test_current_access_token_is_importable(self): method test_token_claim_is_importable (line 825) | def test_token_claim_is_importable(self): method test_current_access_token_is_dependency (line 831) | def test_current_access_token_is_dependency(self): method test_token_claim_creates_dependency (line 839) | def test_token_claim_creates_dependency(self): method test_current_access_token_raises_without_token (line 849) | async def test_current_access_token_raises_without_token(self): method test_token_claim_raises_without_token (line 857) | async def test_token_claim_raises_without_token(self): method test_current_access_token_excluded_from_tool_schema (line 865) | async def test_current_access_token_excluded_from_tool_schema(self, mc... method test_token_claim_excluded_from_tool_schema (line 885) | async def test_token_claim_excluded_from_tool_schema(self, mcp: FastMCP): method test_current_access_token_exported_from_all (line 904) | def test_current_access_token_exported_from_all(self): method test_token_claim_exported_from_all (line 910) | def test_token_claim_exported_from_all(self): class TestSharedDependencies (line 917) | class TestSharedDependencies: method test_shared_sync_function (line 920) | async def test_shared_sync_function(self, mcp: FastMCP): method test_shared_async_function (line 946) | async def test_shared_async_function(self, mcp: FastMCP): method test_shared_async_context_manager (line 972) | async def test_shared_async_context_manager(self, mcp: FastMCP): method test_shared_with_depends (line 1001) | async def test_shared_with_depends(self, mcp: FastMCP): method test_shared_excluded_from_schema (line 1033) | async def test_shared_excluded_from_schema(self, mcp: FastMCP): method test_shared_in_resource (line 1049) | async def test_shared_in_resource(self, mcp: FastMCP): method test_shared_in_prompt (line 1071) | async def test_shared_in_prompt(self, mcp: FastMCP): FILE: tests/server/test_dependencies_advanced.py class Connection (line 14) | class Connection: method __init__ (line 17) | def __init__(self): method __aenter__ (line 20) | async def __aenter__(self): method __aexit__ (line 24) | async def __aexit__(self, exc_type, exc_val, exc_tb): function mcp (line 29) | def mcp(): class TestTransformContextAnnotations (line 34) | class TestTransformContextAnnotations: method test_optional_context_degrades_to_none_without_active_context (line 37) | async def test_optional_context_degrades_to_none_without_active_contex... method test_optional_context_still_injected_in_foreground_requests (line 54) | async def test_optional_context_still_injected_in_foreground_requests( method test_basic_context_transformation (line 71) | async def test_basic_context_transformation(self, mcp: FastMCP): method test_transform_with_var_params (line 83) | async def test_transform_with_var_params(self): method test_context_keyword_only (line 107) | async def test_context_keyword_only(self, mcp: FastMCP): method test_context_with_annotated (line 132) | async def test_context_with_annotated(self, mcp: FastMCP): method test_context_already_has_dependency_default (line 146) | async def test_context_already_has_dependency_default(self, mcp: FastM... method test_multiple_context_params (line 161) | async def test_multiple_context_params(self, mcp: FastMCP): method test_context_in_class_method (line 179) | async def test_context_in_class_method(self, mcp: FastMCP): method test_context_in_static_method (line 197) | async def test_context_in_static_method(self, mcp: FastMCP): method test_context_in_callable_class (line 212) | async def test_context_in_callable_class(self, mcp: FastMCP): method test_context_param_reordering (line 232) | async def test_context_param_reordering(self, mcp: FastMCP): method test_context_resource (line 251) | async def test_context_resource(self, mcp: FastMCP): method test_context_resource_template (line 263) | async def test_context_resource_template(self, mcp: FastMCP): method test_context_prompt (line 276) | async def test_context_prompt(self, mcp: FastMCP): FILE: tests/server/test_event_store.py class TestEventEntry (line 10) | class TestEventEntry: method test_event_entry_with_message (line 11) | def test_event_entry_with_message(self): method test_event_entry_without_message (line 21) | def test_event_entry_without_message(self): class TestStreamEventList (line 30) | class TestStreamEventList: method test_stream_event_list (line 31) | def test_stream_event_list(self): method test_stream_event_list_empty (line 35) | def test_stream_event_list_empty(self): class TestEventStore (line 40) | class TestEventStore: method event_store (line 42) | def event_store(self): method sample_message (line 46) | def sample_message(self): method test_store_event_returns_event_id (line 49) | async def test_store_event_returns_event_id(self, event_store, sample_... method test_store_event_priming_event (line 55) | async def test_store_event_priming_event(self, event_store): method test_store_multiple_events (line 60) | async def test_store_multiple_events(self, event_store, sample_message): method test_replay_events_after_returns_stream_id (line 69) | async def test_replay_events_after_returns_stream_id( method test_replay_events_after_skips_priming_events (line 86) | async def test_replay_events_after_skips_priming_events(self, event_st... method test_replay_events_after_unknown_event_id (line 108) | async def test_replay_events_after_unknown_event_id(self, event_store): method test_max_events_per_stream_trims_old_events (line 118) | async def test_max_events_per_stream_trims_old_events(self, event_store): method test_multiple_streams_are_isolated (line 143) | async def test_multiple_streams_are_isolated(self, event_store): method test_default_storage_is_memory (line 178) | async def test_default_storage_is_memory(self): class TestEventStoreIntegration (line 197) | class TestEventStoreIntegration: method test_roundtrip_jsonrpc_message (line 200) | async def test_roundtrip_jsonrpc_message(self): FILE: tests/server/test_file_server.py function test_dir (line 11) | def test_dir(tmp_path_factory) -> Path: function mcp (line 24) | def mcp() -> FastMCP: function resources (line 31) | def resources(mcp: FastMCP, test_dir: Path) -> FastMCP: function tools (line 66) | def tools(mcp: FastMCP, test_dir: Path) -> FastMCP: function test_list_resources (line 78) | async def test_list_resources(mcp: FastMCP): function test_read_resource_dir (line 90) | async def test_read_resource_dir(mcp: FastMCP): function test_read_resource_file (line 109) | async def test_read_resource_file(mcp: FastMCP): function test_delete_file (line 118) | async def test_delete_file(mcp: FastMCP, test_dir: Path): function test_delete_file_and_check_resources (line 125) | async def test_delete_file_and_check_resources(mcp: FastMCP, test_dir: P... FILE: tests/server/test_icons.py class TestServerIcons (line 12) | class TestServerIcons: method test_server_with_icons_and_website_url (line 15) | async def test_server_with_icons_and_website_url(self): method test_server_without_icons_and_website_url (line 43) | async def test_server_without_icons_and_website_url(self): class TestToolIcons (line 53) | class TestToolIcons: method test_tool_with_icons (line 56) | async def test_tool_with_icons(self): method test_tool_from_function_with_icons (line 75) | async def test_tool_from_function_with_icons(self): method test_tool_without_icons (line 90) | async def test_tool_without_icons(self): class TestResourceIcons (line 106) | class TestResourceIcons: method test_resource_with_icons (line 109) | async def test_resource_with_icons(self): method test_resource_from_function_with_icons (line 126) | async def test_resource_from_function_with_icons(self): method test_resource_without_icons (line 145) | async def test_resource_without_icons(self): class TestResourceTemplateIcons (line 161) | class TestResourceTemplateIcons: method test_resource_template_with_icons (line 164) | async def test_resource_template_with_icons(self): method test_resource_template_from_function_with_icons (line 181) | async def test_resource_template_from_function_with_icons(self): method test_resource_template_without_icons (line 200) | async def test_resource_template_without_icons(self): class TestPromptIcons (line 216) | class TestPromptIcons: method test_prompt_with_icons (line 219) | async def test_prompt_with_icons(self): method test_prompt_from_function_with_icons (line 236) | async def test_prompt_from_function_with_icons(self): method test_prompt_without_icons (line 251) | async def test_prompt_without_icons(self): class TestIconTypes (line 267) | class TestIconTypes: method test_multiple_icon_sizes (line 270) | async def test_multiple_icon_sizes(self): method test_data_uri_icon (line 297) | async def test_data_uri_icon(self): method test_icon_without_optional_fields (line 315) | async def test_icon_without_optional_fields(self): class TestIconImport (line 328) | class TestIconImport: method test_icon_import (line 331) | def test_icon_import(self): FILE: tests/server/test_input_validation.py class UserProfile (line 18) | class UserProfile(BaseModel): class TestStringToIntegerCoercion (line 26) | class TestStringToIntegerCoercion: method test_string_integer_with_strict_validation (line 29) | async def test_string_integer_with_strict_validation(self): method test_string_integer_without_strict_validation (line 51) | async def test_string_integer_without_strict_validation(self): method test_default_is_not_strict (line 66) | async def test_default_is_not_strict(self): method test_string_float_coercion (line 81) | async def test_string_float_coercion(self): method test_invalid_coercion_still_fails (line 97) | async def test_invalid_coercion_still_fails(self): class TestPydanticModelArguments (line 112) | class TestPydanticModelArguments: method test_pydantic_model_with_dict_no_strict (line 115) | async def test_pydantic_model_with_dict_no_strict(self): method test_pydantic_model_with_stringified_json_no_strict (line 133) | async def test_pydantic_model_with_stringified_json_no_strict(self): method test_pydantic_model_with_coercion (line 170) | async def test_pydantic_model_with_coercion(self): method test_pydantic_model_strict_validation (line 195) | async def test_pydantic_model_strict_validation(self): class TestValidationErrorMessages (line 219) | class TestValidationErrorMessages: method test_error_message_quality_strict (line 222) | async def test_error_message_quality_strict(self): method test_error_message_quality_pydantic (line 246) | async def test_error_message_quality_pydantic(self): method test_missing_required_field_error (line 266) | async def test_missing_required_field_error(self): class TestEdgeCases (line 285) | class TestEdgeCases: method test_optional_parameters_with_coercion (line 288) | async def test_optional_parameters_with_coercion(self): method test_none_values (line 305) | async def test_none_values(self): method test_empty_string_to_int (line 319) | async def test_empty_string_to_int(self): method test_boolean_coercion (line 332) | async def test_boolean_coercion(self): method test_list_of_integers_with_string_elements (line 352) | async def test_list_of_integers_with_string_elements(self): FILE: tests/server/test_log_level.py class TestLogLevelParameter (line 9) | class TestLogLevelParameter: method test_run_stdio_accepts_log_level (line 12) | async def test_run_stdio_accepts_log_level(self): method test_run_http_accepts_log_level (line 34) | async def test_run_http_accepts_log_level(self): method test_run_async_passes_log_level (line 53) | async def test_run_async_passes_log_level(self): method test_sync_run_accepts_log_level (line 73) | def test_sync_run_accepts_log_level(self): FILE: tests/server/test_logging.py class CustomLogFormatterForTest (line 11) | class CustomLogFormatterForTest(logging.Formatter): method format (line 12) | def format(self, record: logging.LogRecord) -> str: function mcp_server (line 17) | def mcp_server() -> FastMCP: function test_uvicorn_logging_default_level (line 23) | async def test_uvicorn_logging_default_level( function test_uvicorn_logging_with_custom_log_config (line 64) | async def test_uvicorn_logging_with_custom_log_config( function test_uvicorn_logging_custom_log_config_overrides_log_level_param (line 129) | async def test_uvicorn_logging_custom_log_config_overrides_log_level_param( FILE: tests/server/test_pagination.py class TestCursorEncoding (line 15) | class TestCursorEncoding: method test_encode_decode_roundtrip (line 18) | def test_encode_decode_roundtrip(self) -> None: method test_encode_produces_string (line 25) | def test_encode_produces_string(self) -> None: method test_decode_invalid_base64_raises (line 32) | def test_decode_invalid_base64_raises(self) -> None: method test_decode_invalid_json_raises (line 37) | def test_decode_invalid_json_raises(self) -> None: method test_decode_missing_offset_raises (line 45) | def test_decode_missing_offset_raises(self) -> None: class TestPaginateSequence (line 55) | class TestPaginateSequence: method test_first_page_no_cursor (line 58) | def test_first_page_no_cursor(self) -> None: method test_second_page_with_cursor (line 65) | def test_second_page_with_cursor(self) -> None: method test_last_page_returns_none_cursor (line 73) | def test_last_page_returns_none_cursor(self) -> None: method test_empty_list (line 82) | def test_empty_list(self) -> None: method test_exact_page_size (line 88) | def test_exact_page_size(self) -> None: method test_smaller_than_page_size (line 95) | def test_smaller_than_page_size(self) -> None: method test_invalid_cursor_raises (line 102) | def test_invalid_cursor_raises(self) -> None: class TestServerPagination (line 108) | class TestServerPagination: method test_tools_pagination_returns_all_tools (line 111) | async def test_tools_pagination_returns_all_tools(self) -> None: method test_resources_pagination_returns_all_resources (line 127) | async def test_resources_pagination_returns_all_resources(self) -> None: method test_prompts_pagination_returns_all_prompts (line 141) | async def test_prompts_pagination_returns_all_prompts(self) -> None: method test_manual_pagination (line 155) | async def test_manual_pagination(self) -> None: method test_invalid_cursor_returns_error (line 181) | async def test_invalid_cursor_returns_error(self) -> None: method test_no_pagination_when_disabled (line 194) | async def test_no_pagination_when_disabled(self) -> None: method test_pagination_exact_page_boundary (line 209) | async def test_pagination_exact_page_boundary(self) -> None: class TestPageSizeValidation (line 231) | class TestPageSizeValidation: method test_zero_page_size_raises (line 234) | def test_zero_page_size_raises(self) -> None: method test_negative_page_size_raises (line 241) | def test_negative_page_size_raises(self) -> None: class TestPaginationCycleDetection (line 249) | class TestPaginationCycleDetection: method test_tools_constant_cursor_terminates (line 252) | async def test_tools_constant_cursor_terminates(self) -> None: method test_prompts_constant_cursor_terminates (line 281) | async def test_prompts_constant_cursor_terminates(self) -> None: method test_resources_constant_cursor_terminates (line 308) | async def test_resources_constant_cursor_terminates(self) -> None: method test_resource_templates_constant_cursor_terminates (line 335) | async def test_resource_templates_constant_cursor_terminates(self) -> ... method test_cycling_cursors_terminates (line 363) | async def test_cycling_cursors_terminates(self) -> None: method test_empty_string_cursor_terminates (line 396) | async def test_empty_string_cursor_terminates(self) -> None: method test_tools_raises_on_auto_pagination_limit (line 423) | async def test_tools_raises_on_auto_pagination_limit(self) -> None: method test_resources_raises_on_auto_pagination_limit (line 453) | async def test_resources_raises_on_auto_pagination_limit(self) -> None: method test_prompts_raises_on_auto_pagination_limit (line 483) | async def test_prompts_raises_on_auto_pagination_limit(self) -> None: method test_normal_pagination_unaffected (line 513) | async def test_normal_pagination_unaffected(self) -> None: FILE: tests/server/test_providers.py class SimpleTool (line 20) | class SimpleTool(Tool): method run (line 26) | async def run(self, arguments: dict[str, Any]) -> ToolResult: class SimpleToolProvider (line 42) | class SimpleToolProvider(Provider): method __init__ (line 45) | def __init__(self, tools: Sequence[Tool] | None = None): method _list_tools (line 51) | async def _list_tools(self) -> list[Tool]: method _get_tool (line 55) | async def _get_tool( class ListOnlyProvider (line 68) | class ListOnlyProvider(Provider): method __init__ (line 71) | def __init__(self, tools: Sequence[Tool]): method _list_tools (line 76) | async def _list_tools(self) -> list[Tool]: class TestProvider (line 81) | class TestProvider: method base_server (line 85) | def base_server(self): method dynamic_tools (line 102) | def dynamic_tools(self) -> list[Tool]: method test_list_tools_includes_dynamic_tools (line 132) | async def test_list_tools_includes_dynamic_tools( method test_list_tools_calls_provider_each_time (line 149) | async def test_list_tools_calls_provider_each_time( method test_call_dynamic_tool (line 164) | async def test_call_dynamic_tool( method test_call_dynamic_tool_with_config (line 180) | async def test_call_dynamic_tool_with_config( method test_call_static_tool_still_works (line 196) | async def test_call_static_tool_still_works( method test_call_tool_uses_get_tool_for_efficient_lookup (line 211) | async def test_call_tool_uses_get_tool_for_efficient_lookup( method test_default_get_tool_falls_back_to_list (line 225) | async def test_default_get_tool_falls_back_to_list(self, base_server: ... method test_local_tools_come_first (line 246) | async def test_local_tools_come_first( method test_empty_provider (line 259) | async def test_empty_provider(self, base_server: FastMCP): method test_tool_not_found_falls_through_to_static (line 269) | async def test_tool_not_found_falls_through_to_static( class TestProviderClass (line 286) | class TestProviderClass: method test_subclass_is_instance (line 289) | async def test_subclass_is_instance(self): method test_default_get_tool_works (line 294) | async def test_default_get_tool_works(self): class TestDynamicToolUpdates (line 314) | class TestDynamicToolUpdates: method test_tools_update_without_restart (line 317) | async def test_tools_update_without_restart(self): class TestProviderExecutionMethods (line 362) | class TestProviderExecutionMethods: method test_call_tool_default_implementation (line 365) | async def test_call_tool_default_implementation(self): method test_read_resource_default_implementation (line 383) | async def test_read_resource_default_implementation(self): method test_read_resource_template_default (line 405) | async def test_read_resource_template_default(self): method test_render_prompt_default_implementation (line 427) | async def test_render_prompt_default_implementation(self): FILE: tests/server/test_server.py class TestCreateServer (line 17) | class TestCreateServer: method test_create_server (line 18) | async def test_create_server(self): method test_change_instruction (line 23) | async def test_change_instruction(self): method test_non_ascii_description (line 29) | async def test_non_ascii_description(self): class TestServerDelegation (line 54) | class TestServerDelegation: method test_tool_decorator_delegates_to_local_provider (line 57) | async def test_tool_decorator_delegates_to_local_provider(self): method test_resource_decorator_delegates_to_local_provider (line 70) | async def test_resource_decorator_delegates_to_local_provider(self): method test_prompt_decorator_delegates_to_local_provider (line 82) | async def test_prompt_decorator_delegates_to_local_provider(self): method test_add_tool_delegates_to_local_provider (line 95) | async def test_add_tool_delegates_to_local_provider(self): method test_get_tools_includes_local_provider_tools (line 109) | async def test_get_tools_includes_local_provider_tools(self): class TestLocalProviderProperty (line 121) | class TestLocalProviderProperty: method test_local_provider_returns_local_provider (line 124) | async def test_local_provider_returns_local_provider(self): method test_remove_tool_via_local_provider (line 129) | async def test_remove_tool_via_local_provider(self): method test_remove_resource_via_local_provider (line 141) | async def test_remove_resource_via_local_provider(self): method test_remove_prompt_via_local_provider (line 152) | async def test_remove_prompt_via_local_provider(self): class TestRemoveToolDeprecation (line 164) | class TestRemoveToolDeprecation: method test_remove_tool_emits_deprecation_warning (line 165) | async def test_remove_tool_emits_deprecation_warning(self): method test_remove_tool_still_works (line 180) | async def test_remove_tool_still_works(self): class TestResourcePrefixMounting (line 195) | class TestResourcePrefixMounting: method test_mounted_server_resource_prefixing (line 198) | async def test_mounted_server_resource_prefixing(self): class TestSettingsFromEnvironment (line 249) | class TestSettingsFromEnvironment: method test_server_starts_without_auth (line 250) | async def test_server_starts_without_auth(self): class TestAbstractCollectionTypes (line 276) | class TestAbstractCollectionTypes: method test_fastmcp_init_with_tuples (line 279) | async def test_fastmcp_init_with_tuples(self): method test_fastmcp_works_with_abstract_types (line 297) | async def test_fastmcp_works_with_abstract_types(self): class TestMeta (line 313) | class TestMeta: method test_tool_tags_in_meta (line 316) | async def test_tool_tags_in_meta(self): method test_resource_tags_in_meta (line 334) | async def test_resource_tags_in_meta(self): method test_resource_template_tags_in_meta (line 354) | async def test_resource_template_tags_in_meta(self): method test_prompt_tags_in_meta (line 376) | async def test_prompt_tags_in_meta(self): class TestShowServerBannerSetting (line 391) | class TestShowServerBannerSetting: method test_show_banner_defaults_to_setting_true (line 394) | async def test_show_banner_defaults_to_setting_true(self): method test_show_banner_respects_setting_false (line 404) | async def test_show_banner_respects_setting_false(self): method test_show_banner_explicit_true_overrides_setting (line 416) | async def test_show_banner_explicit_true_overrides_setting(self): method test_show_banner_explicit_false_overrides_setting (line 427) | async def test_show_banner_explicit_false_overrides_setting(self): FILE: tests/server/test_server_docket.py function test_docket_not_initialized_without_task_components (line 17) | async def test_docket_not_initialized_without_task_components(): function test_current_docket (line 34) | async def test_current_docket(): function test_current_worker (line 53) | async def test_current_worker(): function test_worker_executes_background_tasks (line 76) | async def test_worker_executes_background_tasks(): function test_current_docket_in_resource (line 110) | async def test_current_docket_in_resource(): function test_current_docket_in_prompt (line 129) | async def test_current_docket_in_prompt(): function test_current_docket_in_resource_template (line 148) | async def test_current_docket_in_resource_template(): function test_concurrent_calls_maintain_isolation (line 167) | async def test_concurrent_calls_maintain_isolation(): function test_user_lifespan_still_works_with_docket (line 198) | async def test_user_lifespan_still_works_with_docket(): FILE: tests/server/test_server_lifespan.py class TestServerLifespan (line 18) | class TestServerLifespan: method test_server_lifespan_basic (line 21) | async def test_server_lifespan_basic(self): method test_server_lifespan_overlapping_sessions (line 60) | async def test_server_lifespan_overlapping_sessions(self): method test_server_lifespan_context_available (line 98) | async def test_server_lifespan_context_available(self): class TestComposableLifespans (line 119) | class TestComposableLifespans: method test_lifespan_decorator_basic (line 122) | async def test_lifespan_decorator_basic(self): method test_lifespan_composition_two (line 151) | async def test_lifespan_composition_two(self): method test_lifespan_composition_three (line 189) | async def test_lifespan_composition_three(self): method test_lifespan_result_merge_later_wins (line 239) | async def test_lifespan_result_merge_later_wins(self): method test_lifespan_composition_with_context_manager_lifespan (line 267) | async def test_lifespan_composition_with_context_manager_lifespan(self): method test_backwards_compatibility_asynccontextmanager (line 307) | async def test_backwards_compatibility_asynccontextmanager(self): method test_lifespan_or_requires_lifespan_instance (line 325) | async def test_lifespan_or_requires_lifespan_instance(self): class TestCombineLifespans (line 343) | class TestCombineLifespans: method test_combine_lifespans_fastapi_style (line 346) | async def test_combine_lifespans_fastapi_style(self): method test_combine_lifespans_fastmcp_style (line 375) | async def test_combine_lifespans_fastmcp_style(self): method test_combine_lifespans_mixed_styles (line 403) | async def test_combine_lifespans_mixed_styles(self): method test_combine_lifespans_result_merge_later_wins (line 437) | async def test_combine_lifespans_result_merge_later_wins(self): method test_combine_lifespans_three (line 457) | async def test_combine_lifespans_three(self): method test_combine_lifespans_empty (line 500) | async def test_combine_lifespans_empty(self): method test_combine_lifespans_with_mapping_return_type (line 507) | async def test_combine_lifespans_with_mapping_return_type(self): class TestLifespanTeardownShielding (line 551) | class TestLifespanTeardownShielding: method test_server_lifespan_async_teardown_under_cancellation (line 559) | async def test_server_lifespan_async_teardown_under_cancellation(self): method test_provider_lifespan_async_teardown_under_cancellation (line 587) | async def test_provider_lifespan_async_teardown_under_cancellation(self): method test_composed_lifespans_async_teardown_under_cancellation (line 616) | async def test_composed_lifespans_async_teardown_under_cancellation(se... FILE: tests/server/test_session_visibility.py class NotificationRecording (line 15) | class NotificationRecording: class RecordingMessageHandler (line 23) | class RecordingMessageHandler(MessageHandler): method __init__ (line 26) | def __init__(self): method on_notification (line 30) | async def on_notification(self, message: mcp.types.ServerNotification)... method get_notifications (line 36) | def get_notifications( method reset (line 44) | def reset(self): class TestSessionVisibility (line 49) | class TestSessionVisibility: method test_enable_components_stores_rule_dict (line 52) | async def test_enable_components_stores_rule_dict(self): method test_disable_components_stores_rule_dict (line 76) | async def test_disable_components_stores_rule_dict(self): method test_session_rules_override_global_disables (line 100) | async def test_session_rules_override_global_disables(self): method test_rules_persist_across_requests (line 130) | async def test_rules_persist_across_requests(self): method test_rules_isolated_between_sessions (line 165) | async def test_rules_isolated_between_sessions(self): method test_version_spec_serialization (line 194) | async def test_version_spec_serialization(self): method test_clear_visibility_rules (line 231) | async def test_clear_visibility_rules(self): method test_multiple_rules_accumulate (line 269) | async def test_multiple_rules_accumulate(self): method test_later_rules_override_earlier_rules (line 303) | async def test_later_rules_override_earlier_rules(self): method test_session_transforms_apply_to_resources (line 328) | async def test_session_transforms_apply_to_resources(self): method test_session_transforms_apply_to_prompts (line 358) | async def test_session_transforms_apply_to_prompts(self): class TestSessionVisibilityNotifications (line 389) | class TestSessionVisibilityNotifications: method test_enable_components_sends_notifications (line 392) | async def test_enable_components_sends_notifications(self): method test_disable_components_sends_notifications (line 422) | async def test_disable_components_sends_notifications(self): method test_clear_visibility_rules_sends_notifications (line 451) | async def test_clear_visibility_rules_sends_notifications(self): method test_components_hint_limits_notifications (line 480) | async def test_components_hint_limits_notifications(self): class TestConcurrentSessionIsolation (line 511) | class TestConcurrentSessionIsolation: method test_concurrent_sessions_isolated (line 514) | async def test_concurrent_sessions_isolated(self): method test_many_concurrent_sessions_isolated (line 571) | async def test_many_concurrent_sessions_isolated(self): class TestSessionVisibilityResetBug (line 623) | class TestSessionVisibilityResetBug: method test_disable_then_reset_restores_tools (line 626) | async def test_disable_then_reset_restores_tools(self): method test_disable_reset_loop (line 663) | async def test_disable_reset_loop(self): method test_session_disable_does_not_leak_to_concurrent_session (line 701) | async def test_session_disable_does_not_leak_to_concurrent_session(self): method test_session_disable_does_not_leak_to_sequential_session (line 742) | async def test_session_disable_does_not_leak_to_sequential_session(self): FILE: tests/server/test_streamable_http_no_redirect.py function test_streamable_http_route_structure (line 14) | def test_streamable_http_route_structure(server_path: str): function test_streamable_http_redirect_behavior (line 42) | async def test_streamable_http_redirect_behavior(): function test_streamable_http_no_mount_routes (line 62) | async def test_streamable_http_no_mount_routes(): FILE: tests/server/test_tool_annotations.py function test_tool_annotations_in_tool_manager (line 11) | async def test_tool_annotations_in_tool_manager(): function test_tool_annotations_in_mcp_protocol (line 35) | async def test_tool_annotations_in_mcp_protocol(): function test_tool_annotations_in_client_api (line 59) | async def test_tool_annotations_in_client_api(): function test_provide_tool_annotations_as_dict_to_decorator (line 85) | async def test_provide_tool_annotations_as_dict_to_decorator(): function test_direct_tool_annotations_in_tool_manager (line 111) | async def test_direct_tool_annotations_in_tool_manager(): function test_direct_tool_annotations_in_client_api (line 139) | async def test_direct_tool_annotations_in_client_api(): function test_add_tool_method_annotations (line 167) | async def test_add_tool_method_annotations(): function test_tool_functionality_with_annotations (line 196) | async def test_tool_functionality_with_annotations(): function test_task_execution_auto_populated_for_task_enabled_tool (line 223) | async def test_task_execution_auto_populated_for_task_enabled_tool(): function test_task_execution_omitted_for_task_disabled_tool (line 241) | async def test_task_execution_omitted_for_task_disabled_tool(): FILE: tests/server/test_tool_transformation.py function test_tool_transformation_via_layer (line 12) | async def test_tool_transformation_via_layer(): function test_transformed_tool_filtering (line 32) | async def test_transformed_tool_filtering(): function test_transformed_tool_structured_output_without_annotation (line 59) | async def test_transformed_tool_structured_output_without_annotation(): function test_layer_based_transforms (line 88) | async def test_layer_based_transforms(): function test_server_level_transforms_apply_to_mounted_servers (line 106) | async def test_server_level_transforms_apply_to_mounted_servers(): function test_tool_transform_config_enabled_false_hides_tool (line 129) | async def test_tool_transform_config_enabled_false_hides_tool(): function test_tool_transform_config_enabled_false_with_rename (line 153) | async def test_tool_transform_config_enabled_false_with_rename(): function test_tool_transform_config_enabled_true_keeps_tool_visible (line 176) | async def test_tool_transform_config_enabled_true_keeps_tool_visible(): function test_tool_transform_config_enabled_true_overrides_earlier_disable (line 193) | async def test_tool_transform_config_enabled_true_overrides_earlier_disa... function test_openapi_path_params_not_duplicated_in_description (line 218) | async def test_openapi_path_params_not_duplicated_in_description(): FILE: tests/server/transforms/test_catalog.py function _make_versioned_tool (line 23) | def _make_versioned_tool(name: str, version: str) -> Tool: class CatalogReader (line 32) | class CatalogReader(CatalogTransform): method __init__ (line 39) | def __init__(self) -> None: method transform_tools (line 43) | async def transform_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 46) | async def get_tool( method _make_reader_tool (line 53) | def _make_reader_tool(self) -> Tool: class ReplacingTransform (line 64) | class ReplacingTransform(CatalogTransform): method transform_tools (line 71) | async def transform_tools(self, tools: Sequence[Tool]) -> Sequence[Tool]: method get_tool (line 74) | async def get_tool( method _make_synthetic_tool (line 81) | def _make_synthetic_tool(self) -> Tool: class TestCatalogTransformBypass (line 92) | class TestCatalogTransformBypass: method test_list_tools_replaced_by_subclass (line 93) | async def test_list_tools_replaced_by_subclass(self): method test_get_tool_catalog_returns_real_tools (line 109) | async def test_get_tool_catalog_returns_real_tools(self): method test_multiple_instances_have_independent_bypass (line 124) | async def test_multiple_instances_have_independent_bypass(self): class TestCatalogDeduplication (line 132) | class TestCatalogDeduplication: method test_returns_highest_version_only (line 135) | async def test_returns_highest_version_only(self): method test_version_metadata_injected (line 148) | async def test_version_metadata_injected(self): method test_mixed_versioned_and_unversioned (line 166) | async def test_mixed_versioned_and_unversioned(self): method test_version_filter_applied_before_catalog (line 183) | async def test_version_filter_applied_before_catalog(self): class TestCatalogVisibility (line 203) | class TestCatalogVisibility: method test_disabled_tool_excluded (line 206) | async def test_disabled_tool_excluded(self): class TestCatalogAuth (line 226) | class TestCatalogAuth: method test_auth_rejected_tool_excluded (line 229) | async def test_auth_rejected_tool_excluded(self): function _extract_result (line 253) | def _extract_result(result: object) -> list[str]: FILE: tests/server/transforms/test_prompts_as_tools.py class TestPromptsAsToolsBasic (line 12) | class TestPromptsAsToolsBasic: method test_adds_list_prompts_tool (line 15) | async def test_adds_list_prompts_tool(self): method test_adds_get_prompt_tool (line 25) | async def test_adds_get_prompt_tool(self): method test_preserves_existing_tools (line 35) | async def test_preserves_existing_tools(self): class TestListPromptsTool (line 53) | class TestListPromptsTool: method test_lists_prompts (line 56) | async def test_lists_prompts(self): method test_lists_prompt_with_arguments (line 75) | async def test_lists_prompt_with_arguments(self): method test_empty_when_no_prompts (line 102) | async def test_empty_when_no_prompts(self): class TestGetPromptTool (line 112) | class TestGetPromptTool: method test_gets_prompt_without_arguments (line 115) | async def test_gets_prompt_without_arguments(self): method test_gets_prompt_with_arguments (line 135) | async def test_gets_prompt_with_arguments(self): method test_error_on_unknown_prompt (line 161) | async def test_error_on_unknown_prompt(self): class TestPromptsAsToolsWithNamespace (line 173) | class TestPromptsAsToolsWithNamespace: method test_works_with_namespace_on_provider (line 176) | async def test_works_with_namespace_on_provider(self): class TestPromptsAsToolsRepr (line 203) | class TestPromptsAsToolsRepr: method test_repr (line 206) | def test_repr(self): FILE: tests/server/transforms/test_resources_as_tools.py class TestResourcesAsToolsBasic (line 15) | class TestResourcesAsToolsBasic: method test_adds_list_resources_tool (line 18) | async def test_adds_list_resources_tool(self): method test_adds_read_resource_tool (line 28) | async def test_adds_read_resource_tool(self): method test_preserves_existing_tools (line 38) | async def test_preserves_existing_tools(self): class TestListResourcesTool (line 56) | class TestListResourcesTool: method test_lists_static_resources (line 59) | async def test_lists_static_resources(self): method test_lists_resource_templates (line 77) | async def test_lists_resource_templates(self): method test_lists_both_resources_and_templates (line 95) | async def test_lists_both_resources_and_templates(self): method test_empty_when_no_resources (line 122) | async def test_empty_when_no_resources(self): class TestReadResourceTool (line 132) | class TestReadResourceTool: method test_reads_static_resource (line 135) | async def test_reads_static_resource(self): method test_reads_templated_resource (line 149) | async def test_reads_templated_resource(self): method test_error_on_unknown_resource (line 165) | async def test_error_on_unknown_resource(self): method test_reads_binary_as_base64 (line 176) | async def test_reads_binary_as_base64(self): class TestResourcesAsToolsWithNamespace (line 193) | class TestResourcesAsToolsWithNamespace: method test_works_with_namespace_on_provider (line 196) | async def test_works_with_namespace_on_provider(self): class TestResourcesAsToolsRepr (line 222) | class TestResourcesAsToolsRepr: method test_repr (line 225) | def test_repr(self): class TestResourcesAsToolsAnnotations (line 232) | class TestResourcesAsToolsAnnotations: method test_list_resources_is_read_only (line 235) | async def test_list_resources_is_read_only(self): method test_read_resource_is_read_only (line 246) | async def test_read_resource_is_read_only(self): function _deny_all (line 258) | def _deny_all(ctx: AuthContext) -> bool: class TestResourcesAsToolsAuthOnServer (line 263) | class TestResourcesAsToolsAuthOnServer: method test_auth_protected_resources_hidden_from_list (line 266) | async def test_auth_protected_resources_hidden_from_list(self): method test_auth_protected_resource_cannot_be_read (line 287) | async def test_auth_protected_resource_cannot_be_read(self): method test_open_resource_still_accessible (line 301) | async def test_open_resource_still_accessible(self): class TestResourcesAsToolsVisibilityOnServer (line 320) | class TestResourcesAsToolsVisibilityOnServer: method test_disabled_resources_hidden_from_list (line 323) | async def test_disabled_resources_hidden_from_list(self): method test_disabled_resource_cannot_be_read (line 345) | async def test_disabled_resource_cannot_be_read(self): FILE: tests/server/transforms/test_search.py function _parse_tool_result (line 30) | def _parse_tool_result(result: ToolResult) -> list[dict[str, Any]]: function _make_server_with_tools (line 36) | def _make_server_with_tools() -> FastMCP: class TestBaseTransformBehavior (line 72) | class TestBaseTransformBehavior: method test_list_tools_hides_tools_regex (line 75) | async def test_list_tools_hides_tools_regex(self): method test_list_tools_hides_tools_bm25 (line 82) | async def test_list_tools_hides_tools_bm25(self): method test_always_visible_pins_tools (line 89) | async def test_always_visible_pins_tools(self): method test_get_tool_returns_synthetic (line 99) | async def test_get_tool_returns_synthetic(self): method test_get_tool_passes_through_hidden (line 109) | async def test_get_tool_passes_through_hidden(self): method test_call_tool_proxy_executes (line 116) | async def test_call_tool_proxy_executes(self): method test_custom_tool_names (line 126) | async def test_custom_tool_names(self): method test_search_respects_visibility_filtering (line 140) | async def test_search_respects_visibility_filtering(self): method test_search_respects_auth_middleware (line 154) | async def test_search_respects_auth_middleware(self): method test_search_respects_session_visibility (line 180) | async def test_search_respects_session_visibility(self): class TestRegexSearch (line 211) | class TestRegexSearch: method test_search_by_name (line 212) | async def test_search_by_name(self): method test_search_by_description (line 220) | async def test_search_by_description(self): method test_search_by_param_name (line 228) | async def test_search_by_param_name(self): method test_search_by_param_description (line 236) | async def test_search_by_param_description(self): method test_search_or_pattern (line 244) | async def test_search_or_pattern(self): method test_search_case_insensitive (line 254) | async def test_search_case_insensitive(self): method test_search_invalid_pattern (line 262) | async def test_search_invalid_pattern(self): method test_search_max_results (line 270) | async def test_search_max_results(self): method test_search_no_matches (line 279) | async def test_search_no_matches(self): method test_search_returns_full_schema (line 287) | async def test_search_returns_full_schema(self): class TestBM25Search (line 303) | class TestBM25Search: method test_search_relevance (line 304) | async def test_search_relevance(self): method test_search_database_tools (line 315) | async def test_search_database_tools(self): method test_search_max_results (line 327) | async def test_search_max_results(self): method test_search_no_matches (line 335) | async def test_search_no_matches(self): method test_index_rebuilds_on_catalog_change (line 343) | async def test_index_rebuilds_on_catalog_change(self): method test_search_empty_query (line 367) | async def test_search_empty_query(self): method test_search_returns_full_schema (line 375) | async def test_search_returns_full_schema(self): class TestBM25Index (line 391) | class TestBM25Index: method test_basic_ranking (line 392) | def test_basic_ranking(self): method test_empty_corpus (line 404) | def test_empty_corpus(self): method test_no_matching_tokens (line 409) | def test_no_matching_tokens(self): class TestCallToolGuard (line 420) | class TestCallToolGuard: method test_call_tool_proxy_rejects_itself (line 421) | async def test_call_tool_proxy_rejects_itself(self): method test_call_tool_proxy_rejects_search_tool (line 432) | async def test_call_tool_proxy_rejects_search_tool(self): method test_call_tool_proxy_rejects_custom_names (line 444) | async def test_call_tool_proxy_rejects_custom_names(self): class TestCatalogHash (line 469) | class TestCatalogHash: method test_hash_differs_for_same_name_different_description (line 470) | def test_hash_differs_for_same_name_different_description(self): FILE: tests/server/transforms/test_visibility.py class TestMatching (line 10) | class TestMatching: method test_empty_criteria_matches_nothing (line 13) | def test_empty_criteria_matches_nothing(self): method test_match_all_matches_everything (line 18) | def test_match_all_matches_everything(self): method test_match_by_name (line 23) | def test_match_by_name(self): method test_match_by_version (line 29) | def test_match_by_version(self): method test_match_by_version_spec_exact (line 35) | def test_match_by_version_spec_exact(self): method test_match_by_version_spec_gte (line 42) | def test_match_by_version_spec_gte(self): method test_match_by_version_spec_range (line 49) | def test_match_by_version_spec_range(self): method test_unversioned_does_not_match_version_spec (line 58) | def test_unversioned_does_not_match_version_spec(self): method test_match_by_tag (line 66) | def test_match_by_tag(self): method test_match_by_component_type (line 72) | def test_match_by_component_type(self): method test_all_criteria_must_match (line 78) | def test_all_criteria_must_match(self): class TestMarking (line 98) | class TestMarking: method test_disable_marks_as_disabled (line 101) | def test_disable_marks_as_disabled(self): method test_enable_marks_as_enabled (line 107) | def test_enable_marks_as_enabled(self): method test_non_matching_unchanged (line 115) | def test_non_matching_unchanged(self): method test_returns_copy_for_matching (line 123) | def test_returns_copy_for_matching(self): method test_disable_all (line 132) | def test_disable_all(self): class TestOverride (line 139) | class TestOverride: method test_enable_overrides_disable (line 142) | def test_enable_overrides_disable(self): method test_disable_overrides_enable (line 151) | def test_disable_overrides_enable(self): class TestHelperFunctions (line 161) | class TestHelperFunctions: method test_unmarked_is_enabled (line 164) | def test_unmarked_is_enabled(self): method test_filtering_pattern (line 169) | def test_filtering_pattern(self): class TestMetadata (line 182) | class TestMetadata: method test_internal_metadata_stripped_by_get_meta (line 185) | def test_internal_metadata_stripped_by_get_meta(self): method test_user_metadata_preserved (line 198) | def test_user_metadata_preserved(self): class TestRepr (line 207) | class TestRepr: method test_repr_disable (line 210) | def test_repr_disable(self): method test_repr_enable (line 217) | def test_repr_enable(self): method test_repr_match_all (line 222) | def test_repr_match_all(self): class TestTransformChain (line 228) | class TestTransformChain: method tools (line 232) | def tools(self): method test_list_tools_marks_matching (line 239) | async def test_list_tools_marks_matching(self, tools): method test_later_transform_overrides (line 250) | async def test_later_transform_overrides(self, tools): method test_allowlist_pattern (line 265) | async def test_allowlist_pattern(self, tools): FILE: tests/server/versioning/test_calls.py class TestVersionMixingValidation (line 14) | class TestVersionMixingValidation: method test_resource_mixing_rejected (line 17) | async def test_resource_mixing_rejected(self): method test_prompt_mixing_rejected (line 33) | async def test_prompt_mixing_rejected(self): method test_multiple_versions_allowed (line 49) | async def test_multiple_versions_allowed(self): class TestVersionValidation (line 77) | class TestVersionValidation: method test_version_with_at_symbol_rejected (line 80) | async def test_version_with_at_symbol_rejected(self): class TestVersionMetadata (line 94) | class TestVersionMetadata: method test_tool_versions_in_meta (line 97) | async def test_tool_versions_in_meta(self): method test_resource_versions_in_meta (line 118) | async def test_resource_versions_in_meta(self): method test_prompt_versions_in_meta (line 139) | async def test_prompt_versions_in_meta(self): method test_unversioned_no_versions_list (line 160) | async def test_unversioned_no_versions_list(self): class TestVersionedCalls (line 176) | class TestVersionedCalls: method test_call_tool_with_version (line 179) | async def test_call_tool_with_version(self): method test_read_resource_with_version (line 210) | async def test_read_resource_with_version(self): method test_render_prompt_with_version (line 230) | async def test_render_prompt_with_version(self): method test_call_tool_invalid_version_not_found (line 252) | async def test_call_tool_invalid_version_not_found(self): class TestClientVersionSelection (line 268) | class TestClientVersionSelection: method test_call_tool_version_selection (line 284) | async def test_call_tool_version_selection( method test_get_prompt_version_selection (line 312) | async def test_get_prompt_version_selection( method test_read_resource_version_selection (line 343) | async def test_read_resource_version_selection( FILE: tests/server/versioning/test_filtering.py class TestVersionFilter (line 13) | class TestVersionFilter: method test_version_lt_filters_high_versions (line 16) | async def test_version_lt_filters_high_versions(self): method test_version_gte_filters_low_versions (line 50) | async def test_version_gte_filters_low_versions(self): method test_version_range (line 88) | async def test_version_range(self): method test_unversioned_always_passes (line 131) | async def test_unversioned_always_passes(self): method test_include_unversioned_false_excludes_unversioned_tools (line 153) | async def test_include_unversioned_false_excludes_unversioned_tools(se... method test_date_versions (line 175) | async def test_date_versions(self): method test_get_tool_respects_filter (line 200) | async def test_get_tool_respects_filter(self): method test_must_specify_at_least_one (line 216) | async def test_must_specify_at_least_one(self): method test_resources_filtered (line 225) | async def test_resources_filtered(self): method test_include_unversioned_false_excludes_unversioned_resources (line 245) | async def test_include_unversioned_false_excludes_unversioned_resource... method test_include_unversioned_false_excludes_unversioned_resource_templates (line 269) | async def test_include_unversioned_false_excludes_unversioned_resource... method test_prompts_filtered (line 294) | async def test_prompts_filtered(self): method test_include_unversioned_false_excludes_unversioned_prompts (line 314) | async def test_include_unversioned_false_excludes_unversioned_prompts(... method test_repr (line 335) | async def test_repr(self): class TestMountedVersionFiltering (line 352) | class TestMountedVersionFiltering: method test_mounted_get_tool_with_range_filter (line 360) | async def test_mounted_get_tool_with_range_filter(self): method test_mounted_get_resource_with_range_filter (line 387) | async def test_mounted_get_resource_with_range_filter(self): method test_mounted_get_prompt_with_range_filter (line 411) | async def test_mounted_get_prompt_with_range_filter(self): method test_mounted_unversioned_passes_version_filter (line 433) | async def test_mounted_unversioned_passes_version_filter(self): method test_mounted_include_unversioned_false_excludes_unversioned_tools (line 453) | async def test_mounted_include_unversioned_false_excludes_unversioned_... method test_version_filter_filters_out_high_mounted_version (line 479) | async def test_version_filter_filters_out_high_mounted_version(self): class TestMountedRangeFiltering (line 501) | class TestMountedRangeFiltering: method test_mounted_lower_version_selected_by_filter (line 504) | async def test_mounted_lower_version_selected_by_filter(self): method test_explicit_version_honored_within_filter_range (line 528) | async def test_explicit_version_honored_within_filter_range(self): class TestUnversionedExemption (line 560) | class TestUnversionedExemption: method test_unversioned_bypasses_version_filter (line 563) | async def test_unversioned_bypasses_version_filter(self): method test_unversioned_returned_for_exact_version_request (line 588) | async def test_unversioned_returned_for_exact_version_request(self): method test_unversioned_matches_any_version_spec (line 602) | async def test_unversioned_matches_any_version_spec(self): FILE: tests/server/versioning/test_mounting.py class TestVersionSorting (line 14) | class TestVersionSorting: method test_semantic_version_sorting (line 17) | async def test_semantic_version_sorting(self): method test_semver_sorting (line 50) | async def test_semver_sorting(self): method test_v_prefix_normalized (line 77) | async def test_v_prefix_normalized(self): class TestMountedServerVersioning (line 101) | class TestMountedServerVersioning: method test_mounted_tool_preserves_version (line 104) | async def test_mounted_tool_preserves_version(self): method test_mounted_resource_preserves_version (line 120) | async def test_mounted_resource_preserves_version(self): method test_mounted_prompt_preserves_version (line 135) | async def test_mounted_prompt_preserves_version(self): method test_mounted_get_tool_with_version (line 151) | async def test_mounted_get_tool_with_version(self): method test_mounted_multiple_versions_all_returned (line 176) | async def test_mounted_multiple_versions_all_returned(self): method test_mounted_call_tool_uses_highest_version (line 206) | async def test_mounted_call_tool_uses_highest_version(self): method test_mounted_tool_wrapper_executes_correct_version (line 226) | async def test_mounted_tool_wrapper_executes_correct_version(self): method test_mounted_resource_wrapper_reads_correct_version (line 252) | async def test_mounted_resource_wrapper_reads_correct_version(self): method test_mounted_prompt_wrapper_renders_correct_version (line 281) | async def test_mounted_prompt_wrapper_renders_correct_version(self): method test_deeply_nested_version_forwarding (line 312) | async def test_deeply_nested_version_forwarding(self): FILE: tests/server/versioning/test_versioning.py class TestVersionKey (line 20) | class TestVersionKey: method test_none_sorts_lowest (line 23) | def test_none_sorts_lowest(self): method test_none_equals_none (line 29) | def test_none_equals_none(self): method test_pep440_versions_compared_semantically (line 35) | def test_pep440_versions_compared_semantically(self): method test_v_prefix_stripped (line 42) | def test_v_prefix_stripped(self): method test_string_fallback_for_invalid_versions (line 47) | def test_string_fallback_for_invalid_versions(self): method test_pep440_sorts_before_strings (line 54) | def test_pep440_sorts_before_strings(self): method test_repr (line 60) | def test_repr(self): class TestVersionFunctions (line 66) | class TestVersionFunctions: method test_compare_versions (line 69) | def test_compare_versions(self): method test_is_version_greater (line 78) | def test_is_version_greater(self): class TestComponentVersioning (line 87) | class TestComponentVersioning: method test_tool_with_version (line 90) | async def test_tool_with_version(self): method test_tool_without_version (line 104) | async def test_tool_without_version(self): method test_tool_version_as_int (line 118) | async def test_tool_version_as_int(self): method test_tool_version_zero_is_truthy (line 131) | async def test_tool_version_zero_is_truthy(self): method test_multiple_tool_versions_all_returned (line 144) | async def test_multiple_tool_versions_all_returned(self): method test_call_tool_invokes_highest_version (line 167) | async def test_call_tool_invokes_highest_version(self): method test_mixing_versioned_and_unversioned_rejected (line 184) | async def test_mixing_versioned_and_unversioned_rejected(self): method test_mixing_unversioned_after_versioned_rejected (line 201) | async def test_mixing_unversioned_after_versioned_rejected(self): method test_resource_with_version (line 218) | async def test_resource_with_version(self): method test_prompt_with_version (line 241) | async def test_prompt_with_version(self): class TestVersionValidation (line 265) | class TestVersionValidation: method test_fastmcp_version_int_coerced (line 268) | async def test_fastmcp_version_int_coerced(self): method test_fastmcp_version_float_coerced (line 273) | async def test_fastmcp_version_float_coerced(self): method test_tool_version_list_rejected (line 278) | async def test_tool_version_list_rejected(self): method test_tool_version_dict_rejected (line 287) | async def test_tool_version_dict_rejected(self): method test_fastmcp_version_list_rejected (line 296) | async def test_fastmcp_version_list_rejected(self): method test_fastmcp_version_dict_rejected (line 301) | async def test_fastmcp_version_dict_rejected(self): method test_fastmcp_version_true_rejected (line 306) | async def test_fastmcp_version_true_rejected(self): method test_fastmcp_version_false_rejected (line 311) | async def test_fastmcp_version_false_rejected(self): FILE: tests/server/versioning/test_visibility_version_fallback.py function _make_token (line 20) | def _make_token(scopes: list[str] | None = None) -> AccessToken: function _set_token (line 31) | def _set_token(token: AccessToken | None): class TestToolVersionFallback (line 38) | class TestToolVersionFallback: method test_list_tools_shows_v1_when_v2_disabled (line 41) | async def test_list_tools_shows_v1_when_v2_disabled(self): method test_get_tool_returns_v1_when_v2_disabled (line 60) | async def test_get_tool_returns_v1_when_v2_disabled(self): method test_call_tool_uses_v1_when_v2_disabled (line 78) | async def test_call_tool_uses_v1_when_v2_disabled(self): method test_get_tool_explicit_disabled_version_returns_none (line 97) | async def test_get_tool_explicit_disabled_version_returns_none(self): method test_get_tool_all_versions_disabled_returns_none (line 114) | async def test_get_tool_all_versions_disabled_returns_none(self): method test_get_tool_middle_version_fallback (line 131) | async def test_get_tool_middle_version_fallback(self): class TestResourceVersionFallback (line 154) | class TestResourceVersionFallback: method test_get_resource_returns_v1_when_v2_disabled (line 157) | async def test_get_resource_returns_v1_when_v2_disabled(self): method test_get_resource_explicit_disabled_version_returns_none (line 175) | async def test_get_resource_explicit_disabled_version_returns_none(self): class TestResourceTemplateVersionFallback (line 193) | class TestResourceTemplateVersionFallback: method test_get_resource_template_returns_v1_when_v2_disabled (line 196) | async def test_get_resource_template_returns_v1_when_v2_disabled(self): class TestPromptVersionFallback (line 215) | class TestPromptVersionFallback: method test_get_prompt_returns_v1_when_v2_disabled (line 218) | async def test_get_prompt_returns_v1_when_v2_disabled(self): method test_get_prompt_explicit_disabled_version_returns_none (line 236) | async def test_get_prompt_explicit_disabled_version_returns_none(self): class TestFallbackRespectsAuth (line 254) | class TestFallbackRespectsAuth: method test_tool_fallback_respects_auth (line 263) | async def test_tool_fallback_respects_auth(self): method test_tool_fallback_allows_authorized_user (line 281) | async def test_tool_fallback_allows_authorized_user(self): method test_resource_fallback_respects_auth (line 304) | async def test_resource_fallback_respects_auth(self): method test_resource_template_fallback_respects_auth (line 321) | async def test_resource_template_fallback_respects_auth(self): method test_prompt_fallback_respects_auth (line 338) | async def test_prompt_fallback_respects_auth(self): method test_fallback_skips_unauthorized_picks_next (line 355) | async def test_fallback_skips_unauthorized_picks_next(self): FILE: tests/telemetry/test_module.py class TestGetTracer (line 18) | class TestGetTracer: method test_tracer_uses_instrumentation_name (line 19) | def test_tracer_uses_instrumentation_name( class TestGetAuthSpanAttributes (line 33) | class TestGetAuthSpanAttributes: method test_returns_empty_dict_when_no_context (line 34) | def test_returns_empty_dict_when_no_context(self): class TestInjectTraceContext (line 43) | class TestInjectTraceContext: method test_injects_bare_keys (line 44) | def test_injects_bare_keys(self, trace_exporter: InMemorySpanExporter): class TestExtractTraceContext (line 54) | class TestExtractTraceContext: method test_bare_traceparent (line 55) | def test_bare_traceparent(self, trace_exporter: InMemorySpanExporter): method test_bare_tracestate (line 61) | def test_bare_tracestate(self, trace_exporter: InMemorySpanExporter): method test_none_meta_returns_current_context (line 72) | def test_none_meta_returns_current_context( method test_empty_meta_returns_current_context (line 78) | def test_empty_meta_returns_current_context( FILE: tests/test_apps.py class TestAppConfig (line 29) | class TestAppConfig: method test_serializes_with_aliases (line 30) | def test_serializes_with_aliases(self): method test_excludes_none_fields (line 35) | def test_excludes_none_fields(self): method test_all_fields (line 40) | def test_all_fields(self): method test_populate_by_name (line 59) | def test_populate_by_name(self): class TestResourceCSP (line 64) | class TestResourceCSP: method test_serializes_with_aliases (line 65) | def test_serializes_with_aliases(self): method test_excludes_none_fields (line 76) | def test_excludes_none_fields(self): method test_all_fields (line 81) | def test_all_fields(self): method test_populate_by_name (line 96) | def test_populate_by_name(self): method test_empty (line 100) | def test_empty(self): method test_extra_fields_preserved (line 105) | def test_extra_fields_preserved(self): class TestResourcePermissions (line 116) | class TestResourcePermissions: method test_serializes_with_aliases (line 117) | def test_serializes_with_aliases(self): method test_excludes_none_fields (line 122) | def test_excludes_none_fields(self): method test_all_fields (line 127) | def test_all_fields(self): method test_populate_by_name (line 139) | def test_populate_by_name(self): method test_extra_fields_preserved (line 143) | def test_extra_fields_preserved(self): method test_empty (line 150) | def test_empty(self): class TestAppConfigForResources (line 156) | class TestAppConfigForResources: method test_serializes_with_aliases (line 159) | def test_serializes_with_aliases(self): method test_excludes_none_fields (line 170) | def test_excludes_none_fields(self): method test_with_permissions (line 175) | def test_with_permissions(self): class TestAppConfigToMetaDict (line 185) | class TestAppConfigToMetaDict: method test_from_app_config_with_tool_fields (line 186) | def test_from_app_config_with_tool_fields(self): method test_from_app_config_resource_fields_only (line 192) | def test_from_app_config_resource_fields_only(self): method test_passthrough_for_dict (line 197) | def test_passthrough_for_dict(self): class TestToolRegistrationWithApp (line 208) | class TestToolRegistrationWithApp: method test_app_config_model (line 209) | async def test_app_config_model(self): method test_app_dict (line 221) | async def test_app_dict(self): method test_app_merges_with_existing_meta (line 233) | async def test_app_merges_with_existing_meta(self): method test_app_in_mcp_wire_format (line 246) | async def test_app_in_mcp_wire_format(self): method test_tool_without_app_has_no_ui_meta (line 259) | async def test_tool_without_app_has_no_ui_meta(self): class TestResourceWithApp (line 276) | class TestResourceWithApp: method test_ui_scheme_defaults_mime_type (line 277) | async def test_ui_scheme_defaults_mime_type(self): method test_explicit_mime_type_overrides_ui_default (line 288) | async def test_explicit_mime_type_overrides_ui_default(self): method test_resource_app_metadata (line 298) | async def test_resource_app_metadata(self): method test_non_ui_scheme_no_mime_default (line 312) | async def test_non_ui_scheme_no_mime_default(self): method test_standalone_decorator_ui_scheme_defaults_mime_type (line 322) | async def test_standalone_decorator_ui_scheme_defaults_mime_type(self): method test_resource_template_ui_scheme_defaults_mime_type (line 337) | async def test_resource_template_ui_scheme_defaults_mime_type(self): method test_resource_rejects_resource_uri (line 349) | async def test_resource_rejects_resource_uri(self): method test_resource_rejects_visibility (line 361) | async def test_resource_rejects_visibility(self): class TestExtensionAdvertisement (line 379) | class TestExtensionAdvertisement: method test_capabilities_include_ui_extension (line 380) | async def test_capabilities_include_ui_extension(self): class TestContextClientSupportsExtension (line 399) | class TestContextClientSupportsExtension: method test_returns_false_when_no_session (line 400) | async def test_returns_false_when_no_session(self): class TestIntegration (line 411) | class TestIntegration: method test_tool_with_app_roundtrip (line 412) | async def test_tool_with_app_roundtrip(self): method test_resource_with_ui_scheme_roundtrip (line 431) | async def test_resource_with_ui_scheme_roundtrip(self): method test_ui_resource_read_preserves_mime_type (line 444) | async def test_ui_resource_read_preserves_mime_type(self): method test_app_tool_callable (line 457) | async def test_app_tool_callable(self): method test_extension_and_tool_together (line 469) | async def test_extension_and_tool_together(self): method test_csp_and_permissions_roundtrip (line 485) | async def test_csp_and_permissions_roundtrip(self): method test_resource_read_propagates_meta_to_content_items (line 533) | async def test_resource_read_propagates_meta_to_content_items(self): FILE: tests/test_apps_prefab.py class TestConvertResult (line 29) | class TestConvertResult: method test_prefab_app (line 30) | def test_prefab_app(self): method test_bare_component (line 46) | def test_bare_component(self): method test_tool_result_with_prefab_structured_content (line 57) | def test_tool_result_with_prefab_structured_content(self): method test_tool_result_with_component_structured_content (line 72) | def test_tool_result_with_component_structured_content(self): method test_tool_result_passthrough (line 85) | def test_tool_result_passthrough(self): class TestAppTrue (line 97) | class TestAppTrue: method test_app_true_sets_meta (line 98) | def test_app_true_sets_meta(self): method test_app_true_registers_renderer_resource (line 115) | def test_app_true_registers_renderer_resource(self): method test_renderer_resource_has_correct_mime_type (line 125) | def test_renderer_resource_has_correct_mime_type(self): method test_renderer_resource_has_csp (line 137) | def test_renderer_resource_has_csp(self): method test_multiple_tools_share_renderer (line 150) | def test_multiple_tools_share_renderer(self): method test_explicit_app_config_not_overridden (line 166) | def test_explicit_app_config_not_overridden(self): class TestInference (line 188) | class TestInference: method test_prefab_app_annotation_inferred (line 189) | def test_prefab_app_annotation_inferred(self): method test_component_annotation_inferred (line 205) | def test_component_annotation_inferred(self): method test_no_annotation_no_inference (line 221) | def test_no_annotation_no_inference(self): method test_non_prefab_annotation_no_inference (line 236) | def test_non_prefab_annotation_no_inference(self): method test_optional_prefab_app_inferred (line 251) | def test_optional_prefab_app_inferred(self): method test_annotated_prefab_app_inferred (line 267) | def test_annotated_prefab_app_inferred(self): method test_component_subclass_union_inferred (line 283) | def test_component_subclass_union_inferred(self): class TestOutputSchema (line 305) | class TestOutputSchema: method test_prefab_app_return_no_output_schema (line 306) | def test_prefab_app_return_no_output_schema(self): method test_component_return_no_output_schema (line 319) | def test_component_return_no_output_schema(self): method test_optional_component_no_output_schema (line 334) | def test_optional_component_no_output_schema(self): method test_annotated_prefab_app_no_output_schema (line 347) | def test_annotated_prefab_app_no_output_schema(self): class TestIntegration (line 366) | class TestIntegration: method test_tool_call_returns_prefab_structured_content (line 367) | async def test_tool_call_returns_prefab_structured_content(self): method test_tool_call_with_custom_text (line 384) | async def test_tool_call_with_custom_text(self): method test_tools_list_includes_app_meta (line 404) | async def test_tools_list_includes_app_meta(self): method test_renderer_resource_readable (line 419) | async def test_renderer_resource_readable(self): FILE: tests/test_fastmcp_app.py function _clear_registries (line 37) | def _clear_registries() -> None: class TestGlobalKeyGeneration (line 48) | class TestGlobalKeyGeneration: method test_make_global_key_format (line 49) | def test_make_global_key_format(self): method test_make_global_key_uniqueness (line 54) | def test_make_global_key_uniqueness(self): class TestAppTool (line 64) | class TestAppTool: method setup_method (line 65) | def setup_method(self) -> None: method test_tool_bare_decorator (line 68) | def test_tool_bare_decorator(self): method test_tool_empty_parens (line 78) | def test_tool_empty_parens(self): method test_tool_custom_name (line 87) | def test_tool_custom_name(self): method test_tool_name_kwarg (line 96) | def test_tool_name_kwarg(self): method test_tool_name_conflict_raises (line 105) | def test_tool_name_conflict_raises(self): method test_tool_registers_in_provider (line 114) | async def test_tool_registers_in_provider(self): method test_tool_custom_name_in_provider (line 125) | async def test_tool_custom_name_in_provider(self): method test_tool_gets_global_key (line 136) | def test_tool_gets_global_key(self): method test_tool_global_key_in_meta (line 150) | async def test_tool_global_key_in_meta(self): method test_tool_default_visibility_app_only (line 164) | async def test_tool_default_visibility_app_only(self): method test_tool_model_visibility (line 176) | async def test_tool_model_visibility(self): method test_tool_with_description (line 188) | def test_tool_with_description(self): method test_tool_with_auth (line 195) | def test_tool_with_auth(self): method test_tool_with_timeout (line 203) | def test_tool_with_timeout(self): class TestAppUI (line 216) | class TestAppUI: method setup_method (line 217) | def setup_method(self) -> None: method test_ui_bare_decorator (line 220) | def test_ui_bare_decorator(self): method test_ui_empty_parens (line 229) | def test_ui_empty_parens(self): method test_ui_custom_name (line 238) | def test_ui_custom_name(self): method test_ui_registers_in_provider (line 247) | async def test_ui_registers_in_provider(self): method test_ui_visibility_model_only (line 258) | async def test_ui_visibility_model_only(self): method test_ui_no_global_key (line 270) | def test_ui_no_global_key(self): method test_ui_has_resource_uri (line 280) | async def test_ui_has_resource_uri(self): method test_ui_has_csp (line 292) | async def test_ui_has_csp(self): method test_ui_with_title_and_description (line 305) | async def test_ui_with_title_and_description(self): method test_ui_with_tags (line 316) | async def test_ui_with_tags(self): class TestResolveToolRef (line 332) | class TestResolveToolRef: method setup_method (line 333) | def setup_method(self) -> None: method test_resolve_global_key (line 336) | def test_resolve_global_key(self): method test_resolve_global_key_object_return (line 350) | def test_resolve_global_key_object_return(self): method test_resolve_fastmcp_metadata (line 365) | def test_resolve_fastmcp_metadata(self): method test_resolve_bare_function (line 379) | def test_resolve_bare_function(self): method test_resolve_unresolvable_raises (line 387) | def test_resolve_unresolvable_raises(self): class TestProviderInterface (line 397) | class TestProviderInterface: method setup_method (line 398) | def setup_method(self) -> None: method test_list_tools_empty (line 401) | async def test_list_tools_empty(self): method test_list_resources_empty (line 405) | async def test_list_resources_empty(self): method test_get_tool_by_name (line 409) | async def test_get_tool_by_name(self): method test_get_tool_missing_returns_none (line 420) | async def test_get_tool_missing_returns_none(self): class TestCallToolGlobalKeyRouting (line 430) | class TestCallToolGlobalKeyRouting: method setup_method (line 431) | def setup_method(self) -> None: method test_call_tool_by_global_key (line 434) | async def test_call_tool_by_global_key(self): method test_call_tool_by_name (line 450) | async def test_call_tool_by_name(self): method test_global_key_survives_namespace (line 464) | async def test_global_key_survives_namespace(self): method test_namespaced_name_also_works (line 481) | async def test_namespaced_name_also_works(self): method test_global_key_auth_blocks_unauthorized (line 495) | async def test_global_key_auth_blocks_unauthorized(self): class TestEndToEnd (line 526) | class TestEndToEnd: method setup_method (line 527) | def setup_method(self) -> None: method test_ui_tool_visible_to_client (line 530) | async def test_ui_tool_visible_to_client(self): method test_app_tool_model_true_visible (line 546) | async def test_app_tool_model_true_visible(self): method test_call_tool_via_global_key_through_client (line 562) | async def test_call_tool_via_global_key_through_client(self): class TestRun (line 585) | class TestRun: method test_repr (line 586) | def test_repr(self): class TestAddTool (line 596) | class TestAddTool: method setup_method (line 597) | def setup_method(self) -> None: method test_add_tool_from_function (line 600) | async def test_add_tool_from_function(self): method test_add_tool_gets_global_key (line 612) | async def test_add_tool_gets_global_key(self): method test_add_tool_object (line 622) | async def test_add_tool_object(self): class TestComposition (line 637) | class TestComposition: method setup_method (line 638) | def setup_method(self) -> None: method test_multiple_apps_on_one_server (line 641) | async def test_multiple_apps_on_one_server(self): method test_ui_and_tool_on_same_app (line 667) | async def test_ui_and_tool_on_same_app(self): method test_ui_registers_prefab_renderer_resource (line 683) | async def test_ui_registers_prefab_renderer_resource(self): FILE: tests/test_json_schema_generation.py class TestToolJsonSchema (line 15) | class TestToolJsonSchema: method test_tool_json_schema_generation (line 18) | def test_tool_json_schema_generation(self): method test_function_tool_json_schema_generation (line 32) | def test_function_tool_json_schema_generation(self): method test_transformed_tool_json_schema_generation (line 51) | def test_transformed_tool_json_schema_generation(self): class TestResourceJsonSchema (line 73) | class TestResourceJsonSchema: method test_function_resource_json_schema_generation (line 76) | def test_function_resource_json_schema_generation(self): method test_function_resource_template_json_schema_generation (line 99) | def test_function_resource_template_json_schema_generation(self): class TestPromptJsonSchema (line 121) | class TestPromptJsonSchema: method test_function_prompt_json_schema_generation (line 124) | def test_function_prompt_json_schema_generation(self): class TestJsonSchemaIntegration (line 146) | class TestJsonSchemaIntegration: method test_all_classes_generate_valid_schemas (line 149) | def test_all_classes_generate_valid_schemas(self): method test_callable_fields_not_in_any_schema (line 189) | def test_callable_fields_not_in_any_schema(self): FILE: tests/test_mcp_config.py function running_under_debugger (line 53) | def running_under_debugger(): function gc_collect_harder (line 57) | def gc_collect_harder(): function test_parse_single_stdio_config (line 66) | def test_parse_single_stdio_config(): function test_stdio_config_keep_alive_passthrough (line 82) | def test_stdio_config_keep_alive_passthrough(): function test_parse_extra_keys (line 113) | def test_parse_extra_keys(): function test_parse_mcpservers_at_root (line 133) | def test_parse_mcpservers_at_root(): function test_parse_mcpservers_discriminator (line 148) | def test_parse_mcpservers_discriminator(): function test_parse_single_remote_config (line 191) | def test_parse_single_remote_config(): function test_parse_remote_config_with_transport (line 205) | def test_parse_remote_config_with_transport(): function test_parse_remote_config_with_url_inference (line 220) | def test_parse_remote_config_with_url_inference(): function test_parse_multiple_servers (line 234) | def test_parse_multiple_servers(): function test_multi_client (line 261) | async def test_multi_client(tmp_path: Path): function test_multi_client_parallel_calls (line 303) | async def test_multi_client_parallel_calls(tmp_path: Path): function _wait_for_process_exit (line 347) | async def _wait_for_process_exit(pid: int, timeout: float = 3.0) -> None: function test_multi_client_lifespan (line 367) | async def test_multi_client_lifespan(tmp_path: Path): function test_multi_client_force_close (line 423) | async def test_multi_client_force_close(tmp_path: Path): function test_remote_config_default_no_auth (line 468) | async def test_remote_config_default_no_auth(): function test_remote_config_with_auth_token (line 481) | async def test_remote_config_with_auth_token(): function test_remote_config_sse_with_auth_token (line 496) | async def test_remote_config_sse_with_auth_token(): function test_remote_config_with_oauth_literal (line 511) | async def test_remote_config_with_oauth_literal(): function test_multi_client_with_logging (line 525) | async def test_multi_client_with_logging(tmp_path: Path, caplog): function test_multi_client_with_transforms (line 592) | async def test_multi_client_with_transforms(tmp_path: Path): function test_canonical_multi_client_with_transforms (line 648) | async def test_canonical_multi_client_with_transforms(tmp_path: Path): function test_multi_client_transform_with_filtering (line 698) | async def test_multi_client_transform_with_filtering(tmp_path: Path): function test_single_server_config_include_tags_filtering (line 760) | async def test_single_server_config_include_tags_filtering(tmp_path: Path): function test_multi_client_with_elicitation (line 801) | async def test_multi_client_with_elicitation(tmp_path: Path): function test_multi_server_config_transport (line 843) | async def test_multi_server_config_transport(tmp_path: Path): function test_multi_server_timeout_propagation (line 900) | async def test_multi_server_timeout_propagation(): function test_multi_server_session_persistence (line 941) | async def test_multi_server_session_persistence(tmp_path: Path): function test_single_server_config_transport (line 992) | async def test_single_server_config_transport(): function test_multi_server_partial_failure (line 1018) | async def test_multi_server_partial_failure(tmp_path: Path, server_order... function test_multi_server_partial_failure_logs_warning (line 1057) | async def test_multi_server_partial_failure_logs_warning(tmp_path: Path,... function test_multi_server_all_fail (line 1100) | async def test_multi_server_all_fail(): function test_multi_server_partial_failure_cleanup (line 1121) | async def test_multi_server_partial_failure_cleanup(tmp_path: Path): function sample_tool_fn (line 1157) | def sample_tool_fn(arg1: int, arg2: str) -> str: function sample_tool (line 1162) | def sample_tool() -> FastMCPTool: function test_script (line 1167) | async def test_script(tmp_path: Path) -> AsyncGenerator[Path, Any]: FILE: tests/tools/test_standalone_decorator.py class TestToolDecorator (line 18) | class TestToolDecorator: method test_tool_without_parens (line 21) | def test_tool_without_parens(self): method test_tool_with_empty_parens (line 34) | def test_tool_with_empty_parens(self): method test_tool_with_name_arg (line 46) | def test_tool_with_name_arg(self): method test_tool_with_name_kwarg (line 58) | def test_tool_with_name_kwarg(self): method test_tool_with_all_metadata (line 70) | def test_tool_with_all_metadata(self): method test_tool_function_still_callable (line 92) | async def test_tool_function_still_callable(self): method test_tool_rejects_classmethod_decorator (line 104) | def test_tool_rejects_classmethod_decorator(self): method test_tool_with_both_name_args_raises (line 114) | def test_tool_with_both_name_args_raises(self): method test_tool_added_to_server (line 122) | async def test_tool_added_to_server(self): FILE: tests/tools/test_tool_future_annotations.py function simple_with_context (line 17) | def simple_with_context(ctx: Context) -> str: function complex_types (line 23) | def complex_types( function optional_context (line 31) | def optional_context(name: str, ctx: Context | None = None) -> str: function union_with_context (line 39) | def union_with_context(value: int | str, ctx: Context) -> ToolResult: function returns_image (line 45) | def returns_image(ctx: Context) -> Image: function async_with_context (line 53) | async def async_with_context(ctx: Context) -> str: function annotated_with_context (line 59) | def annotated_with_context( function literal_with_context (line 67) | def literal_with_context(mode: Literal["fast", "slow"], ctx: Context) ->... class TestFutureAnnotations (line 72) | class TestFutureAnnotations: method test_simple_with_context (line 73) | async def test_simple_with_context(self): method test_complex_types (line 78) | async def test_complex_types(self): method test_optional_context (line 90) | async def test_optional_context(self): method test_union_with_context (line 98) | async def test_union_with_context(self): method test_returns_image (line 106) | async def test_returns_image(self): method test_async_with_context (line 112) | async def test_async_with_context(self): method test_annotated_with_context (line 119) | async def test_annotated_with_context(self): method test_literal_with_context (line 130) | async def test_literal_with_context(self): method test_modern_union_syntax_works (line 136) | async def test_modern_union_syntax_works(self): function test_closure_scoped_types_with_builtins (line 172) | def test_closure_scoped_types_with_builtins(): FILE: tests/tools/test_tool_timeout.py class TestToolTimeout (line 14) | class TestToolTimeout: method test_no_timeout_completes_normally_async (line 17) | async def test_no_timeout_completes_normally_async(self): method test_no_timeout_completes_normally_sync (line 30) | async def test_no_timeout_completes_normally_sync(self): method test_timeout_not_reached_async (line 43) | async def test_timeout_not_reached_async(self): method test_timeout_not_reached_sync (line 56) | async def test_timeout_not_reached_sync(self): method test_async_timeout_exceeded (line 69) | async def test_async_timeout_exceeded(self): method test_sync_timeout_exceeded (line 85) | async def test_sync_timeout_exceeded(self): method test_timeout_error_raises_tool_error (line 94) | async def test_timeout_error_raises_tool_error(self): method test_timeout_from_tool_from_function (line 107) | async def test_timeout_from_tool_from_function(self): method test_timeout_zero_times_out_immediately (line 122) | async def test_timeout_zero_times_out_immediately(self): method test_timeout_with_task_mode (line 134) | async def test_timeout_with_task_mode(self): method test_multiple_tools_with_different_timeouts (line 150) | async def test_multiple_tools_with_different_timeouts(self): method test_timeout_error_converted_to_tool_error (line 181) | async def test_timeout_error_converted_to_tool_error(self): FILE: tests/tools/tool/test_callable.py class TestToolCallable (line 10) | class TestToolCallable: method test_callable_object_sync (line 13) | async def test_callable_object_sync(self): method test_callable_object_async (line 27) | async def test_callable_object_async(self): class TestSyncToolConcurrency (line 42) | class TestSyncToolConcurrency: method test_sync_tools_run_concurrently (line 45) | async def test_sync_tools_run_concurrently(self): method test_sync_tool_with_context_runs_concurrently (line 80) | async def test_sync_tool_with_context_runs_concurrently(self): FILE: tests/tools/tool/test_content.py class SampleModel (line 20) | class SampleModel(BaseModel): class TestConvertResultToContent (line 25) | class TestConvertResultToContent: method test_convert_singular (line 50) | def test_convert_singular(self, result, expected): method test_convert_list (line 98) | def test_convert_list(self, result, expected_text): method test_convert_content_block (line 129) | def test_convert_content_block(self, content_block): method test_convert_helpers (line 171) | def test_convert_helpers(self, result, expected): method test_convert_mixed_content (line 178) | def test_convert_mixed_content(self): method test_empty_list (line 233) | def test_empty_list(self): method test_empty_dict (line 239) | def test_empty_dict(self): class TestAutomaticStructuredContent (line 248) | class TestAutomaticStructuredContent: method test_dict_return_creates_structured_content_without_schema (line 251) | async def test_dict_return_creates_structured_content_without_schema(s... method test_dataclass_return_creates_structured_content_without_schema (line 267) | async def test_dataclass_return_creates_structured_content_without_sch... method test_pydantic_model_return_creates_structured_content_without_schema (line 294) | async def test_pydantic_model_return_creates_structured_content_withou... method test_self_referencing_dataclass_not_wrapped (line 322) | async def test_self_referencing_dataclass_not_wrapped(self): method test_self_referencing_pydantic_model_has_type_object_at_root (line 347) | async def test_self_referencing_pydantic_model_has_type_object_at_root... method test_self_referencing_model_outputschema_mcp_compliant (line 377) | async def test_self_referencing_model_outputschema_mcp_compliant(self): method test_int_return_no_structured_content_without_schema (line 410) | async def test_int_return_no_structured_content_without_schema(self): method test_str_return_no_structured_content_without_schema (line 428) | async def test_str_return_no_structured_content_without_schema(self): method test_list_return_no_structured_content_without_schema (line 446) | async def test_list_return_no_structured_content_without_schema(self): method test_audio_return_creates_no_structured_content (line 463) | async def test_audio_return_creates_no_structured_content(self): method test_int_return_with_schema_creates_structured_content (line 484) | async def test_int_return_with_schema_creates_structured_content(self): method test_client_automatic_deserialization_with_dict_result (line 503) | async def test_client_automatic_deserialization_with_dict_result(self): method test_client_automatic_deserialization_with_dataclass_result (line 526) | async def test_client_automatic_deserialization_with_dataclass_result(... FILE: tests/tools/tool/test_output_schema.py class TestToolFromFunctionOutputSchema (line 15) | class TestToolFromFunctionOutputSchema: method test_no_return_annotation (line 16) | async def test_no_return_annotation(self): method test_simple_return_annotation (line 42) | async def test_simple_return_annotation(self, annotation): method test_complex_return_annotation (line 76) | async def test_complex_return_annotation(self, annotation): method test_none_return_annotation (line 91) | async def test_none_return_annotation(self): method test_any_return_annotation (line 98) | async def test_any_return_annotation(self): method test_converted_return_annotation (line 118) | async def test_converted_return_annotation(self, annotation, expected): method test_tool_result_return_annotation_no_output_schema (line 126) | async def test_tool_result_return_annotation_no_output_schema(self): method test_tool_result_subclass_return_annotation_no_output_schema (line 133) | async def test_tool_result_subclass_return_annotation_no_output_schema... method test_optional_tool_result_subclass_no_output_schema (line 144) | async def test_optional_tool_result_subclass_no_output_schema(self): method test_dataclass_return_annotation (line 154) | async def test_dataclass_return_annotation(self): method test_base_model_return_annotation (line 169) | async def test_base_model_return_annotation(self): method test_typeddict_return_annotation (line 190) | async def test_typeddict_return_annotation(self): method test_unserializable_return_annotation (line 210) | async def test_unserializable_return_annotation(self): method test_mixed_unserializable_return_annotation (line 221) | async def test_mixed_unserializable_return_annotation(self): method test_provided_output_schema_takes_precedence_over_json_compatible_annotation (line 232) | async def test_provided_output_schema_takes_precedence_over_json_compa... method test_provided_output_schema_takes_precedence_over_complex_annotation (line 246) | async def test_provided_output_schema_takes_precedence_over_complex_an... method test_provided_output_schema_takes_precedence_over_unserializable_annotation (line 260) | async def test_provided_output_schema_takes_precedence_over_unserializ... method test_provided_output_schema_takes_precedence_over_no_annotation (line 281) | async def test_provided_output_schema_takes_precedence_over_no_annotat... method test_provided_output_schema_takes_precedence_over_converted_annotation (line 296) | async def test_provided_output_schema_takes_precedence_over_converted_... method test_provided_output_schema_takes_precedence_over_union_annotation (line 313) | async def test_provided_output_schema_takes_precedence_over_union_anno... method test_provided_output_schema_takes_precedence_over_pydantic_annotation (line 325) | async def test_provided_output_schema_takes_precedence_over_pydantic_a... method test_output_schema_false_allows_automatic_structured_content (line 346) | async def test_output_schema_false_allows_automatic_structured_content... method test_output_schema_none_disables_structured_content (line 362) | async def test_output_schema_none_disables_structured_content(self): method test_output_schema_inferred_when_not_specified (line 377) | async def test_output_schema_inferred_when_not_specified(self): method test_explicit_object_schema_with_dict_return (line 397) | async def test_explicit_object_schema_with_dict_return(self): method test_explicit_object_schema_with_non_dict_return_fails (line 418) | async def test_explicit_object_schema_with_non_dict_return_fails(self): method test_object_output_schema_not_wrapped (line 435) | async def test_object_output_schema_not_wrapped(self): method test_structured_content_interaction_with_wrapping (line 450) | async def test_structured_content_interaction_with_wrapping(self): method test_structured_content_with_explicit_object_schema (line 475) | async def test_structured_content_with_explicit_object_schema(self): method test_structured_content_with_custom_wrapper_schema (line 494) | async def test_structured_content_with_custom_wrapper_schema(self): method test_none_vs_false_output_schema_behavior (line 513) | async def test_none_vs_false_output_schema_behavior(self): method test_non_object_output_schema_raises_error (line 543) | async def test_non_object_output_schema_raises_error(self): class TestWrapResultMeta (line 565) | class TestWrapResultMeta: method test_list_return_includes_wrap_result_meta (line 566) | async def test_list_return_includes_wrap_result_meta(self): method test_int_return_includes_wrap_result_meta (line 577) | async def test_int_return_includes_wrap_result_meta(self): method test_dict_return_does_not_include_wrap_result_meta (line 588) | async def test_dict_return_does_not_include_wrap_result_meta(self): method test_no_schema_dict_return_no_meta (line 599) | async def test_no_schema_dict_return_no_meta(self): FILE: tests/tools/tool/test_results.py class TestToolResultCasting (line 9) | class TestToolResultCasting: method client (line 11) | async def client(self): method test_only_unstructured_content (line 32) | async def test_only_unstructured_content(self, client): method test_neither_unstructured_or_structured_content (line 40) | async def test_neither_unstructured_or_structured_content(self, client): method test_structured_and_unstructured_content (line 46) | async def test_structured_and_unstructured_content(self, client): method test_structured_unstructured_and_meta_content (line 57) | async def test_structured_unstructured_and_meta_content(self, client): class TestUnionReturnTypes (line 73) | class TestUnionReturnTypes: method test_dataclass_union_string_works (line 76) | async def test_dataclass_union_string_works(self): class TestSerializationAlias (line 99) | class TestSerializationAlias: method test_output_schema_respects_serialization_alias (line 102) | def test_output_schema_respects_serialization_alias(self): method test_tool_execution_with_serialization_alias (line 143) | async def test_tool_execution_with_serialization_alias(self): FILE: tests/tools/tool/test_title.py class TestToolTitle (line 4) | class TestToolTitle: method test_tool_with_title (line 7) | def test_tool_with_title(self): method test_tool_without_title (line 32) | def test_tool_without_title(self): method test_tool_title_priority (line 48) | def test_tool_title_priority(self): method test_tool_annotations_title_fallback (line 73) | def test_tool_annotations_title_fallback(self): FILE: tests/tools/tool/test_tool.py class TestToolFromFunction (line 17) | class TestToolFromFunction: method test_basic_function (line 18) | def test_basic_function(self): method test_meta_parameter (line 55) | def test_meta_parameter(self): method test_async_function (line 72) | async def test_async_function(self): method test_callable_object (line 106) | def test_callable_object(self): method test_async_callable_object (line 143) | def test_async_callable_object(self): method test_pydantic_model_function (line 180) | def test_pydantic_model_function(self): method test_tool_with_image_return (line 226) | async def test_tool_with_image_return(self): method test_tool_with_audio_return (line 237) | async def test_tool_with_audio_return(self): method test_tool_with_file_return (line 248) | async def test_tool_with_file_return(self): method test_non_callable_fn (line 270) | def test_non_callable_fn(self): method test_lambda (line 274) | def test_lambda(self): method test_lambda_with_no_name (line 293) | def test_lambda_with_no_name(self): method test_private_arguments (line 299) | def test_private_arguments(self): method test_tool_with_varargs_not_allowed (line 329) | def test_tool_with_varargs_not_allowed(self): method test_tool_with_varkwargs_not_allowed (line 339) | def test_tool_with_varkwargs_not_allowed(self): method test_instance_method (line 349) | async def test_instance_method(self): method test_instance_method_with_varargs_not_allowed (line 387) | async def test_instance_method_with_varargs_not_allowed(self): method test_instance_method_with_varkwargs_not_allowed (line 400) | async def test_instance_method_with_varkwargs_not_allowed(self): method test_classmethod (line 413) | async def test_classmethod(self): class TestToolNameValidation (line 429) | class TestToolNameValidation: method caplog_for_mcp_validation (line 433) | def caplog_for_mcp_validation(self, caplog): method test_valid_tool_names_no_warnings (line 460) | def test_valid_tool_names_no_warnings(self, name, caplog_for_mcp_valid... method test_tool_name_with_spaces_warns (line 470) | def test_tool_name_with_spaces_warns(self, caplog_for_mcp_validation): method test_tool_name_with_invalid_chars_warns (line 481) | def test_tool_name_with_invalid_chars_warns(self, caplog_for_mcp_valid... method test_tool_name_too_long_warns (line 492) | def test_tool_name_too_long_warns(self, caplog_for_mcp_validation): method test_tool_name_with_leading_dash_warns (line 504) | def test_tool_name_with_leading_dash_warns(self, caplog_for_mcp_valida... method test_tool_still_created_despite_warnings (line 515) | def test_tool_still_created_despite_warnings(self, caplog_for_mcp_vali... class TestToolExecutionField (line 528) | class TestToolExecutionField: method test_tool_with_execution_field (line 531) | def test_tool_with_execution_field(self): method test_tool_without_execution_field (line 544) | def test_tool_without_execution_field(self): method test_execution_override_takes_precedence (line 555) | def test_execution_override_takes_precedence(self): method test_function_tool_task_config_still_works (line 569) | async def test_function_tool_task_config_still_works(self): method test_tool_execution_required_mode (line 582) | def test_tool_execution_required_mode(self): method test_tool_execution_forbidden_mode (line 595) | def test_tool_execution_forbidden_mode(self): FILE: tests/tools/tool_transform/test_args.py function get_property (line 21) | def get_property(tool: Tool, name: str) -> dict[str, Any]: function add_tool (line 26) | def add_tool() -> FunctionTool: function test_tool_transform_chaining (line 36) | async def test_tool_transform_chaining(add_tool): class MyModel (line 62) | class MyModel(BaseModel): class MyDataclass (line 68) | class MyDataclass: class MyTypedDict (line 73) | class MyTypedDict(TypedDict): function test_arg_transform_type_handling (line 90) | def test_arg_transform_type_handling(add_tool, py_type, json_type): function test_arg_transform_annotated_types (line 98) | def test_arg_transform_annotated_types(add_tool): function test_arg_transform_precedence_over_function_without_kwargs (line 114) | def test_arg_transform_precedence_over_function_without_kwargs(): function test_arg_transform_precedence_over_function_with_kwargs (line 128) | async def test_arg_transform_precedence_over_function_with_kwargs(): function test_arg_transform_combined_attributes (line 170) | def test_arg_transform_combined_attributes(add_tool): function test_arg_transform_type_precedence_runtime (line 188) | async def test_arg_transform_type_precedence_runtime(): function test_arg_transform_default_factory (line 218) | async def test_arg_transform_default_factory(): function test_arg_transform_default_factory_called_each_time (line 246) | async def test_arg_transform_default_factory_called_each_time(): function test_arg_transform_hidden_with_default_factory (line 279) | async def test_arg_transform_hidden_with_default_factory(): function test_arg_transform_default_and_factory_raises_error (line 304) | async def test_arg_transform_default_and_factory_raises_error(): function test_arg_transform_default_factory_requires_hide (line 312) | async def test_arg_transform_default_factory_requires_hide(): function test_arg_transform_required_true (line 320) | async def test_arg_transform_required_true(add_tool): function test_arg_transform_required_false (line 331) | async def test_arg_transform_required_false(): function test_arg_transform_required_with_rename (line 345) | async def test_arg_transform_required_with_rename(add_tool): function test_arg_transform_required_true_with_default_raises_error (line 357) | async def test_arg_transform_required_true_with_default_raises_error(): function test_arg_transform_required_true_with_factory_raises_error (line 365) | async def test_arg_transform_required_true_with_factory_raises_error(): function test_arg_transform_required_no_change (line 373) | async def test_arg_transform_required_no_change(): function test_arg_transform_hide_and_required_raises_error (line 394) | async def test_arg_transform_hide_and_required_raises_error(): class TestEnableDisable (line 402) | class TestEnableDisable: method test_transform_disabled_tool (line 403) | async def test_transform_disabled_tool(self): method test_disable_transformed_tool (line 433) | async def test_disable_transformed_tool(self): FILE: tests/tools/tool_transform/test_metadata.py function get_property (line 13) | def get_property(tool: Tool, name: str) -> dict[str, Any]: function add_tool (line 18) | def add_tool() -> FunctionTool: function sample_tool (line 29) | def sample_tool(): function sample_tool_no_title (line 44) | def sample_tool_no_title(): function test_transform_inherits_title (line 53) | def test_transform_inherits_title(sample_tool): function test_transform_overrides_title (line 59) | def test_transform_overrides_title(sample_tool): function test_transform_sets_title_to_none (line 65) | def test_transform_sets_title_to_none(sample_tool): function test_transform_inherits_none_title (line 71) | def test_transform_inherits_none_title(sample_tool_no_title): function test_transform_adds_title_to_none (line 77) | def test_transform_adds_title_to_none(sample_tool_no_title): function test_transform_inherits_description (line 83) | def test_transform_inherits_description(sample_tool): function test_transform_overrides_description (line 89) | def test_transform_overrides_description(sample_tool): function test_transform_sets_description_to_none (line 95) | def test_transform_sets_description_to_none(sample_tool): function test_transform_inherits_none_description (line 101) | def test_transform_inherits_none_description(sample_tool_no_title): function test_transform_adds_description_to_none (line 107) | def test_transform_adds_description_to_none(sample_tool_no_title): function test_transform_inherits_meta (line 114) | def test_transform_inherits_meta(sample_tool): function test_transform_overrides_meta (line 121) | def test_transform_overrides_meta(sample_tool): function test_transform_sets_meta_to_none (line 128) | def test_transform_sets_meta_to_none(sample_tool): function test_transform_inherits_none_meta (line 135) | def test_transform_inherits_none_meta(sample_tool_no_title): function test_transform_adds_meta_to_none (line 142) | def test_transform_adds_meta_to_none(sample_tool_no_title): function test_tool_transform_config_inherits_meta (line 149) | def test_tool_transform_config_inherits_meta(sample_tool): function test_tool_transform_config_overrides_meta (line 157) | def test_tool_transform_config_overrides_meta(sample_tool): function test_tool_transform_config_removes_meta (line 167) | def test_tool_transform_config_removes_meta(sample_tool): function test_tool_transform_config_enabled_defaults_to_true (line 176) | def test_tool_transform_config_enabled_defaults_to_true(sample_tool): function test_tool_transform_config_enabled_false_sets_visibility_metadata (line 187) | def test_tool_transform_config_enabled_false_sets_visibility_metadata(sa... function test_tool_transform_config_enabled_true_explicit_sets_visibility (line 202) | def test_tool_transform_config_enabled_true_explicit_sets_visibility(sam... function test_tool_transform_config_enabled_false_preserves_existing_meta (line 216) | def test_tool_transform_config_enabled_false_preserves_existing_meta(sam... function test_tool_transform_config_enabled_false_merges_with_config_meta (line 231) | def test_tool_transform_config_enabled_false_merges_with_config_meta(sam... FILE: tests/tools/tool_transform/test_schemas.py function get_property (line 18) | def get_property(tool: Tool, name: str) -> dict[str, Any]: function add_tool (line 23) | def add_tool() -> FunctionTool: class TestTransformToolOutputSchema (line 33) | class TestTransformToolOutputSchema: method base_string_tool (line 37) | def base_string_tool(self) -> FunctionTool: method base_dict_tool (line 46) | def base_dict_tool(self) -> FunctionTool: method test_transform_inherits_parent_output_schema (line 54) | def test_transform_inherits_parent_output_schema(self, base_string_tool): method test_transform_with_explicit_output_schema_none (line 68) | def test_transform_with_explicit_output_schema_none(self, base_string_... method test_transform_output_schema_none_runtime (line 74) | async def test_transform_output_schema_none_runtime(self, base_string_... method test_transform_with_explicit_output_schema_dict (line 89) | def test_transform_with_explicit_output_schema_dict(self, base_string_... method test_transform_explicit_schema_runtime (line 100) | async def test_transform_explicit_schema_runtime(self, base_string_tool): method test_transform_with_custom_function_inferred_schema (line 111) | def test_transform_with_custom_function_inferred_schema(self, base_dic... method test_transform_custom_function_runtime (line 130) | async def test_transform_custom_function_runtime(self, base_dict_tool): method test_transform_custom_function_fallback_to_parent (line 144) | def test_transform_custom_function_fallback_to_parent(self, base_strin... method test_transform_custom_function_explicit_overrides (line 157) | def test_transform_custom_function_explicit_overrides(self, base_strin... method test_transform_custom_function_object_return (line 171) | async def test_transform_custom_function_object_return(self, base_stri... method test_transform_preserves_wrap_marker_behavior (line 190) | async def test_transform_preserves_wrap_marker_behavior(self, base_str... method test_transform_chained_output_schema_inheritance (line 200) | def test_transform_chained_output_schema_inheritance(self, base_string... method test_transform_mixed_structured_unstructured_content (line 218) | async def test_transform_mixed_structured_unstructured_content( method test_transform_output_schema_with_arg_transforms (line 246) | def test_transform_output_schema_with_arg_transforms(self, base_string... method test_transform_output_schema_default_vs_none (line 264) | async def test_transform_output_schema_default_vs_none(self, base_stri... method test_transform_output_schema_with_tool_result_return (line 288) | async def test_transform_output_schema_with_tool_result_return( class TestInputSchema (line 312) | class TestInputSchema: method test_arg_transform_examples_in_schema (line 315) | def test_arg_transform_examples_in_schema(self, add_tool: Tool): method test_merge_schema_with_defs_precedence (line 346) | def test_merge_schema_with_defs_precedence(self): method test_transform_tool_with_complex_defs_pruning (line 394) | def test_transform_tool_with_complex_defs_pruning(self): method test_transform_with_custom_function_preserves_needed_types (line 439) | def test_transform_with_custom_function_preserves_needed_types(self): method test_chained_transforms_inline_types (line 481) | def test_chained_transforms_inline_types(self): FILE: tests/tools/tool_transform/test_tool_transform.py function get_property (line 21) | def get_property(tool: Tool, name: str) -> dict[str, Any]: function add_tool (line 26) | def add_tool() -> FunctionTool: function test_tool_from_tool_no_change (line 36) | def test_tool_from_tool_no_change(add_tool): function test_from_tool_accepts_decorated_function (line 44) | def test_from_tool_accepts_decorated_function(): function test_from_tool_accepts_plain_function (line 61) | def test_from_tool_accepts_plain_function(): function test_from_tool_decorated_function_preserves_metadata (line 75) | def test_from_tool_decorated_function_preserves_metadata(): function test_from_tool_decorated_function_runs (line 85) | async def test_from_tool_decorated_function_runs(add_tool): function test_renamed_arg_description_is_maintained (line 98) | async def test_renamed_arg_description_is_maintained(add_tool): function test_tool_defaults_are_maintained_on_unmapped_args (line 107) | async def test_tool_defaults_are_maintained_on_unmapped_args(add_tool): function test_tool_defaults_are_maintained_on_mapped_args (line 116) | async def test_tool_defaults_are_maintained_on_mapped_args(add_tool): function test_tool_change_arg_name (line 125) | def test_tool_change_arg_name(add_tool): function test_tool_change_arg_description (line 136) | def test_tool_change_arg_description(add_tool): function test_tool_drop_arg (line 143) | async def test_tool_drop_arg(add_tool): function test_dropped_args_error_if_provided (line 152) | async def test_dropped_args_error_if_provided(add_tool): function test_hidden_arg_with_constant_default (line 162) | async def test_hidden_arg_with_constant_default(add_tool): function test_hidden_arg_without_default_uses_parent_default (line 171) | async def test_hidden_arg_without_default_uses_parent_default(add_tool): function test_mixed_hidden_args_with_custom_function (line 185) | async def test_mixed_hidden_args_with_custom_function(add_tool): function test_hide_required_param_without_default_raises_error (line 205) | async def test_hide_required_param_without_default_raises_error(): function test_hide_required_param_with_user_default_works (line 223) | async def test_hide_required_param_with_user_default_works(): function test_hidden_param_prunes_defs (line 243) | async def test_hidden_param_prunes_defs(): function test_forward_with_argument_mapping (line 273) | async def test_forward_with_argument_mapping(add_tool): function test_forward_with_incorrect_args_raises_error (line 290) | async def test_forward_with_incorrect_args_raises_error(add_tool): function test_forward_raw_without_argument_mapping (line 309) | async def test_forward_raw_without_argument_mapping(add_tool): function test_custom_fn_with_kwargs_and_no_transform_args (line 323) | async def test_custom_fn_with_kwargs_and_no_transform_args(add_tool): function test_fn_with_kwargs_passes_through_original_args (line 336) | async def test_fn_with_kwargs_passes_through_original_args(add_tool): function test_fn_with_kwargs_receives_transformed_arg_names (line 352) | async def test_fn_with_kwargs_receives_transformed_arg_names(add_tool): function test_fn_with_kwargs_handles_partial_explicit_args (line 372) | async def test_fn_with_kwargs_handles_partial_explicit_args(add_tool): function test_fn_with_kwargs_mixed_mapped_and_unmapped_args (line 390) | async def test_fn_with_kwargs_mixed_mapped_and_unmapped_args(add_tool): function test_fn_with_kwargs_dropped_args_not_in_kwargs (line 407) | async def test_fn_with_kwargs_dropped_args_not_in_kwargs(add_tool): function test_forward_outside_context_raises_error (line 429) | async def test_forward_outside_context_raises_error(): function test_forward_raw_outside_context_raises_error (line 435) | async def test_forward_raw_outside_context_raises_error(): function test_transform_args_with_parent_defaults (line 441) | def test_transform_args_with_parent_defaults(): function test_transform_args_validation_unknown_arg (line 458) | def test_transform_args_validation_unknown_arg(add_tool): function test_transform_args_creates_duplicate_names (line 470) | def test_transform_args_creates_duplicate_names(add_tool): function test_transform_args_collision_with_passthrough_name (line 485) | def test_transform_args_collision_with_passthrough_name(add_tool): function test_function_without_kwargs_missing_params (line 499) | def test_function_without_kwargs_missing_params(add_tool): function test_function_without_kwargs_can_have_extra_params (line 519) | def test_function_without_kwargs_can_have_extra_params(add_tool): function test_function_with_kwargs_can_add_params (line 541) | def test_function_with_kwargs_can_add_params(add_tool): function test_from_tool_decorated_function_via_client (line 563) | async def test_from_tool_decorated_function_via_client(): class TestProxy (line 586) | class TestProxy: method mcp_server (line 588) | def mcp_server(self) -> FastMCP: method proxy_server (line 598) | def proxy_server(self, mcp_server: FastMCP) -> FastMCP: method test_transform_proxy (line 604) | async def test_transform_proxy(self, proxy_server: FastMCP): FILE: tests/utilities/json_schema_type/test_advanced.py function get_dataclass_field (line 16) | def get_dataclass_field(type: type, field_name: str) -> Field: class TestDefaultValues (line 20) | class TestDefaultValues: method simple_defaults (line 24) | def simple_defaults(self): method nested_defaults (line 36) | def nested_defaults(self): method test_simple_defaults_empty_object (line 59) | def test_simple_defaults_empty_object(self, simple_defaults): method test_simple_defaults_partial_override (line 65) | def test_simple_defaults_partial_override(self, simple_defaults): method test_nested_defaults_empty_object (line 71) | def test_nested_defaults_empty_object(self, nested_defaults): method test_nested_defaults_partial_override (line 77) | def test_nested_defaults_partial_override(self, nested_defaults): class TestCircularReferences (line 84) | class TestCircularReferences: method self_referential (line 88) | def self_referential(self): method mutually_recursive (line 97) | def mutually_recursive(self): method test_self_ref_single_level (line 121) | def test_self_ref_single_level(self, self_referential): method test_self_ref_multiple_levels (line 130) | def test_self_ref_multiple_levels(self, self_referential): method test_mutual_recursion_single_level (line 142) | def test_mutual_recursion_single_level(self, mutually_recursive): method test_mutual_recursion_multiple_levels (line 151) | def test_mutual_recursion_multiple_levels(self, mutually_recursive): class TestIdentifierNormalization (line 166) | class TestIdentifierNormalization: method special_chars (line 170) | def special_chars(self): method test_normalizes_special_chars (line 184) | def test_normalizes_special_chars(self, special_chars): class TestConstantValues (line 204) | class TestConstantValues: method string_const (line 208) | def string_const(self): method number_const (line 212) | def number_const(self): method boolean_const (line 216) | def boolean_const(self): method null_const (line 220) | def null_const(self): method object_with_consts (line 224) | def object_with_consts(self): method test_string_const_valid (line 236) | def test_string_const_valid(self, string_const): method test_string_const_invalid (line 240) | def test_string_const_invalid(self, string_const): method test_number_const_valid (line 245) | def test_number_const_valid(self, number_const): method test_number_const_invalid (line 249) | def test_number_const_invalid(self, number_const): method test_boolean_const_valid (line 254) | def test_boolean_const_valid(self, boolean_const): method test_boolean_const_invalid (line 258) | def test_boolean_const_invalid(self, boolean_const): method test_null_const_valid (line 263) | def test_null_const_valid(self, null_const): method test_null_const_invalid (line 267) | def test_null_const_invalid(self, null_const): method test_object_consts_valid (line 272) | def test_object_consts_valid(self, object_with_consts): method test_object_consts_invalid (line 281) | def test_object_consts_invalid(self, object_with_consts): class TestSchemaCaching (line 293) | class TestSchemaCaching: method test_identical_schemas_reuse_class (line 296) | def test_identical_schemas_reuse_class(self): method test_different_names_different_classes (line 303) | def test_different_names_different_classes(self): method test_nested_schema_caching (line 312) | def test_nested_schema_caching(self): class TestSchemaHashing (line 331) | class TestSchemaHashing: method test_deterministic_hash (line 334) | def test_deterministic_hash(self): method test_different_schemas_different_hashes (line 342) | def test_different_schemas_different_hashes(self): method test_order_independent_hash (line 347) | def test_order_independent_hash(self): method test_nested_schema_hash (line 352) | def test_nested_schema_hash(self): class TestDefaultMerging (line 364) | class TestDefaultMerging: method test_simple_merge (line 367) | def test_simple_merge(self): method test_nested_merge (line 374) | def test_nested_merge(self): method test_array_merge (line 381) | def test_array_merge(self): method test_empty_data_uses_defaults (line 394) | def test_empty_data_uses_defaults(self): method test_property_level_defaults (line 411) | def test_property_level_defaults(self): method test_nested_property_defaults (line 422) | def test_nested_property_defaults(self): method test_default_priority (line 443) | def test_default_priority(self): class TestEdgeCases (line 468) | class TestEdgeCases: method test_empty_schema (line 471) | def test_empty_schema(self): method test_schema_without_type (line 476) | def test_schema_without_type(self): method test_recursive_defaults (line 483) | def test_recursive_defaults(self): method test_mixed_type_array (line 500) | def test_mixed_type_array(self): class TestNameHandling (line 511) | class TestNameHandling: method test_name_from_title (line 514) | def test_name_from_title(self): method test_explicit_name_overrides_title (line 523) | def test_explicit_name_overrides_title(self): method test_default_name_without_title (line 532) | def test_default_name_without_title(self): method test_name_only_allowed_for_objects (line 537) | def test_name_only_allowed_for_objects(self): method test_nested_object_names (line 542) | def test_nested_object_names(self): method test_recursive_schema_naming (line 561) | def test_recursive_schema_naming(self): method test_name_caching_with_different_titles (line 576) | def test_name_caching_with_different_titles(self): method test_recursive_schema_with_invalid_python_name (line 594) | def test_recursive_schema_with_invalid_python_name(self): class TestAdditionalProperties (line 614) | class TestAdditionalProperties: method dict_only_schema (line 618) | def dict_only_schema(self): method properties_with_additional (line 623) | def properties_with_additional(self): method properties_without_additional (line 637) | def properties_without_additional(self): method required_properties_with_additional (line 650) | def required_properties_with_additional(self): method test_dict_only_returns_dict_type (line 664) | def test_dict_only_returns_dict_type(self, dict_only_schema): method test_dict_only_accepts_any_data (line 670) | def test_dict_only_accepts_any_data(self, dict_only_schema): method test_properties_with_additional_returns_basemodel (line 678) | def test_properties_with_additional_returns_basemodel( method test_properties_with_additional_accepts_extra_fields (line 684) | def test_properties_with_additional_accepts_extra_fields( method test_properties_with_additional_validates_known_fields (line 707) | def test_properties_with_additional_validates_known_fields( method test_properties_without_additional_is_dataclass (line 723) | def test_properties_without_additional_is_dataclass( method test_properties_without_additional_ignores_extra_fields (line 730) | def test_properties_without_additional_ignores_extra_fields( method test_required_properties_with_additional (line 745) | def test_required_properties_with_additional( method test_nested_additional_properties (line 761) | def test_nested_additional_properties(self): method test_additional_properties_false_vs_missing (line 803) | def test_additional_properties_false_vs_missing(self): method test_additional_properties_with_defaults (line 827) | def test_additional_properties_with_defaults(self): method test_additional_properties_type_consistency (line 847) | def test_additional_properties_type_consistency(self): class TestFieldsWithDefaults (line 863) | class TestFieldsWithDefaults: method test_field_with_default_preserves_type (line 866) | def test_field_with_default_preserves_type(self): method test_field_with_default_not_nullable (line 878) | def test_field_with_default_not_nullable(self): method test_field_with_default_uses_default (line 891) | def test_field_with_default_uses_default(self): method test_field_with_default_accepts_explicit_value (line 903) | def test_field_with_default_accepts_explicit_value(self): FILE: tests/utilities/json_schema_type/test_constraints.py function get_dataclass_field (line 13) | def get_dataclass_field(type: type, field_name: str) -> Field: class TestStringConstraints (line 17) | class TestStringConstraints: method min_length_string (line 21) | def min_length_string(self): method max_length_string (line 25) | def max_length_string(self): method pattern_string (line 29) | def pattern_string(self): method email_string (line 33) | def email_string(self): method test_min_length_accepts_valid (line 36) | def test_min_length_accepts_valid(self, min_length_string): method test_min_length_rejects_short (line 40) | def test_min_length_rejects_short(self, min_length_string): method test_max_length_accepts_valid (line 45) | def test_max_length_accepts_valid(self, max_length_string): method test_max_length_rejects_long (line 49) | def test_max_length_rejects_long(self, max_length_string): method test_pattern_accepts_valid (line 54) | def test_pattern_accepts_valid(self, pattern_string): method test_pattern_rejects_invalid (line 58) | def test_pattern_rejects_invalid(self, pattern_string): method test_email_accepts_valid (line 63) | def test_email_accepts_valid(self, email_string): method test_email_rejects_invalid (line 68) | def test_email_rejects_invalid(self, email_string): class TestNumberConstraints (line 74) | class TestNumberConstraints: method multiple_of_number (line 78) | def multiple_of_number(self): method min_number (line 82) | def min_number(self): method exclusive_min_number (line 86) | def exclusive_min_number(self): method max_number (line 90) | def max_number(self): method exclusive_max_number (line 94) | def exclusive_max_number(self): method test_multiple_of_accepts_valid (line 97) | def test_multiple_of_accepts_valid(self, multiple_of_number): method test_multiple_of_rejects_invalid (line 101) | def test_multiple_of_rejects_invalid(self, multiple_of_number): method test_minimum_accepts_equal (line 106) | def test_minimum_accepts_equal(self, min_number): method test_minimum_rejects_less (line 110) | def test_minimum_rejects_less(self, min_number): method test_exclusive_minimum_rejects_equal (line 115) | def test_exclusive_minimum_rejects_equal(self, exclusive_min_number): method test_maximum_accepts_equal (line 120) | def test_maximum_accepts_equal(self, max_number): method test_maximum_rejects_greater (line 124) | def test_maximum_rejects_greater(self, max_number): method test_exclusive_maximum_rejects_equal (line 129) | def test_exclusive_maximum_rejects_equal(self, exclusive_max_number): FILE: tests/utilities/json_schema_type/test_containers.py function get_dataclass_field (line 14) | def get_dataclass_field(type: type, field_name: str) -> Field: class TestArrayTypes (line 18) | class TestArrayTypes: method string_array (line 22) | def string_array(self): method min_items_array (line 26) | def min_items_array(self): method max_items_array (line 32) | def max_items_array(self): method unique_items_array (line 38) | def unique_items_array(self): method test_array_accepts_valid_items (line 43) | def test_array_accepts_valid_items(self, string_array): method test_array_rejects_invalid_items (line 47) | def test_array_rejects_invalid_items(self, string_array): method test_min_items_accepts_valid (line 52) | def test_min_items_accepts_valid(self, min_items_array): method test_min_items_rejects_too_few (line 56) | def test_min_items_rejects_too_few(self, min_items_array): method test_max_items_accepts_valid (line 61) | def test_max_items_accepts_valid(self, max_items_array): method test_max_items_rejects_too_many (line 65) | def test_max_items_rejects_too_many(self, max_items_array): method test_unique_items_accepts_unique (line 70) | def test_unique_items_accepts_unique(self, unique_items_array): method test_unique_items_converts_duplicates (line 74) | def test_unique_items_converts_duplicates(self, unique_items_array): class TestObjectTypes (line 80) | class TestObjectTypes: method simple_object (line 84) | def simple_object(self): method required_object (line 93) | def required_object(self): method nested_object (line 103) | def nested_object(self): method test_dict_types_are_generated_correctly (line 138) | def test_dict_types_are_generated_correctly(self, input_type, expected... method test_object_accepts_valid (line 143) | def test_object_accepts_valid(self, simple_object): method test_object_accepts_extra_properties (line 149) | def test_object_accepts_extra_properties(self, simple_object): method test_required_accepts_valid (line 158) | def test_required_accepts_valid(self, required_object): method test_required_rejects_missing (line 164) | def test_required_rejects_missing(self, required_object): method test_nested_accepts_valid (line 169) | def test_nested_accepts_valid(self, nested_object): method test_nested_rejects_invalid (line 175) | def test_nested_rejects_invalid(self, nested_object): method test_object_with_underscore_names (line 180) | def test_object_with_underscore_names(self): FILE: tests/utilities/json_schema_type/test_formats.py function get_dataclass_field (line 14) | def get_dataclass_field(type: type, field_name: str) -> Field: class TestFormatTypes (line 18) | class TestFormatTypes: method datetime_format (line 22) | def datetime_format(self): method email_format (line 26) | def email_format(self): method uri_format (line 30) | def uri_format(self): method uri_reference_format (line 34) | def uri_reference_format(self): method json_format (line 38) | def json_format(self): method mixed_formats_object (line 42) | def mixed_formats_object(self): method test_datetime_valid (line 53) | def test_datetime_valid(self, datetime_format): method test_datetime_invalid (line 58) | def test_datetime_invalid(self, datetime_format): method test_email_valid (line 63) | def test_email_valid(self, email_format): method test_email_invalid (line 68) | def test_email_invalid(self, email_format): method test_uri_valid (line 73) | def test_uri_valid(self, uri_format): method test_uri_invalid (line 78) | def test_uri_invalid(self, uri_format): method test_uri_reference_valid (line 83) | def test_uri_reference_valid(self, uri_reference_format): method test_uri_reference_relative_valid (line 88) | def test_uri_reference_relative_valid(self, uri_reference_format): method test_uri_reference_invalid (line 93) | def test_uri_reference_invalid(self, uri_reference_format): method test_json_valid (line 98) | def test_json_valid(self, json_format): method test_json_invalid (line 103) | def test_json_invalid(self, json_format): method test_mixed_formats_object (line 108) | def test_mixed_formats_object(self, mixed_formats_object): FILE: tests/utilities/json_schema_type/test_json_schema_type.py function get_dataclass_field (line 15) | def get_dataclass_field(type: type, field_name: str) -> Field: class TestSimpleTypes (line 19) | class TestSimpleTypes: method simple_string (line 23) | def simple_string(self): method simple_number (line 27) | def simple_number(self): method simple_integer (line 31) | def simple_integer(self): method simple_boolean (line 35) | def simple_boolean(self): method simple_null (line 39) | def simple_null(self): method test_string_accepts_string (line 42) | def test_string_accepts_string(self, simple_string): method test_string_rejects_number (line 46) | def test_string_rejects_number(self, simple_string): method test_number_accepts_float (line 51) | def test_number_accepts_float(self, simple_number): method test_number_accepts_integer (line 55) | def test_number_accepts_integer(self, simple_number): method test_number_accepts_numeric_string (line 59) | def test_number_accepts_numeric_string(self, simple_number): method test_number_rejects_invalid_string (line 64) | def test_number_rejects_invalid_string(self, simple_number): method test_integer_accepts_integer (line 69) | def test_integer_accepts_integer(self, simple_integer): method test_integer_accepts_integer_string (line 73) | def test_integer_accepts_integer_string(self, simple_integer): method test_integer_rejects_float (line 77) | def test_integer_rejects_float(self, simple_integer): method test_integer_rejects_float_string (line 82) | def test_integer_rejects_float_string(self, simple_integer): method test_boolean_accepts_boolean (line 87) | def test_boolean_accepts_boolean(self, simple_boolean): method test_boolean_accepts_boolean_strings (line 92) | def test_boolean_accepts_boolean_strings(self, simple_boolean): method test_boolean_rejects_invalid_string (line 99) | def test_boolean_rejects_invalid_string(self, simple_boolean): method test_null_accepts_none (line 104) | def test_null_accepts_none(self, simple_null): method test_null_rejects_false (line 108) | def test_null_rejects_false(self, simple_null): class TestConstrainedTypes (line 114) | class TestConstrainedTypes: method test_constant (line 115) | def test_constant(self): method test_union_constants (line 124) | def test_union_constants(self): method test_enum_str (line 134) | def test_enum_str(self): method test_enum_int (line 148) | def test_enum_int(self): method test_choice (line 162) | def test_choice(self): FILE: tests/utilities/json_schema_type/test_unions.py function get_dataclass_field (line 13) | def get_dataclass_field(type: type, field_name: str) -> Field: class TestUnionTypes (line 17) | class TestUnionTypes: method heterogeneous_union (line 21) | def heterogeneous_union(self): method union_with_constraints (line 25) | def union_with_constraints(self): method union_with_formats (line 31) | def union_with_formats(self): method nested_union_array (line 35) | def nested_union_array(self): method nested_union_object (line 41) | def nested_union_object(self): method test_heterogeneous_accepts_string (line 55) | def test_heterogeneous_accepts_string(self, heterogeneous_union): method test_heterogeneous_accepts_number (line 59) | def test_heterogeneous_accepts_number(self, heterogeneous_union): method test_heterogeneous_accepts_boolean (line 63) | def test_heterogeneous_accepts_boolean(self, heterogeneous_union): method test_heterogeneous_accepts_null (line 67) | def test_heterogeneous_accepts_null(self, heterogeneous_union): method test_heterogeneous_rejects_array (line 71) | def test_heterogeneous_rejects_array(self, heterogeneous_union): method test_constrained_string_valid (line 76) | def test_constrained_string_valid(self, union_with_constraints): method test_constrained_string_invalid (line 80) | def test_constrained_string_invalid(self, union_with_constraints): method test_constrained_number_valid (line 85) | def test_constrained_number_valid(self, union_with_constraints): method test_constrained_number_invalid (line 89) | def test_constrained_number_invalid(self, union_with_constraints): method test_format_valid_email (line 94) | def test_format_valid_email(self, union_with_formats): method test_format_valid_null (line 99) | def test_format_valid_null(self, union_with_formats): method test_format_invalid_email (line 103) | def test_format_invalid_email(self, union_with_formats): method test_nested_array_mixed_types (line 108) | def test_nested_array_mixed_types(self, nested_union_array): method test_nested_array_rejects_invalid (line 113) | def test_nested_array_rejects_invalid(self, nested_union_array): method test_nested_object_string_id (line 118) | def test_nested_object_string_id(self, nested_union_object): method test_nested_object_integer_id (line 124) | def test_nested_object_integer_id(self, nested_union_object): FILE: tests/utilities/openapi/conftest.py function basic_openapi_30_spec (line 7) | def basic_openapi_30_spec(): function basic_openapi_31_spec (line 49) | def basic_openapi_31_spec(): function collision_spec (line 91) | def collision_spec(): function deepobject_spec (line 131) | def deepobject_spec(): function complex_spec (line 170) | def complex_spec(): FILE: tests/utilities/openapi/test_allof_requestbody.py function test_allof_at_requestbody_top_level (line 10) | def test_allof_at_requestbody_top_level(): function test_allof_with_nested_properties (line 72) | def test_allof_with_nested_properties(): function test_allof_with_overlapping_properties (line 139) | def test_allof_with_overlapping_properties(): function test_no_allof_passthrough (line 195) | def test_no_allof_passthrough(): FILE: tests/utilities/openapi/test_circular_references.py class TestCircularReferencesSerialization (line 15) | class TestCircularReferencesSerialization: method test_replace_ref_with_defs_does_not_mutate_input (line 27) | def test_replace_ref_with_defs_does_not_mutate_input(self): method test_replace_ref_with_defs_produces_independent_results (line 44) | def test_replace_ref_with_defs_produces_independent_results(self): method test_circular_output_schema_serialization (line 70) | def test_circular_output_schema_serialization(self): method test_mutual_circular_references_serialization (line 116) | def test_mutual_circular_references_serialization(self): method test_multiple_tools_sharing_circular_schemas (line 161) | async def test_multiple_tools_sharing_circular_schemas(self): FILE: tests/utilities/openapi/test_direct_array_schemas.py class TestDirectArraySchemas (line 13) | class TestDirectArraySchemas: method test_simple_direct_array_schema (line 16) | def test_simple_direct_array_schema(self): method test_int_array_schema (line 55) | def test_int_array_schema(self): method test_mixed_params_with_direct_array (line 89) | def test_mixed_params_with_direct_array(self): method test_direct_array_no_title (line 139) | def test_direct_array_no_title(self): method test_direct_primitive_schema (line 169) | def test_direct_primitive_schema(self): method test_direct_array_optional (line 196) | def test_direct_array_optional(self): method test_direct_array_title_sanitization (line 222) | def test_direct_array_title_sanitization(self): method test_direct_array_title_starting_with_number (line 247) | def test_direct_array_title_starting_with_number(self): method test_preserve_existing_behavior_object_body (line 272) | def test_preserve_existing_behavior_object_body(self): method test_preserve_existing_behavior_ref_body (line 303) | def test_preserve_existing_behavior_ref_body(self): FILE: tests/utilities/openapi/test_director.py class TestRequestDirector (line 17) | class TestRequestDirector: method basic_route (line 21) | def basic_route(self): method complex_route (line 44) | def complex_route(self): method collision_route (line 107) | def collision_route(self): method director (line 151) | def director(self, basic_openapi_30_spec): method test_director_initialization (line 156) | def test_director_initialization(self, basic_openapi_30_spec): method test_build_basic_request (line 164) | def test_build_basic_request(self, director, basic_route): method test_build_complex_request (line 176) | def test_build_complex_request(self, director, complex_route): method test_build_request_with_collisions (line 206) | def test_build_request_with_collisions(self, director, collision_route): method test_build_request_with_none_values (line 226) | def test_build_request_with_none_values(self, director, complex_route): method test_build_request_fallback_mapping (line 251) | def test_build_request_fallback_mapping(self, director): method test_build_request_suffixed_parameters (line 278) | def test_build_request_suffixed_parameters(self, director): method test_url_building (line 319) | def test_url_building(self, director, basic_route): method test_body_construction_single_value (line 335) | def test_body_construction_single_value(self, director): method test_body_construction_multiple_properties_non_object_schema (line 358) | def test_body_construction_multiple_properties_non_object_schema(self,... class TestRequestDirectorIntegration (line 388) | class TestRequestDirectorIntegration: method test_with_parsed_routes (line 391) | def test_with_parsed_routes(self, basic_openapi_30_spec): method test_with_collision_spec (line 406) | def test_with_collision_spec(self, collision_spec): method test_with_deepobject_spec (line 439) | def test_with_deepobject_spec(self, deepobject_spec): class TestPathTraversalPrevention (line 467) | class TestPathTraversalPrevention: method director (line 471) | def director(self, basic_openapi_30_spec): method path_route (line 476) | def path_route(self): method test_path_traversal_encoded (line 508) | def test_path_traversal_encoded(self, director, path_route, malicious_... method test_slash_in_param_is_encoded (line 518) | def test_slash_in_param_is_encoded(self, director, path_route): method test_dot_dot_slash_is_encoded (line 524) | def test_dot_dot_slash_is_encoded(self, director, path_route): method test_question_mark_encoded (line 532) | def test_question_mark_encoded(self, director, path_route): method test_hash_encoded (line 539) | def test_hash_encoded(self, director, path_route): method test_normal_values_still_work (line 546) | def test_normal_values_still_work(self, director, path_route): method test_dotted_values_encode_dots (line 554) | def test_dotted_values_encode_dots(self, director, path_route): method test_numeric_values_still_work (line 563) | def test_numeric_values_still_work(self, director, path_route): method test_bare_single_dot_encoded (line 567) | def test_bare_single_dot_encoded(self, director, path_route): method test_bare_dotdot_encoded (line 574) | def test_bare_dotdot_encoded(self, director, path_route): method test_double_encoded_traversal (line 581) | def test_double_encoded_traversal(self, director, path_route): FILE: tests/utilities/openapi/test_legacy_compatibility.py class TestSchemaGeneration (line 15) | class TestSchemaGeneration: method test_optional_parameter_nullable_behavior (line 18) | def test_optional_parameter_nullable_behavior(self): method test_parameter_collision_handling (line 54) | def test_parameter_collision_handling(self): method test_nullable_behavior_different_types (line 115) | def test_nullable_behavior_different_types(self, param_type): method test_no_parameters_no_body (line 141) | def test_no_parameters_no_body(self): method test_body_only_no_parameters (line 157) | def test_body_only_no_parameters(self): FILE: tests/utilities/openapi/test_models.py class TestParameterInfo (line 16) | class TestParameterInfo: method test_basic_parameter_creation (line 19) | def test_basic_parameter_creation(self): method test_parameter_with_all_fields (line 36) | def test_parameter_with_all_fields(self): method test_valid_parameter_locations (line 56) | def test_valid_parameter_locations(self, location: ParameterLocation): method test_parameter_defaults (line 66) | def test_parameter_defaults(self): method test_parameter_with_empty_schema (line 80) | def test_parameter_with_empty_schema(self): class TestRequestBodyInfo (line 91) | class TestRequestBodyInfo: method test_basic_request_body (line 94) | def test_basic_request_body(self): method test_request_body_with_content_schema (line 105) | def test_request_body_with_content_schema(self): method test_request_body_defaults (line 125) | def test_request_body_defaults(self): method test_request_body_multiple_content_types (line 133) | def test_request_body_multiple_content_types(self): class TestResponseInfo (line 153) | class TestResponseInfo: method test_basic_response (line 156) | def test_basic_response(self): method test_response_with_content_schema (line 163) | def test_response_with_content_schema(self): method test_response_required_description (line 183) | def test_response_required_description(self): class TestHTTPRoute (line 190) | class TestHTTPRoute: method test_basic_route_creation (line 193) | def test_basic_route_creation(self): method test_route_with_all_fields (line 211) | def test_route_with_all_fields(self): method test_route_pre_calculated_fields (line 270) | def test_route_pre_calculated_fields(self): method test_valid_http_methods (line 291) | def test_valid_http_methods(self, method: HttpMethod): method test_route_with_empty_collections (line 300) | def test_route_with_empty_collections(self): method test_route_defaults (line 320) | def test_route_defaults(self): class TestModelValidation (line 341) | class TestModelValidation: method test_parameter_info_validation (line 344) | def test_parameter_info_validation(self): method test_route_validation (line 354) | def test_route_validation(self): method test_nested_model_validation (line 364) | def test_nested_model_validation(self): class TestModelSerialization (line 390) | class TestModelSerialization: method test_parameter_info_serialization (line 393) | def test_parameter_info_serialization(self): method test_route_serialization (line 416) | def test_route_serialization(self): method test_model_reconstruction (line 441) | def test_model_reconstruction(self): FILE: tests/utilities/openapi/test_nullable_fields.py class TestHandleNullableFields (line 11) | class TestHandleNullableFields: method test_root_level_nullable_string (line 14) | def test_root_level_nullable_string(self): method test_root_level_nullable_integer (line 21) | def test_root_level_nullable_integer(self): method test_root_level_nullable_boolean (line 28) | def test_root_level_nullable_boolean(self): method test_property_level_nullable_fields (line 35) | def test_property_level_nullable_fields(self): method test_mixed_nullable_and_non_nullable (line 58) | def test_mixed_nullable_and_non_nullable(self): method test_nullable_false_ignored (line 81) | def test_nullable_false_ignored(self): method test_no_nullable_field_unchanged (line 88) | def test_no_nullable_field_unchanged(self): method test_nullable_without_type_removes_nullable (line 98) | def test_nullable_without_type_removes_nullable(self): method test_preserves_other_fields (line 105) | def test_preserves_other_fields(self): method test_non_dict_input_unchanged (line 123) | def test_non_dict_input_unchanged(self): method test_performance_optimization_no_copy_when_unchanged (line 140) | def test_performance_optimization_no_copy_when_unchanged(self): method test_union_types_with_nullable (line 150) | def test_union_types_with_nullable(self): method test_already_nullable_union_unchanged (line 157) | def test_already_nullable_union_unchanged(self): method test_property_level_union_with_nullable (line 164) | def test_property_level_union_with_nullable(self): method test_complex_union_nullable_scenarios (line 177) | def test_complex_union_nullable_scenarios(self): method test_oneof_with_nullable (line 189) | def test_oneof_with_nullable(self): method test_anyof_with_nullable (line 201) | def test_anyof_with_nullable(self): method test_anyof_already_nullable (line 213) | def test_anyof_already_nullable(self): method test_allof_with_nullable (line 223) | def test_allof_with_nullable(self): method test_property_level_oneof_with_nullable (line 238) | def test_property_level_oneof_with_nullable(self): method test_nullable_enum_field (line 260) | def test_nullable_enum_field(self): method test_nullable_enum_already_contains_null (line 274) | def test_nullable_enum_already_contains_null(self): method test_nullable_enum_without_type (line 288) | def test_nullable_enum_without_type(self): method test_non_nullable_enum_unchanged (line 300) | def test_non_nullable_enum_unchanged(self): method test_property_level_nullable_enum (line 313) | def test_property_level_nullable_enum(self): method test_nullable_integer_enum (line 339) | def test_nullable_integer_enum(self): class TestNullableFieldValidation (line 354) | class TestNullableFieldValidation: method test_nullable_string_validates (line 357) | def test_nullable_string_validates(self): method test_nullable_enum_validates (line 370) | def test_nullable_enum_validates(self): FILE: tests/utilities/openapi/test_parser.py class TestOpenAPIParser (line 8) | class TestOpenAPIParser: method test_parse_basic_openapi_30 (line 11) | def test_parse_basic_openapi_30(self, basic_openapi_30_spec): method test_parse_basic_openapi_31 (line 37) | def test_parse_basic_openapi_31(self, basic_openapi_31_spec): method test_parse_collision_spec (line 54) | def test_parse_collision_spec(self, collision_spec): method test_parse_deepobject_spec (line 77) | def test_parse_deepobject_spec(self, deepobject_spec): method test_parse_complex_spec (line 95) | def test_parse_complex_spec(self, complex_spec): method test_parse_empty_spec (line 129) | def test_parse_empty_spec(self): method test_parse_invalid_spec (line 140) | def test_parse_invalid_spec(self): method test_parse_spec_with_refs (line 150) | def test_parse_spec_with_refs(self): method test_parse_simple_transitive_refs (line 206) | def test_parse_simple_transitive_refs(self): method test_parse_tspicer_issue_1372 (line 267) | def test_parse_tspicer_issue_1372(self): method test_parameter_schema_extraction (line 335) | def test_parameter_schema_extraction(self, complex_spec): class TestParameterLocationHandling (line 362) | class TestParameterLocationHandling: method test_parameter_location_conversion (line 375) | def test_parameter_location_conversion(self, location_str, expected): class TestErrorHandling (line 409) | class TestErrorHandling: method test_external_ref_error (line 412) | def test_external_ref_error(self): method test_broken_ref_error (line 439) | def test_broken_ref_error(self): FILE: tests/utilities/openapi/test_propertynames_ref_rewrite.py function test_replace_ref_with_defs_rewrites_propertyNames_ref (line 4) | def test_replace_ref_with_defs_rewrites_propertyNames_ref(): FILE: tests/utilities/openapi/test_schemas.py class TestSchemaProcessing (line 18) | class TestSchemaProcessing: method simple_route (line 22) | def simple_route(self): method collision_route (line 39) | def collision_route(self): method complex_route (line 71) | def complex_route(self): method test_combine_schemas_simple (line 116) | def test_combine_schemas_simple(self, simple_route): method test_combine_schemas_with_collisions (line 130) | def test_combine_schemas_with_collisions(self, collision_route): method test_combine_schemas_complex (line 145) | def test_combine_schemas_complex(self, complex_route): method test_combine_schemas_and_map_params_simple (line 171) | def test_combine_schemas_and_map_params_simple(self, simple_route): method test_combine_schemas_and_map_params_with_collisions (line 185) | def test_combine_schemas_and_map_params_with_collisions(self, collisio... method test_combine_schemas_and_map_params_complex (line 211) | def test_combine_schemas_and_map_params_complex(self, complex_route): method test_replace_ref_with_defs (line 232) | def test_replace_ref_with_defs(self): method test_replace_ref_with_defs_nested (line 252) | def test_replace_ref_with_defs_nested(self): method test_replace_ref_with_defs_in_additional_properties (line 289) | def test_replace_ref_with_defs_in_additional_properties(self): method test_replace_ref_with_defs_with_bool_additional_properties (line 320) | def test_replace_ref_with_defs_with_bool_additional_properties(self): method test_replace_ref_with_defs_with_inner_schema_additional_properties (line 351) | def test_replace_ref_with_defs_with_inner_schema_additional_properties... method test_parameter_collision_suffixing_logic (line 390) | def test_parameter_collision_suffixing_logic(self): class TestEdgeCases (line 462) | class TestEdgeCases: method test_empty_route (line 465) | def test_empty_route(self): method test_route_without_request_body (line 480) | def test_route_without_request_body(self): method test_route_with_only_request_body (line 505) | def test_route_with_only_request_body(self): method test_parameter_without_schema (line 534) | def test_parameter_without_schema(self): method test_request_body_multiple_content_types (line 554) | def test_request_body_multiple_content_types(self): method test_oneof_reference_dereferenced (line 583) | def test_oneof_reference_dereferenced(self): method test_anyof_reference_dereferenced (line 604) | def test_anyof_reference_dereferenced(self): method test_allof_reference_dereferenced (line 625) | def test_allof_reference_dereferenced(self): FILE: tests/utilities/openapi/test_transitive_references.py class TestTransitiveAndNestedReferences (line 16) | class TestTransitiveAndNestedReferences: method test_nested_refs_in_schema_definitions_converted (line 19) | def test_nested_refs_in_schema_definitions_converted(self): method test_transitive_dependencies_in_response_schemas (line 60) | def test_transitive_dependencies_in_response_schemas(self): method test_elongl_reported_case_xref_with_nullable_function (line 118) | def test_elongl_reported_case_xref_with_nullable_function(self): method test_tspicer_reported_case_profile_with_nested_refs (line 175) | def test_tspicer_reported_case_profile_with_nested_refs(self): method test_transitive_refs_in_request_body_schemas (line 226) | def test_transitive_refs_in_request_body_schemas(self): method test_refs_in_array_items_converted (line 281) | def test_refs_in_array_items_converted(self): method test_refs_in_composition_keywords_converted (line 322) | def test_refs_in_composition_keywords_converted(self): method test_deeply_nested_transitive_refs_preserved (line 395) | def test_deeply_nested_transitive_refs_preserved(self): method test_circular_references_handled (line 462) | def test_circular_references_handled(self): method test_multiple_reference_paths_to_same_schema (line 497) | def test_multiple_reference_paths_to_same_schema(self): method test_refs_in_nested_content_schemas (line 550) | def test_refs_in_nested_content_schemas(self): method test_unnecessary_defs_preserved_when_referenced (line 596) | def test_unnecessary_defs_preserved_when_referenced(self): method test_ref_only_request_body_handled (line 636) | def test_ref_only_request_body_handled(self): method test_separate_input_output_schemas (line 680) | def test_separate_input_output_schemas(self): method test_issue_2087_top_level_response_ref_includes_all_nested_schemas (line 790) | def test_issue_2087_top_level_response_ref_includes_all_nested_schemas... FILE: tests/utilities/test_async_utils.py function _async_fn (line 14) | async def _async_fn(x: int) -> int: function _sync_fn (line 18) | def _sync_fn(x: int) -> int: class TestIsCoroutineFunction (line 22) | class TestIsCoroutineFunction: method test_plain_async (line 23) | def test_plain_async(self) -> None: method test_plain_sync (line 26) | def test_plain_sync(self) -> None: method test_partial_async (line 29) | def test_partial_async(self) -> None: method test_partial_sync (line 33) | def test_partial_sync(self) -> None: method test_nested_partial_async (line 37) | def test_nested_partial_async(self) -> None: method test_nested_partial_sync (line 41) | def test_nested_partial_sync(self) -> None: method test_lambda (line 45) | def test_lambda(self) -> None: method test_non_callable (line 48) | def test_non_callable(self) -> None: class TestAsyncPartialIntegration (line 52) | class TestAsyncPartialIntegration: method test_async_partial_tool_runs (line 53) | async def test_async_partial_tool_runs(self) -> None: method test_async_partial_resource_reads (line 66) | async def test_async_partial_resource_reads(self) -> None: method test_async_partial_prompt_renders (line 81) | async def test_async_partial_prompt_renders(self) -> None: method test_async_partial_with_task_true_does_not_raise (line 94) | async def test_async_partial_with_task_true_does_not_raise(self) -> None: method test_sync_partial_with_task_true_raises (line 103) | async def test_sync_partial_with_task_true_raises(self) -> None: FILE: tests/utilities/test_auth.py function create_jwt (line 15) | def create_jwt(header: dict, payload: dict, signature: bytes = b"fake-si... class TestDecodeJwtHeader (line 23) | class TestDecodeJwtHeader: method test_decode_basic_header (line 26) | def test_decode_basic_header(self): method test_decode_header_with_kid (line 38) | def test_decode_header_with_kid(self): method test_invalid_jwt_format_two_parts (line 48) | def test_invalid_jwt_format_two_parts(self): method test_invalid_jwt_format_one_part (line 53) | def test_invalid_jwt_format_one_part(self): method test_invalid_jwt_format_four_parts (line 58) | def test_invalid_jwt_format_four_parts(self): method test_decode_header_length_divisible_by_4 (line 63) | def test_decode_header_length_divisible_by_4(self): class TestDecodeJwtPayload (line 78) | class TestDecodeJwtPayload: method test_decode_basic_payload (line 81) | def test_decode_basic_payload(self): method test_decode_payload_with_claims (line 93) | def test_decode_payload_with_claims(self): method test_invalid_jwt_format (line 115) | def test_invalid_jwt_format(self): method test_decode_payload_with_padding_edge_cases (line 120) | def test_decode_payload_with_padding_edge_cases(self): method test_decode_payload_length_divisible_by_4 (line 129) | def test_decode_payload_length_divisible_by_4(self): class TestParseScopes (line 144) | class TestParseScopes: method test_parse_none (line 147) | def test_parse_none(self): method test_parse_empty_string (line 151) | def test_parse_empty_string(self): method test_parse_space_separated (line 155) | def test_parse_space_separated(self): method test_parse_comma_separated (line 159) | def test_parse_comma_separated(self): method test_parse_json_array (line 163) | def test_parse_json_array(self): method test_parse_list (line 171) | def test_parse_list(self): method test_parse_strips_whitespace (line 175) | def test_parse_strips_whitespace(self): FILE: tests/utilities/test_cli.py class TestEnvironmentBuildUVRunCommand (line 8) | class TestEnvironmentBuildUVRunCommand: method test_build_uv_run_command_basic (line 11) | def test_build_uv_run_command_basic(self): method test_build_uv_run_command_with_editable (line 19) | def test_build_uv_run_command_with_editable(self): method test_build_uv_run_command_with_packages (line 35) | def test_build_uv_run_command_with_packages(self): method test_build_uv_run_command_with_python_version (line 52) | def test_build_uv_run_command_with_python_version(self): method test_build_uv_run_command_with_requirements (line 67) | def test_build_uv_run_command_with_requirements(self): method test_build_uv_run_command_with_project (line 83) | def test_build_uv_run_command_with_project(self): method test_build_uv_run_command_with_everything (line 99) | def test_build_uv_run_command_with_everything(self): method test_build_uv_run_command_project_with_extras (line 132) | def test_build_uv_run_command_project_with_extras(self): class TestEnvironmentNeedsUV (line 159) | class TestEnvironmentNeedsUV: method test_needs_uv_with_python (line 162) | def test_needs_uv_with_python(self): method test_needs_uv_with_dependencies (line 167) | def test_needs_uv_with_dependencies(self): method test_needs_uv_with_requirements (line 172) | def test_needs_uv_with_requirements(self): method test_needs_uv_with_project (line 177) | def test_needs_uv_with_project(self): method test_needs_uv_with_editable (line 182) | def test_needs_uv_with_editable(self): method test_needs_uv_empty (line 187) | def test_needs_uv_empty(self): method test_needs_uv_with_empty_lists (line 192) | def test_needs_uv_with_empty_lists(self): FILE: tests/utilities/test_components.py class TestConvertSetDefaultNone (line 20) | class TestConvertSetDefaultNone: method test_none_returns_empty_set (line 23) | def test_none_returns_empty_set(self): method test_set_returns_same_set (line 28) | def test_set_returns_same_set(self): method test_list_converts_to_set (line 34) | def test_list_converts_to_set(self): method test_tuple_converts_to_set (line 40) | def test_tuple_converts_to_set(self): class TestFastMCPComponent (line 47) | class TestFastMCPComponent: method basic_component (line 51) | def basic_component(self): method test_initialization_with_minimal_params (line 60) | def test_initialization_with_minimal_params(self): method test_initialization_with_all_params (line 69) | def test_initialization_with_all_params(self): method test_key_property_without_custom_key (line 85) | def test_key_property_without_custom_key(self, basic_component): method test_get_meta_with_fastmcp_meta (line 90) | def test_get_meta_with_fastmcp_meta(self, basic_component): method test_get_meta_preserves_existing_fastmcp_meta (line 99) | def test_get_meta_preserves_existing_fastmcp_meta(self): method test_get_meta_returns_dict_with_fastmcp_when_empty (line 111) | def test_get_meta_returns_dict_with_fastmcp_when_empty(self): method test_get_meta_includes_version (line 119) | def test_get_meta_includes_version(self): method test_get_meta_excludes_version_when_none (line 127) | def test_get_meta_excludes_version_when_none(self): method test_equality_same_components (line 135) | def test_equality_same_components(self): method test_equality_different_components (line 141) | def test_equality_different_components(self): method test_equality_different_types (line 147) | def test_equality_different_types(self, basic_component): method test_repr (line 153) | def test_repr(self, basic_component): method test_copy_method (line 161) | def test_copy_method(self, basic_component): method test_tags_deduplication (line 171) | def test_tags_deduplication(self): method test_validation_error_for_invalid_data (line 179) | def test_validation_error_for_invalid_data(self): method test_extra_fields_forbidden (line 184) | def test_extra_fields_forbidden(self): class TestKeyPrefix (line 191) | class TestKeyPrefix: method test_base_class_has_empty_prefix (line 194) | def test_base_class_has_empty_prefix(self): method test_make_key_without_prefix (line 198) | def test_make_key_without_prefix(self): method test_tool_has_tool_prefix (line 202) | def test_tool_has_tool_prefix(self): method test_resource_has_resource_prefix (line 207) | def test_resource_has_resource_prefix(self): method test_template_has_template_prefix (line 212) | def test_template_has_template_prefix(self): method test_prompt_has_prompt_prefix (line 217) | def test_prompt_has_prompt_prefix(self): method test_tool_key_property (line 222) | def test_tool_key_property(self): method test_prompt_key_property (line 227) | def test_prompt_key_property(self): method test_warning_for_missing_key_prefix (line 232) | def test_warning_for_missing_key_prefix(self): method test_no_warning_when_key_prefix_defined (line 245) | def test_no_warning_when_key_prefix_defined(self): class TestGetFastMCPMetadata (line 260) | class TestGetFastMCPMetadata: method test_returns_fastmcp_namespace_when_dict (line 263) | def test_returns_fastmcp_namespace_when_dict(self): method test_falls_back_to_legacy_namespace_when_dict (line 268) | def test_falls_back_to_legacy_namespace_when_dict(self): method test_ignores_non_dict_metadata (line 273) | def test_ignores_non_dict_metadata(self): class TestComponentEnableDisable (line 279) | class TestComponentEnableDisable: method test_enable_raises_not_implemented_error (line 282) | def test_enable_raises_not_implemented_error(self): method test_disable_raises_not_implemented_error (line 290) | def test_disable_raises_not_implemented_error(self): method test_tool_enable_raises_not_implemented (line 298) | def test_tool_enable_raises_not_implemented(self): method test_tool_disable_raises_not_implemented (line 305) | def test_tool_disable_raises_not_implemented(self): method test_prompt_enable_raises_not_implemented (line 312) | def test_prompt_enable_raises_not_implemented(self): class TestFastMCPMeta (line 320) | class TestFastMCPMeta: method test_fastmcp_meta_structure (line 323) | def test_fastmcp_meta_structure(self): method test_fastmcp_meta_with_version (line 328) | def test_fastmcp_meta_with_version(self): method test_fastmcp_meta_optional_fields (line 334) | def test_fastmcp_meta_optional_fields(self): class TestEdgeCasesAndIntegration (line 341) | class TestEdgeCasesAndIntegration: method test_empty_tags_conversion (line 344) | def test_empty_tags_conversion(self): method test_tags_with_none_values (line 349) | def test_tags_with_none_values(self): method test_get_meta_returns_copy (line 355) | def test_get_meta_returns_copy(self): method test_component_with_complex_meta (line 365) | def test_component_with_complex_meta(self): method test_model_copy_preserves_all_attributes (line 375) | def test_model_copy_preserves_all_attributes(self): method test_model_copy_with_update (line 393) | def test_model_copy_with_update(self): method test_model_copy_deep_parameter (line 425) | def test_model_copy_deep_parameter(self): FILE: tests/utilities/test_inspect.py class TestFastMCPInfo (line 17) | class TestFastMCPInfo: method test_fastmcp_info_creation (line 20) | def test_fastmcp_info_creation(self): method test_fastmcp_info_with_none_instructions (line 58) | def test_fastmcp_info_with_none_instructions(self): class TestGetFastMCPInfo (line 79) | class TestGetFastMCPInfo: method test_empty_server (line 82) | async def test_empty_server(self): method test_server_with_instructions (line 103) | async def test_server_with_instructions(self): method test_server_with_version (line 109) | async def test_server_with_version(self): method test_server_with_tools (line 115) | async def test_server_with_tools(self): method test_server_with_resources (line 135) | async def test_server_with_resources(self): method test_server_with_prompts (line 157) | async def test_server_with_prompts(self): method test_comprehensive_server (line 177) | async def test_comprehensive_server(self): method test_server_no_instructions (line 230) | async def test_server_no_instructions(self): method test_server_with_client_integration (line 239) | async def test_server_with_client_integration(self): method test_inspect_respects_tag_filtering (line 272) | async def test_inspect_respects_tag_filtering(self): method test_inspect_respects_tag_filtering_with_mounted_servers (line 355) | async def test_inspect_respects_tag_filtering_with_mounted_servers(self): method test_inspect_parent_filters_override_mounted_server_filters (line 424) | async def test_inspect_parent_filters_override_mounted_server_filters(... class TestFastMCP1xCompatibility (line 465) | class TestFastMCP1xCompatibility: method test_fastmcp1x_empty_server (line 468) | async def test_fastmcp1x_empty_server(self): method test_fastmcp1x_with_tools (line 486) | async def test_fastmcp1x_with_tools(self): method test_fastmcp1x_with_resources (line 506) | async def test_fastmcp1x_with_resources(self): method test_fastmcp1x_with_prompts (line 523) | async def test_fastmcp1x_with_prompts(self): method test_dispatcher_with_fastmcp1x (line 538) | async def test_dispatcher_with_fastmcp1x(self): method test_dispatcher_with_fastmcp2x (line 555) | async def test_dispatcher_with_fastmcp2x(self): method test_fastmcp1x_vs_fastmcp2x_comparison (line 570) | async def test_fastmcp1x_vs_fastmcp2x_comparison(self): FILE: tests/utilities/test_inspect_icons.py class TestIconExtraction (line 19) | class TestIconExtraction: method test_server_icons_and_website (line 22) | async def test_server_icons_and_website(self): method test_server_without_icons (line 47) | async def test_server_without_icons(self): method test_tool_icons (line 56) | async def test_tool_icons(self): method test_resource_icons (line 93) | async def test_resource_icons(self): method test_template_icons (line 126) | async def test_template_icons(self): method test_prompt_icons (line 163) | async def test_prompt_icons(self): method test_multiple_icons (line 195) | async def test_multiple_icons(self): method test_data_uri_icons (line 240) | async def test_data_uri_icons(self): method test_icons_in_fastmcp_v1 (line 260) | async def test_icons_in_fastmcp_v1(self): method test_icons_in_formatted_output (line 280) | async def test_icons_in_formatted_output(self): method test_icons_always_present_in_json (line 316) | async def test_icons_always_present_in_json(self): class TestFormatFunctions (line 343) | class TestFormatFunctions: method test_format_fastmcp_info (line 346) | async def test_format_fastmcp_info(self): method test_format_mcp_info (line 381) | async def test_format_mcp_info(self): method test_format_info_with_fastmcp_format (line 429) | async def test_format_info_with_fastmcp_format(self): method test_format_info_with_mcp_format (line 450) | async def test_format_info_with_mcp_format(self): method test_format_info_requires_format (line 467) | async def test_format_info_requires_format(self): method test_tool_with_output_schema (line 488) | async def test_tool_with_output_schema(self): FILE: tests/utilities/test_json_schema.py class TestPruneParam (line 14) | class TestPruneParam: method test_nonexistent (line 17) | def test_nonexistent(self): method test_exists (line 23) | def test_exists(self): method test_last_property (line 29) | def test_last_property(self): method test_from_required (line 36) | def test_from_required(self): method test_last_required (line 45) | def test_last_required(self): class TestDereferenceRefs (line 55) | class TestDereferenceRefs: method test_dereferences_simple_ref (line 58) | def test_dereferences_simple_ref(self): method test_dereferences_nested_refs (line 75) | def test_dereferences_nested_refs(self): method test_falls_back_for_circular_refs (line 96) | def test_falls_back_for_circular_refs(self): method test_preserves_sibling_keywords (line 119) | def test_preserves_sibling_keywords(self): method test_preserves_siblings_in_lists (line 149) | def test_preserves_siblings_in_lists(self): method test_preserves_nested_siblings (line 175) | def test_preserves_nested_siblings(self): class TestCompressSchema (line 201) | class TestCompressSchema: method test_preserves_refs_by_default (line 204) | def test_preserves_refs_by_default(self): method test_prune_params (line 220) | def test_prune_params(self): method test_pruning_additional_properties (line 234) | def test_pruning_additional_properties(self): method test_disable_pruning_additional_properties (line 245) | def test_disable_pruning_additional_properties(self): method test_combined_operations (line 256) | def test_combined_operations(self): method test_prune_titles (line 283) | def test_prune_titles(self): method test_prune_nested_additional_properties (line 305) | def test_prune_nested_additional_properties(self): method test_title_pruning_preserves_parameter_named_title (line 331) | def test_title_pruning_preserves_parameter_named_title(self): method test_title_pruning_with_nested_properties (line 363) | def test_title_pruning_with_nested_properties(self): method test_mcp_client_compatibility_requires_additional_properties (line 403) | def test_mcp_client_compatibility_requires_additional_properties(self): class TestCompressSchemaDereference (line 449) | class TestCompressSchemaDereference: method test_dereference_true_inlines_refs (line 461) | def test_dereference_true_inlines_refs(self): method test_dereference_false_preserves_refs (line 466) | def test_dereference_false_preserves_refs(self): method test_other_optimizations_still_apply_without_dereference (line 471) | def test_other_optimizations_still_apply_without_dereference(self): class TestResolveRootRef (line 489) | class TestResolveRootRef: method test_resolves_simple_root_ref (line 496) | def test_resolves_simple_root_ref(self): method test_resolves_self_referential_model (line 523) | def test_resolves_self_referential_model(self): method test_does_not_modify_schema_with_type_at_root (line 560) | def test_does_not_modify_schema_with_type_at_root(self): method test_does_not_modify_schema_without_ref (line 573) | def test_does_not_modify_schema_without_ref(self): method test_does_not_modify_schema_without_defs (line 583) | def test_does_not_modify_schema_without_defs(self): method test_does_not_modify_external_ref (line 592) | def test_does_not_modify_external_ref(self): method test_preserves_all_defs_for_nested_references (line 602) | def test_preserves_all_defs_for_nested_references(self): method test_handles_missing_def_gracefully (line 626) | def test_handles_missing_def_gracefully(self): class TestStripRemoteRefs (line 638) | class TestStripRemoteRefs: method test_preserves_local_ref (line 641) | def test_preserves_local_ref(self): method test_strips_http_ref (line 645) | def test_strips_http_ref(self): method test_strips_https_ref (line 649) | def test_strips_https_ref(self): method test_strips_file_ref (line 653) | def test_strips_file_ref(self): method test_preserves_siblings_when_stripping (line 657) | def test_preserves_siblings_when_stripping(self): method test_strips_nested_remote_refs (line 666) | def test_strips_nested_remote_refs(self): method test_strips_remote_refs_in_lists (line 677) | def test_strips_remote_refs_in_lists(self): method test_deep_nesting (line 688) | def test_deep_nesting(self): class TestDereferenceRefsRemoteRefSafety (line 701) | class TestDereferenceRefsRemoteRefSafety: method test_http_ref_not_fetched (line 704) | def test_http_ref_not_fetched(self): method test_file_ref_not_fetched (line 722) | def test_file_ref_not_fetched(self): method test_cloud_metadata_ref_not_fetched (line 732) | def test_cloud_metadata_ref_not_fetched(self): method test_local_refs_still_resolved (line 744) | def test_local_refs_still_resolved(self): FILE: tests/utilities/test_logging.py function test_logging_doesnt_affect_other_loggers (line 7) | def test_logging_doesnt_affect_other_loggers(caplog): function test_configure_logging_with_traceback_kwargs (line 34) | def test_configure_logging_with_traceback_kwargs(): function test_configure_logging_traceback_defaults_can_be_overridden (line 45) | def test_configure_logging_traceback_defaults_can_be_overridden(): function test_configure_logging_with_rich_disabled (line 60) | def test_configure_logging_with_rich_disabled(): function test_configure_logging_with_rich_enabled (line 82) | def test_configure_logging_with_rich_enabled(): FILE: tests/utilities/test_skills.py function skills_dir (line 23) | def skills_dir(tmp_path: Path) -> Path: function skills_server (line 69) | def skills_server(skills_dir: Path) -> FastMCP: class TestListSkills (line 76) | class TestListSkills: method test_lists_available_skills (line 77) | async def test_lists_available_skills(self, skills_server: FastMCP): method test_returns_skill_summary_objects (line 85) | async def test_returns_skill_summary_objects(self, skills_server: Fast... method test_includes_descriptions (line 95) | async def test_includes_descriptions(self, skills_server: FastMCP): method test_empty_server_returns_empty_list (line 103) | async def test_empty_server_returns_empty_list(self): class TestGetSkillManifest (line 111) | class TestGetSkillManifest: method test_returns_manifest_with_files (line 112) | async def test_returns_manifest_with_files(self, skills_server: FastMCP): method test_files_have_size_and_hash (line 123) | async def test_files_have_size_and_hash(self, skills_server: FastMCP): method test_nested_files_use_posix_paths (line 132) | async def test_nested_files_use_posix_paths(self, skills_server: FastM... method test_nonexistent_skill_raises (line 139) | async def test_nonexistent_skill_raises(self, skills_server: FastMCP): class TestDownloadSkill (line 145) | class TestDownloadSkill: method test_downloads_skill_to_directory (line 146) | async def test_downloads_skill_to_directory( method test_creates_nested_directories (line 160) | async def test_creates_nested_directories( method test_preserves_file_content (line 173) | async def test_preserves_file_content( method test_raises_if_exists_without_overwrite (line 186) | async def test_raises_if_exists_without_overwrite( method test_overwrites_with_flag (line 197) | async def test_overwrites_with_flag(self, skills_server: FastMCP, tmp_... method test_expands_user_path (line 211) | async def test_expands_user_path(self, skills_server: FastMCP, tmp_pat... class TestSyncSkills (line 219) | class TestSyncSkills: method test_downloads_all_skills (line 220) | async def test_downloads_all_skills(self, skills_server: FastMCP, tmp_... method test_skips_existing_without_overwrite (line 232) | async def test_skips_existing_without_overwrite( method test_overwrites_with_flag (line 247) | async def test_overwrites_with_flag(self, skills_server: FastMCP, tmp_... method test_returns_paths_to_downloaded_skills (line 257) | async def test_returns_paths_to_downloaded_skills( class TestPathTraversal (line 272) | class TestPathTraversal: method test_malicious_skill_name_raises (line 282) | async def test_malicious_skill_name_raises( FILE: tests/utilities/test_tests.py class TestTemporarySettings (line 8) | class TestTemporarySettings: method test_temporary_settings (line 9) | def test_temporary_settings(self): class TestTransportSetting (line 16) | class TestTransportSetting: method test_transport_default_is_stdio (line 17) | def test_transport_default_is_stdio(self): method test_transport_setting_can_be_changed (line 20) | def test_transport_setting_can_be_changed(self): method test_run_async_uses_transport_setting (line 25) | async def test_run_async_uses_transport_setting(self): method test_run_async_explicit_transport_overrides_setting (line 34) | async def test_run_async_explicit_transport_overrides_setting(self): FILE: tests/utilities/test_token_cache.py function _make_token (line 11) | def _make_token( class TestTokenCacheDisabled (line 26) | class TestTokenCacheDisabled: method test_disabled_configurations (line 37) | def test_disabled_configurations(self, ttl: int | None, max_size: int ... method test_negative_ttl_raises (line 41) | def test_negative_ttl_raises(self): method test_negative_max_size_raises (line 45) | def test_negative_max_size_raises(self): method test_get_returns_miss_when_disabled (line 49) | def test_get_returns_miss_when_disabled(self): method test_set_is_noop_when_disabled (line 56) | def test_set_is_noop_when_disabled(self): class TestTokenCacheEnabled (line 62) | class TestTokenCacheEnabled: method cache (line 66) | def cache(self) -> TokenCache: method test_enabled (line 69) | def test_enabled(self, cache: TokenCache): method test_set_and_get (line 72) | def test_set_and_get(self, cache: TokenCache): method test_miss_for_unknown_token (line 81) | def test_miss_for_unknown_token(self, cache: TokenCache): method test_different_tokens_cached_separately (line 86) | def test_different_tokens_cached_separately(self, cache: TokenCache): class TestTokenCacheDefensiveCopy (line 96) | class TestTokenCacheDefensiveCopy: method test_get_returns_deep_copy (line 99) | def test_get_returns_deep_copy(self): method test_mutating_source_does_not_affect_cache (line 115) | def test_mutating_source_does_not_affect_cache(self): class TestTokenCacheTTL (line 128) | class TestTokenCacheTTL: method test_expired_entry_is_evicted_on_get (line 131) | def test_expired_entry_is_evicted_on_get(self): method test_token_expires_at_caps_ttl (line 143) | def test_token_expires_at_caps_ttl(self): method test_ttl_used_when_no_token_expiry (line 151) | def test_ttl_used_when_no_token_expiry(self): class TestTokenCacheSizeLimit (line 162) | class TestTokenCacheSizeLimit: method test_evicts_oldest_when_full (line 165) | def test_evicts_oldest_when_full(self): method test_cleanup_expired_before_eviction (line 180) | def test_cleanup_expired_before_eviction(self): method test_overwrite_does_not_evict (line 196) | def test_overwrite_does_not_evict(self): class TestTokenCacheHashing (line 214) | class TestTokenCacheHashing: method test_consistent_hashing (line 217) | def test_consistent_hashing(self): method test_different_tokens_different_hashes (line 220) | def test_different_tokens_different_hashes(self): method test_hash_is_64_hex_chars (line 223) | def test_hash_is_64_hex_chars(self): FILE: tests/utilities/test_typeadapter.py class SomeInputModelA (line 21) | class SomeInputModelA(BaseModel): class SomeInputModelB (line 25) | class SomeInputModelB(BaseModel): class InnerModel (line 26) | class InnerModel(BaseModel): class SomeComplexModel (line 35) | class SomeComplexModel(BaseModel): class ClassWithMethods (line 40) | class ClassWithMethods: method do_something (line 41) | def do_something(self, x: int) -> int: method do_something_annotated (line 44) | def do_something_annotated( method do_something_return_none (line 49) | def do_something_return_none(self) -> None: function complex_arguments_fn (line 53) | def complex_arguments_fn( function get_simple_func_adapter (line 118) | def get_simple_func_adapter(): function test_complex_function_runtime_arg_validation_non_json (line 127) | async def test_complex_function_runtime_arg_validation_non_json(): function test_missing_annotation (line 148) | def test_missing_annotation(): function test_convert_str_to_complex_type (line 159) | def test_convert_str_to_complex_type(): function test_skip_names (line 180) | def test_skip_names(): function test_lambda_function (line 205) | async def test_lambda_function(): function test_basic_json_schema (line 222) | def test_basic_json_schema(): function test_str_vs_int (line 246) | def test_str_vs_int(): function test_class_with_methods (line 260) | def test_class_with_methods(): FILE: tests/utilities/test_types.py class BaseClass (line 21) | class BaseClass: class ChildClass (line 25) | class ChildClass(BaseClass): class OtherClass (line 29) | class OtherClass: class TestIsClassMemberOfType (line 33) | class TestIsClassMemberOfType: method test_basic_subclass_check (line 34) | def test_basic_subclass_check(self): method test_self_is_member (line 38) | def test_self_is_member(self): method test_unrelated_class_is_not_member (line 42) | def test_unrelated_class_is_not_member(self): method test_typing_union_with_member_is_member (line 46) | def test_typing_union_with_member_is_member(self): method test_typing_union_without_member_is_not_member (line 54) | def test_typing_union_without_member_is_not_member(self): method test_pipe_union_with_member_is_member (line 59) | def test_pipe_union_with_member_is_member(self): method test_pipe_union_without_member_is_not_member (line 67) | def test_pipe_union_without_member_is_not_member(self): method test_annotated_member_is_member (line 72) | def test_annotated_member_is_member(self): method test_annotated_non_member_is_not_member (line 80) | def test_annotated_non_member_is_not_member(self): method test_annotated_with_union_member_is_member (line 85) | def test_annotated_with_union_member_is_member(self): method test_nested_annotated_with_member_is_member (line 94) | def test_nested_annotated_with_member_is_member(self): method test_none_is_not_member (line 99) | def test_none_is_not_member(self): method test_generic_type_is_not_member (line 103) | def test_generic_type_is_not_member(self): class TestIsSubclassSafe (line 109) | class TestIsSubclassSafe: method test_child_is_subclass_of_parent (line 110) | def test_child_is_subclass_of_parent(self): method test_class_is_subclass_of_itself (line 114) | def test_class_is_subclass_of_itself(self): method test_unrelated_class_is_not_subclass (line 118) | def test_unrelated_class_is_not_subclass(self): method test_none_type_handled_safely (line 122) | def test_none_type_handled_safely(self): class TestImage (line 127) | class TestImage: method test_image_initialization_with_path (line 128) | def test_image_initialization_with_path(self): method test_image_path_expansion_with_tilde (line 136) | def test_image_path_expansion_with_tilde(self): method test_image_path_expansion_with_env_var (line 143) | def test_image_path_expansion_with_env_var(self, monkeypatch, tmp_path): method test_image_initialization_with_data (line 154) | def test_image_initialization_with_data(self): method test_image_initialization_with_format (line 161) | def test_image_initialization_with_format(self): method test_missing_data_and_path_raises_error (line 166) | def test_missing_data_and_path_raises_error(self): method test_both_data_and_path_raises_error (line 171) | def test_both_data_and_path_raises_error(self): method test_get_mime_type_from_path (line 189) | def test_get_mime_type_from_path(self, tmp_path, extension, mime_type): method test_to_image_content (line 196) | def test_to_image_content(self, tmp_path, monkeypatch): method test_to_image_content_error (line 218) | def test_to_image_content_error(self, monkeypatch): method test_to_data_uri (line 236) | def test_to_data_uri(self, tmp_path, mime_type, fname, expected_mime): class TestAudio (line 251) | class TestAudio: method test_audio_initialization_with_path (line 252) | def test_audio_initialization_with_path(self): method test_audio_path_expansion_with_tilde (line 260) | def test_audio_path_expansion_with_tilde(self): method test_audio_path_expansion_with_env_var (line 267) | def test_audio_path_expansion_with_env_var(self, monkeypatch, tmp_path): method test_audio_initialization_with_data (line 278) | def test_audio_initialization_with_data(self): method test_audio_initialization_with_format (line 285) | def test_audio_initialization_with_format(self): method test_missing_data_and_path_raises_error (line 290) | def test_missing_data_and_path_raises_error(self): method test_both_data_and_path_raises_error (line 295) | def test_both_data_and_path_raises_error(self): method test_get_mime_type_from_path (line 302) | def test_get_mime_type_from_path(self, tmp_path): method test_to_audio_content (line 319) | def test_to_audio_content(self, tmp_path, monkeypatch): method test_to_audio_content_error (line 341) | def test_to_audio_content_error(self, monkeypatch): method test_to_audio_content_with_override_mime_type (line 352) | def test_to_audio_content_with_override_mime_type(self, tmp_path): class TestFile (line 366) | class TestFile: method test_file_initialization_with_path (line 367) | def test_file_initialization_with_path(self): method test_file_path_expansion_with_tilde (line 375) | def test_file_path_expansion_with_tilde(self): method test_file_path_expansion_with_env_var (line 382) | def test_file_path_expansion_with_env_var(self, monkeypatch, tmp_path): method test_file_initialization_with_data (line 393) | def test_file_initialization_with_data(self): method test_file_initialization_with_format (line 403) | def test_file_initialization_with_format(self): method test_file_initialization_with_name (line 408) | def test_file_initialization_with_name(self): method test_missing_data_and_path_raises_error (line 413) | def test_missing_data_and_path_raises_error(self): method test_both_data_and_path_raises_error (line 418) | def test_both_data_and_path_raises_error(self): method test_get_mime_type_from_path (line 425) | def test_get_mime_type_from_path(self, tmp_path): method test_to_resource_content_with_path (line 435) | def test_to_resource_content_with_path(self, tmp_path): method test_to_resource_content_with_data (line 451) | def test_to_resource_content_with_data(self): method test_to_resource_content_with_text_data (line 464) | def test_to_resource_content_with_text_data(self): method test_to_resource_content_error (line 475) | def test_to_resource_content_error(self, monkeypatch): method test_to_resource_content_with_override_mime_type (line 484) | def test_to_resource_content_with_override_mime_type(self, tmp_path): class TestReplaceType (line 496) | class TestReplaceType: method test_replace_type (line 517) | def test_replace_type(self, input, type_map, expected): class TestCreateFunctionWithoutParams (line 522) | class TestCreateFunctionWithoutParams: method test_removes_params_from_both_annotations_and_signature (line 525) | def test_removes_params_from_both_annotations_and_signature(self): method test_preserves_return_annotation_in_signature (line 545) | def test_preserves_return_annotation_in_signature(self): method test_pydantic_typeadapter_compatibility (line 558) | def test_pydantic_typeadapter_compatibility(self): method test_multiple_excluded_parameters (line 581) | def test_multiple_excluded_parameters(self): class TestAnnotationStringDescriptions (line 603) | class TestAnnotationStringDescriptions: method test_get_cached_typeadapter_with_string_descriptions (line 606) | def test_get_cached_typeadapter_with_string_descriptions(self): method test_multiple_string_annotations (line 620) | def test_multiple_string_annotations(self): method test_annotated_with_more_than_string_unchanged (line 639) | def test_annotated_with_more_than_string_unchanged(self): method test_annotated_with_non_string_unchanged (line 651) | def test_annotated_with_non_string_unchanged(self): method test_existing_field_unchanged (line 663) | def test_existing_field_unchanged(self): method test_kwonly_defaults_preserved_when_annotations_are_processed (line 675) | def test_kwonly_defaults_preserved_when_annotations_are_processed(self): FILE: tests/utilities/test_version_check.py class TestCachePath (line 22) | class TestCachePath: method test_cache_path_in_home_directory (line 23) | def test_cache_path_in_home_directory(self): method test_cache_path_prerelease_suffix (line 29) | def test_cache_path_prerelease_suffix(self): class TestReadCache (line 35) | class TestReadCache: method test_read_cache_no_file (line 36) | def test_read_cache_no_file(self, tmp_path: Path, monkeypatch: pytest.... method test_read_cache_valid (line 46) | def test_read_cache_valid(self, tmp_path: Path, monkeypatch: pytest.Mo... method test_read_cache_invalid_json (line 61) | def test_read_cache_invalid_json( class TestWriteCache (line 77) | class TestWriteCache: method test_write_cache_creates_file (line 78) | def test_write_cache_creates_file( class TestFetchLatestVersion (line 96) | class TestFetchLatestVersion: method test_fetch_success (line 97) | def test_fetch_success(self): method test_fetch_network_error (line 113) | def test_fetch_network_error(self): method test_fetch_invalid_response (line 119) | def test_fetch_invalid_response(self): method test_fetch_prereleases (line 128) | def test_fetch_prereleases(self): method test_fetch_prereleases_stable_is_highest (line 145) | def test_fetch_prereleases_stable_is_highest(self): class TestGetLatestVersion (line 162) | class TestGetLatestVersion: method test_returns_cached_version_if_fresh (line 163) | def test_returns_cached_version_if_fresh( method test_fetches_if_cache_stale (line 183) | def test_fetches_if_cache_stale( method test_returns_stale_cache_if_fetch_fails (line 205) | def test_returns_stale_cache_if_fetch_fails( class TestCheckForNewerVersion (line 226) | class TestCheckForNewerVersion: method test_returns_none_if_disabled (line 227) | def test_returns_none_if_disabled(self, monkeypatch: pytest.MonkeyPatch): method test_returns_none_if_current (line 236) | def test_returns_none_if_current(self, monkeypatch: pytest.MonkeyPatch): method test_returns_version_if_newer (line 249) | def test_returns_version_if_newer(self, monkeypatch: pytest.MonkeyPatch): method test_returns_none_if_older_available (line 262) | def test_returns_none_if_older_available(self, monkeypatch: pytest.Mon... method test_handles_invalid_versions (line 275) | def test_handles_invalid_versions(self, monkeypatch: pytest.MonkeyPatch): method test_prerelease_setting (line 289) | def test_prerelease_setting(self, monkeypatch: pytest.MonkeyPatch): method test_stable_setting (line 303) | def test_stable_setting(self, monkeypatch: pytest.MonkeyPatch):