
    i		                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZmZmZmZ erdd	lmZ dd
lmZ g dZdefdZy)ab  Providers for dynamic MCP components.

This module provides the `Provider` abstraction for providing tools,
resources, and prompts dynamically at runtime.

Example:
    ```python
    from fastmcp import FastMCP
    from fastmcp.server.providers import Provider
    from fastmcp.tools import Tool

    class DatabaseProvider(Provider):
        def __init__(self, db_url: str):
            self.db = Database(db_url)

        async def _list_tools(self) -> list[Tool]:
            rows = await self.db.fetch("SELECT * FROM tools")
            return [self._make_tool(row) for row in rows]

        async def _get_tool(self, name: str) -> Tool | None:
            row = await self.db.fetchone("SELECT * FROM tools WHERE name = ?", name)
            return self._make_tool(row) if row else None

    mcp = FastMCP("Server", providers=[DatabaseProvider(db_url)])
    ```
    )TYPE_CHECKING)AggregateProvider)Provider)FastMCPProvider)FileSystemProvider)LocalProvider)ClaudeSkillsProviderSkillProviderSkillsDirectoryProviderSkillsProviderOpenAPIProviderProxyProvider)r   r	   r   r   r   r   r   r   r
   r   r   namec                 `    | dk(  rddl m} |S | dk(  rddlm} |S t	        dt
        d|       )z4Lazy import for providers to avoid circular imports.r   r   r   r   r   zmodule z has no attribute )fastmcp.server.providers.proxyr    fastmcp.server.providers.openapir   AttributeError__name__)r   r   r   s      q/Users/bowang/.openclaw/workspace/ChatDev/.venv/lib/python3.12/site-packages/fastmcp/server/providers/__init__.py__getattr__r   =   s>    @  D
78,.@I
JJ    N)__doc__typingr   "fastmcp.server.providers.aggregater   fastmcp.server.providers.baser   )fastmcp.server.providers.fastmcp_providerr   #fastmcp.server.providers.filesystemr   'fastmcp.server.providers.local_providerr   fastmcp.server.providers.skillsr	   r
   r   r   r   r   r   r   __all__strr    r   r   <module>r%      sH   6 ! @ 2 E B A  SM
Kc 
Kr   