1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Tool {
/// Activated is filled by the registry from the activation store for the requesting (org,project); providers leave it zero. An unactivated tool is discoverable but refused 403 at dispatch.
#[serde(rename = "activated", skip_serializing_if = "Option::is_none")]
pub activated: Option<bool>,
/// Description is the prose a model reads to decide whether to call the tool.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Dispatchable is whether the tool can be CALLED. False for a listing-only entry: a skill is activated and attached to an agent, never called.
#[serde(rename = "dispatchable", skip_serializing_if = "Option::is_none")]
pub dispatchable: Option<bool>,
#[serde(rename = "inputSchema", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub input_schema: Option<Option<serde_json::Value>>,
/// Name is the tool's id in the flat, fleet-wide tool namespace — the value a tools/call passes. Unique across sources: a collision is resolved by source precedence before the caller ever sees it.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Price is what a call costs and who is paid, absent for a free tool. Enforcement is the x402 settlement client; this is the declaration.
#[serde(rename = "price", skip_serializing_if = "Option::is_none")]
pub price: Option<Box<models::Price>>,
/// Source is where the tool comes from: connector, function, zap-service, agent, skill or mcp.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
}
impl Tool {
pub fn new() -> Tool {
Tool {
activated: None,
description: None,
dispatchable: None,
input_schema: None,
name: None,
price: None,
source: None,
}
}
}