import type { ToolExecuteResult } from "@kenkaiiii/gg-agent"; /** * Convert an MCP tool's content array into a result the model can actually * consume, covering the whole `ContentBlock` union rather than text alone. * * Text-only results stay plain strings so the overwhelmingly common path keeps * its existing shape (and the agent loop's string budgeting still applies). * Images are re-encoded through {@link shrinkToFit}, the same helper the `read` * tool uses: an unbounded screenshot from a third-party server would otherwise * exceed provider size limits and fail the whole turn. A media type the buffer * contradicts is corrected there too, since providers reject mismatches. * * Anything not viewable — audio, a resource link, a binary blob, an unreadable * image — becomes a text note instead of vanishing. A block silently dropped is * one the model never learns existed, so it answers as though the server * returned nothing; a note lets it say what it actually got. * * All text is stripped of invisible Unicode tag characters first. This is the * single point every MCP server's output passes through on its way into the * model's context, and a third-party server is exactly the party that would * hide instructions where neither the user nor the transcript can show them. */ export declare function toToolResult(content: unknown[], toolName: string): Promise; //# sourceMappingURL=content.d.ts.map