pub struct SearchCratesTool {
pub query: String,
pub limit: Option<u32>,
pub sort: Option<String>,
pub format: Option<String>,
}Expand description
Search crates tool parameters
Used to specify search criteria for finding Rust crates on crates.io.
Parameters for the search_crates tool
Defines the input parameters for searching Rust crates on crates.io, including the search query, result limit, sort order, and output format.
Fields§
§query: StringSearch keywords (e.g., “web framework”, “async”, “http client”)
limit: Option<u32>Maximum number of results to return (range 1-100, defaults to 10)
sort: Option<String>Sort order: “relevance”, “downloads”, “recent-downloads”, “recent-updates”, “new”
format: Option<String>Output format: “markdown”, “text”, or “json” (defaults to “markdown”)
Implementations§
Source§impl SearchCratesTool
impl SearchCratesTool
Sourcepub fn request_params() -> CallToolRequestParams
pub fn request_params() -> CallToolRequestParams
Returns a CallToolRequestParams initialized with the current tool’s name.
You can further customize the request by adding arguments or other attributes using the builder pattern. For example:
let args = serde_json::Map::new();
let task_meta = TaskMetadata{ttl: Some(200)}
let params: CallToolRequestParams = MyTool::request_params()
.with_arguments(args)
.with_task(task_meta);§Returns
A CallToolRequestParams with the tool name set.
Source§impl SearchCratesTool
impl SearchCratesTool
pub fn json_schema() -> Map<String, Value>
Trait Implementations§
Source§impl Clone for SearchCratesTool
impl Clone for SearchCratesTool
Source§fn clone(&self) -> SearchCratesTool
fn clone(&self) -> SearchCratesTool
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more