← Về thư mục
openai4s/mcp_client.py
- _deadline_default · function · L60-L76 — def _deadline_default() -> float
- _BoundedLineReader · class · L112-L218 — class _BoundedLineReader
- init · method · L140-L152 — def init( self, stream: Any, *, limit: int = _MAX_FRAME_BYTES, keep_partial: bool = False, ) -> None
- _finish · method · L154-L179 — def _finish(self, kept: bytearray, over: bool, discarded: int = 0) -> str
- readline · method · L181-L218 — def readline(self) -> str | None
- _absorb · function · L189-L200 — def _absorb(data: bytes | bytearray) -> None
- _write_all · function · L221-L253 — def _write_all(stream: Any, payload: bytes, deadline: float | None = None) -> None
- _connector_environment · function · L286-L322 — def _connector_environment( explicit: Mapping[str, Any] | None = None, *, source: Mapping[str, str] | None = None, ) -> dict[str, str]
- MCPConnection · class · L325-L790 — class MCPConnection
- init · method · L326-L412 — def init( self, command: list[str], env: dict | None = None, cwd: str | None = None, *, timeout: float | None = None, )
- _send · method · L415-L421 — def _send(self, obj: dict, deadline: float | None = None) -> None
- _drain_stderr · method · L423-L440 — def _drain_stderr(self) -> None
- stderr_tail · method · L442-L457 — def stderr_tail(self) -> str
- _fail_all · method · L459-L470 — def _fail_all(self, reason: str) -> None
- _read_loop · method · L472-L536 — def _read_loop(self) -> None
- _request · method · L538-L603 — def _request(self, method: str, params: dict | None = None) -> dict
- _notify · method · L605-L607 — def _notify(self, method: str, params: dict | None = None) -> None
- _init · method · L610-L622 — def _init(self) -> None
- alive · method · L624-L625 — def alive(self) -> bool
- faulted · method · L627-L636 — def faulted(self) -> bool
- failure · method · L638-L641 — def failure(self) -> str | None
- _signal_tree · method · L643-L662 — def _signal_tree(self, sig: int, fallback: Callable[[], None]) -> None
- _terminate · method · L664-L695 — def _terminate(self) -> bool
- _join_readers · method · L697-L706 — def _join_readers(self, timeout: float) -> None
- close · method · L708-L741 — def close(self) -> bool
- list_tools · method · L744-L746 — def list_tools(self) -> list[dict]
- call_tool · method · L748-L759 — def call_tool(self, name: str, arguments: dict | None = None) -> dict
- list_resources · method · L762-L767 — def list_resources(self, cursor: str | None = None) -> dict
- read_resource · method · L769-L773 — def read_resource(self, uri: str) -> dict
- list_prompts · method · L776-L781 — def list_prompts(self, cursor: str | None = None) -> dict
- get_prompt · method · L783-L790 — def get_prompt(self, name: str, arguments: dict | None = None) -> dict
- MCPManager · class · L793-L1169 — class MCPManager
- init · method · L796-L812 — def init(self) -> None
- _cache_scope · method · L815-L832 — def _cache_scope(config: dict | None) -> str
- _cache_key · method · L835-L836 — def _cache_key(cls, connector_id: str, config: dict | None) -> tuple[str, str]
- _argv · method · L839-L857 — def _argv(config: dict) -> list[str]
- _connect · method · L859-L893 — def _connect(self, config: dict) -> MCPConnection
- _evict · method · L895-L917 — def _evict( self, connector_id: str, conn: MCPConnection, *, cache_scope: str = "", ) -> bool
- _invoke · method · L919-L961 — def _invoke( self, connector_id: str, config: dict, call: Callable[[MCPConnection], Any], ) -> Any
- _connect_lock · method · L963-L972 — def _connect_lock( self, connector_id: str, *, cache_scope: str = "" ) -> threading.Lock
- get · method · L974-L1033 — def get(self, connector_id: str, config: dict) -> MCPConnection
- probe · method · L1035-L1063 — def probe(self, config: dict) -> dict
- list_tools · method · L1065-L1066 — def list_tools(self, connector_id: str, config: dict) -> list[dict]
- call_tool · method · L1068-L1073 — def call_tool( self, connector_id: str, config: dict, tool: str, arguments: dict | None = None ) -> dict
- list_resources · method · L1075-L1081 — def list_resources( self, connector_id: str, config: dict, cursor: str | None = None, ) -> dict
- read_resource · method · L1083-L1084 — def read_resource(self, connector_id: str, config: dict, uri: str) -> dict
- list_prompts · method · L1086-L1092 — def list_prompts( self, connector_id: str, config: dict, cursor: str | None = None, ) -> dict
- get_prompt · method · L1094-L1103 — def get_prompt( self, connector_id: str, config: dict, name: str, arguments: dict | None = None, ) -> dict
- disconnect · method · L1105-L1147 — def disconnect(self, connector_id: str, cache_scope: str | None = None) -> None
- shutdown · method · L1149-L1169 — def shutdown(self) -> list[str]
- manager · function · L1176-L1180 — def manager() -> MCPManager
- disconnect_if_initialized · function · L1183-L1199 — def disconnect_if_initialized( connector_id: str, *, cache_scope: str | None = None ) -> bool
- example_server_config · function · L1202-L1204 — def example_server_config() -> dict
- protein_design_server_config · function · L1207-L1222 — def protein_design_server_config(root: str | None = None) -> dict