zai-rs 0.6.0

Type-safe async Rust SDK for Zhipu AI (BigModel) APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Discover the MCP tools available through the SDK's managed backends.

use zai_rs::mcp::McpClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = McpClient::from_env()?;
    let tools = client.tools().await;
    client.close().await?;

    for tool in tools? {
        println!("{}", tool.name);
    }
    Ok(())
}