Overview

The ToolListResponse struct represents the response returned when fetching a paginated list of AI tools.

Definition

pub struct ToolListResponse {
    pub data: Vec<AiTool>,
    pub has_more: bool,
}

Fields

data
Vec<AiTool>
required
A vector containing the AI tools for the current page. Each tool is represented by an AiTool struct.
has_more
bool
required
Indicates whether there are more tools available beyond the current page. Used for pagination.

Usage Example

use wacht::api::tools::*;

let options = ListToolsOptions {
    page: Some(1),
    per_page: Some(20),
    search: None,
    is_active: Some(true),
};

let response = fetch_tools(Some(options)).await?;

println!("Found {} tools", response.data.len());
if response.has_more {
    println!("More tools available on next page");
}

for tool in response.data {
    println!("Tool: {} - {}", tool.name, tool.description);
    println!("  Type: {}", tool.tool_type);
    println!("  Active: {}", tool.is_active);
    if let Some(config) = tool.config {
        println!("  Config: {:?}", config);
    }
}

See Also