pub struct WebFetchTool;Implementations§
Source§impl WebFetchTool
impl WebFetchTool
Trait Implementations§
Source§impl Default for WebFetchTool
impl Default for WebFetchTool
Source§impl Tool for WebFetchTool
impl Tool for WebFetchTool
Source§fn definition(&self) -> &ToolDefinition
fn definition(&self) -> &ToolDefinition
Stable borrow of the tool’s definition. Registry calls this once at
registration time (for summaries/schema lookup) — implementers
typically store a single
ToolDefinition in the struct.Source§fn call<'a>(&'a self, args: Value, ctx: &'a CallContext) -> CallFuture<'a>
fn call<'a>(&'a self, args: Value, ctx: &'a CallContext) -> CallFuture<'a>
Invoke the tool. Args are the deserialized JSON from the wire.
Source§fn supports_pagination(&self) -> bool
fn supports_pagination(&self) -> bool
SP-pagination-v1 §4.4 — whether this tool’s
call_paginated impl
produces meaningful pages (cursors emitted on first page, cursors
consumed on continuations). Default false: dispatch routes the
tool through Binding::call unchanged (preserving CLI / future
MCP / REST binding semantics). Tools that override call_paginated
must also override this to return true. Read moreSource§fn call_paginated<'a>(
&'a self,
args: Value,
ctx: &'a CallContext,
_cursor: Option<&'a str>,
) -> Pin<Box<dyn Future<Output = Result<PaginatedResult, ToolCallError>> + Send + 'a>>
fn call_paginated<'a>( &'a self, args: Value, ctx: &'a CallContext, _cursor: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<PaginatedResult, ToolCallError>> + Send + 'a>>
SP-pagination-v1 §4.4 — paginated variant. Default impl wraps
call
and returns next_cursor: None, so existing tools work unchanged.
Tools that want to paginate override this method AND supports_pagination. Read moreAuto Trait Implementations§
impl Freeze for WebFetchTool
impl RefUnwindSafe for WebFetchTool
impl Send for WebFetchTool
impl Sync for WebFetchTool
impl Unpin for WebFetchTool
impl UnsafeUnpin for WebFetchTool
impl UnwindSafe for WebFetchTool
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