pub struct TruncationInfo {
pub applied_limit: Option<usize>,
pub items_content_truncated: usize,
pub items_omitted: usize,
pub estimated_tokens: Option<usize>,
pub suggestion: Option<String>,
}Expand description
Describes how a FetchOutput was bounded. A summary so an agent can tell at a glance
that it is not seeing the full, untruncated result and how to adjust.
Fields§
§applied_limit: Option<usize>The item cap actually applied (e.g. the MCP default of 25), or null if none.
items_content_truncated: usizeNumber of items whose content was truncated (e.g. by max_content_chars).
items_omitted: usizeNumber of items dropped entirely to fit a response budget. 0 unless the server
shed items (a Tier-2 behavior; always 0 in the cap-and-error path).
estimated_tokens: Option<usize>Rough token estimate of the (possibly reduced) serialized response, if computed.
suggestion: Option<String>Human/agent-facing hint on how to adjust the request (e.g. which knob to pass).
Trait Implementations§
Source§impl Clone for TruncationInfo
impl Clone for TruncationInfo
Source§fn clone(&self) -> TruncationInfo
fn clone(&self) -> TruncationInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TruncationInfo
impl Debug for TruncationInfo
Source§impl<'de> Deserialize<'de> for TruncationInfo
impl<'de> Deserialize<'de> for TruncationInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for TruncationInfo
impl JsonSchema for TruncationInfo
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for TruncationInfo
impl RefUnwindSafe for TruncationInfo
impl Send for TruncationInfo
impl Sync for TruncationInfo
impl Unpin for TruncationInfo
impl UnsafeUnpin for TruncationInfo
impl UnwindSafe for TruncationInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more