self_query_mcp_agent_v2 ======================= .. py:module:: self_query_mcp_agent_v2 .. autoapi-nested-parse:: Self Query MCP Discovery Agent - Proper Haive Implementation. This agent uses Haive's configuration system properly by extending BaseRAGAgent and using SelfQueryRetrieverConfig instead of manually creating retrievers. Classes ------- .. autoapisummary:: self_query_mcp_agent_v2.MCPDocumentLoader self_query_mcp_agent_v2.MCPServerMetadata self_query_mcp_agent_v2.SelfQueryMCPAgent Functions --------- .. autoapisummary:: self_query_mcp_agent_v2.test_mcp_agent Module Contents --------------- .. py:class:: MCPDocumentLoader Load and process MCP server documents. .. py:method:: create_mcp_documents() -> list[langchain.schema.Document] :staticmethod: Create documents from MCP servers data. .. py:class:: MCPServerMetadata(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Metadata schema for MCP servers. .. py:attribute:: category :type: str :value: None .. py:attribute:: has_install :type: bool :value: None .. py:attribute:: language :type: str :value: None .. py:attribute:: prompts_count :type: int :value: None .. py:attribute:: resources_count :type: int :value: None .. py:attribute:: server_name :type: str :value: None .. py:attribute:: stars :type: int :value: None .. py:attribute:: tools_count :type: int :value: None .. py:attribute:: total_features :type: int :value: None .. py:class:: SelfQueryMCPAgent(name: str = 'mcp_self_query_agent') Bases: :py:obj:`haive.agents.rag.base.agent.BaseRAGAgent` Enhanced MCP Discovery Agent using proper Haive configuration system. .. py:method:: analyze_query_intent(query: str) -> str Analyze query to determine if it's suitable for self-query. .. py:method:: search_mcp_servers(query: str, k: int = 5) -> list[langchain.schema.Document] :async: Search for MCP servers using the configured retriever. .. py:function:: test_mcp_agent() :async: Test the MCP agent.