Source code for tavily_fastmcp._typing

"""Local typing helpers for third-party MCP objects."""

from __future__ import annotations

from collections.abc import Callable
from typing import Any, Protocol, TypeVar

[docs] _F = TypeVar("_F", bound=Callable[..., Any])
[docs] class ToolRegistrar(Protocol): """Minimal typed surface for FastMCP-compatible tool registration."""
[docs] def tool(self, **metadata: Any) -> Callable[[_F], _F]: """Return a decorator that registers a tool handler.""" ...