use super::types::{ToolListResponse, ToolView};
use crate::billing::entitlements::urlencoding;
use crate::core::client::Client;
use crate::shared::Result;
use tokio_util::sync::CancellationToken;
impl Client {
pub async fn list_tools(&self, signal: Option<CancellationToken>) -> Result<Vec<ToolView>> {
let resp: ToolListResponse = self.billing_get("/tools", signal).await?;
Ok(resp.skills)
}
pub async fn get_tool(
&self,
tool_id: &str,
signal: Option<CancellationToken>,
) -> Result<ToolView> {
self.billing_get(&format!("/tools/{}", urlencoding(tool_id)), signal)
.await
}
}