What the server returned for this session
| 2735 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 2736 | @dataclass |
| 2737 | class MCPAppsDiagnoseServer: |
| 2738 | """What the server returned for this session""" |
| 2739 | |
| 2740 | connected: bool |
| 2741 | """Whether the named server is currently connected""" |
| 2742 | |
| 2743 | sample_tool_names: list[str] |
| 2744 | """Up to 5 tool names with `_meta.ui` for quick inspection""" |
| 2745 | |
| 2746 | tool_count: float |
| 2747 | """Total tools returned by the server's tools/list""" |
| 2748 | |
| 2749 | tools_with_ui_meta: float |
| 2750 | """Tools whose `_meta.ui` is populated (resourceUri and/or visibility set)""" |
| 2751 | |
| 2752 | @staticmethod |
| 2753 | def from_dict(obj: Any) -> 'MCPAppsDiagnoseServer': |
| 2754 | assert isinstance(obj, dict) |
| 2755 | connected = from_bool(obj.get("connected")) |
| 2756 | sample_tool_names = from_list(from_str, obj.get("sampleToolNames")) |
| 2757 | tool_count = from_float(obj.get("toolCount")) |
| 2758 | tools_with_ui_meta = from_float(obj.get("toolsWithUiMeta")) |
| 2759 | return MCPAppsDiagnoseServer(connected, sample_tool_names, tool_count, tools_with_ui_meta) |
| 2760 | |
| 2761 | def to_dict(self) -> dict: |
| 2762 | result: dict = {} |
| 2763 | result["connected"] = from_bool(self.connected) |
| 2764 | result["sampleToolNames"] = from_list(from_str, self.sample_tool_names) |
| 2765 | result["toolCount"] = to_float(self.tool_count) |
| 2766 | result["toolsWithUiMeta"] = to_float(self.tools_with_ui_meta) |
| 2767 | return result |
| 2768 | |
| 2769 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 2770 | class MCPAppsDisplayMode(Enum): |
no outgoing calls
no test coverage detected
searching dependent graphs…