pub struct WebFetchParams {
pub url: String,
}Expand description
Args for the browser web_fetch tool (src/app/chat/tools/misc.rs)
— proxy-metered external HTTPS fetch.
Fields§
§url: StringAbsolute https:// URL to fetch — a docs page, GitHub README (use raw.githubusercontent.com for raw content), or JSON API endpoint. http://, private/internal hosts, and raw-IP targets are rejected.
Implementations§
Source§impl WebFetchParams
impl WebFetchParams
Sourcepub fn schema() -> Value
pub fn schema() -> Value
Wire input_schema, generated from the SAME table as the struct
fields. Single type per property, no unions / oneOf /
additionalProperties — Gemini-safe by construction.
Sourcepub fn lenient(args: &Value) -> Self
pub fn lenient(args: &Value) -> Self
Lenient extraction: a missing or wrong-typed field falls back
to its default ("" / None / 0) instead of erroring — the
browser chat tools’ historical .get().and_then().unwrap_or()
semantics, preserved exactly (validation stays in the tool body).
req_u64 fields extract to None here; the error fires at
their generated accessor, matching the old inline ok_or_else.