MCPcopy Index your code
hub / github.com/github/copilot-sdk / MCPAppsResourceContent

Class MCPAppsResourceContent

python/copilot/generated/rpc.py:2860–2899  ·  view source on GitHub ↗

Schema for the `McpAppsResourceContent` type.

Source from the content-addressed store, hash-verified

2858# Experimental: this type is part of an experimental API and may change or be removed.
2859@dataclass
2860class MCPAppsResourceContent:
2861 """Schema for the `McpAppsResourceContent` type."""
2862
2863 uri: str
2864 """The resource URI (typically ui://...)"""
2865
2866 meta: dict[str, Any] | None = None
2867 """Resource-level metadata (CSP, permissions, etc.)"""
2868
2869 blob: str | None = None
2870 """Base64-encoded binary content"""
2871
2872 mime_type: str | None = None
2873 """MIME type of the content"""
2874
2875 text: str | None = None
2876 """Text content (e.g. HTML)"""
2877
2878 @staticmethod
2879 def from_dict(obj: Any) -> 'MCPAppsResourceContent':
2880 assert isinstance(obj, dict)
2881 uri = from_str(obj.get("uri"))
2882 meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("_meta"))
2883 blob = from_union([from_str, from_none], obj.get("blob"))
2884 mime_type = from_union([from_str, from_none], obj.get("mimeType"))
2885 text = from_union([from_str, from_none], obj.get("text"))
2886 return MCPAppsResourceContent(uri, meta, blob, mime_type, text)
2887
2888 def to_dict(self) -> dict:
2889 result: dict = {}
2890 result["uri"] = from_str(self.uri)
2891 if self.meta is not None:
2892 result["_meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta)
2893 if self.blob is not None:
2894 result["blob"] = from_union([from_str, from_none], self.blob)
2895 if self.mime_type is not None:
2896 result["mimeType"] = from_union([from_str, from_none], self.mime_type)
2897 if self.text is not None:
2898 result["text"] = from_union([from_str, from_none], self.text)
2899 return result
2900
2901# Experimental: this type is part of an experimental API and may change or be removed.
2902@dataclass

Callers 1

from_dictMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…