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

Class ExternalToolTextResultForLlm

python/copilot/generated/rpc.py:17113–17165  ·  view source on GitHub ↗

Expanded external tool result payload

Source from the content-addressed store, hash-verified

17111# Experimental: this type is part of an experimental API and may change or be removed.
17112@dataclass
17113class ExternalToolTextResultForLlm:
17114 """Expanded external tool result payload"""
17115
17116 text_result_for_llm: str
17117 """Text result returned to the model"""
17118
17119 binary_results_for_llm: list[ExternalToolTextResultForLlmBinaryResultsForLlm] | None = None
17120 """Base64-encoded binary results returned to the model"""
17121
17122 contents: list[ExternalToolTextResultForLlmContent] | None = None
17123 """Structured content blocks from the tool"""
17124
17125 error: str | None = None
17126 """Optional error message for failed executions"""
17127
17128 result_type: str | None = None
17129 """Execution outcome classification. Optional for back-compat; normalized to 'success' (or
17130 'failure' when error is present) when missing or unrecognized.
17131 """
17132 session_log: str | None = None
17133 """Detailed log content for timeline display"""
17134
17135 tool_telemetry: dict[str, Any] | None = None
17136 """Optional tool-specific telemetry"""
17137
17138 @staticmethod
17139 def from_dict(obj: Any) -> 'ExternalToolTextResultForLlm':
17140 assert isinstance(obj, dict)
17141 text_result_for_llm = from_str(obj.get("textResultForLlm"))
17142 binary_results_for_llm = from_union([lambda x: from_list(ExternalToolTextResultForLlmBinaryResultsForLlm.from_dict, x), from_none], obj.get("binaryResultsForLlm"))
17143 contents = from_union([lambda x: from_list(_load_ExternalToolTextResultForLlmContent, x), from_none], obj.get("contents"))
17144 error = from_union([from_str, from_none], obj.get("error"))
17145 result_type = from_union([from_str, from_none], obj.get("resultType"))
17146 session_log = from_union([from_str, from_none], obj.get("sessionLog"))
17147 tool_telemetry = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("toolTelemetry"))
17148 return ExternalToolTextResultForLlm(text_result_for_llm, binary_results_for_llm, contents, error, result_type, session_log, tool_telemetry)
17149
17150 def to_dict(self) -> dict:
17151 result: dict = {}
17152 result["textResultForLlm"] = from_str(self.text_result_for_llm)
17153 if self.binary_results_for_llm is not None:
17154 result["binaryResultsForLlm"] = from_union([lambda x: from_list(lambda x: to_class(ExternalToolTextResultForLlmBinaryResultsForLlm, x), x), from_none], self.binary_results_for_llm)
17155 if self.contents is not None:
17156 result["contents"] = from_union([lambda x: from_list(lambda x: (x).to_dict(), x), from_none], self.contents)
17157 if self.error is not None:
17158 result["error"] = from_union([from_str, from_none], self.error)
17159 if self.result_type is not None:
17160 result["resultType"] = from_union([from_str, from_none], self.result_type)
17161 if self.session_log is not None:
17162 result["sessionLog"] = from_union([from_str, from_none], self.session_log)
17163 if self.tool_telemetry is not None:
17164 result["toolTelemetry"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.tool_telemetry)
17165 return result
17166
17167# Experimental: this type is part of an experimental API and may change or be removed.
17168@dataclass

Callers 2

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…