/**
 * Bounding tool output fed back to the model.
 *
 * MCP tools can return very large payloads — e.g. a dataset-wide aggregate over
 * hundreds of thousands of documents. The tool loop re-feeds accumulated tool
 * output to the model on every round (Chat Completions and Anthropic resend the
 * full message array; the Responses API accumulates it server-side via
 * `previous_response_id`). An unbounded payload overflows the model's context
 * window and the provider rejects the request — the OpenAI Responses API returns
 * HTTP 400 "Your input exceeds the context window of this model".
 *
 * `boundToolOutput` caps a single tool result at a character budget and appends
 * an explicit truncation marker, so the model sees that the result was cut and
 * the tool-call log records the original size. The bound is transport-agnostic:
 * both the OpenAI and Anthropic loops apply it before feeding a result back.
 */
/**
 * Default per-tool-result character budget fed back to the model.
 *
 * ~50k characters is roughly 12–13k tokens. With the default of 5 tool rounds
 * that caps accumulated tool output near ~62k tokens — comfortably inside the
 * context window of every model the MCP provider targets — while leaving normal
 * tool responses (counts, summaries, schema fragments) untouched. Only
 * pathological dataset-wide dumps exceed it.
 */
export declare const DEFAULT_MAX_TOOL_OUTPUT_CHARS = 50000;
export interface BoundedToolOutput {
    /** The (possibly truncated) content to feed back to the model. */
    content: string;
    /** True when the content was truncated to fit the budget. */
    truncated: boolean;
    /** The original content length in characters, before any truncation. */
    originalLength: number;
}
/**
 * Cap a single tool result at `maxChars` characters.
 *
 * When the content fits, it is returned unchanged with `truncated: false`.
 * When it exceeds the budget, the content is sliced to `maxChars` and an
 * explicit marker is appended naming how many characters were dropped, so the
 * truncation is visible to the model and to anyone reading the tool-call log.
 */
export declare function boundToolOutput(content: string, maxChars?: number): BoundedToolOutput;
