1use super::types::{ToolListResponse, ToolView};
5use crate::billing::entitlements::urlencoding;
6use crate::core::client::Client;
7use crate::shared::Result;
8use tokio_util::sync::CancellationToken;
9
10impl Client {
11 pub async fn list_tools(&self, signal: Option<CancellationToken>) -> Result<Vec<ToolView>> {
13 let resp: ToolListResponse = self.billing_get("/tools", signal).await?;
14 Ok(resp.skills)
15 }
16
17 pub async fn get_tool(
19 &self,
20 tool_id: &str,
21 signal: Option<CancellationToken>,
22 ) -> Result<ToolView> {
23 self.billing_get(&format!("/tools/{}", urlencoding(tool_id)), signal)
24 .await
25 }
26}