glass-browser 0.2.4

Local, revision-safe Chrome automation runtime for agents, with semantic observation, verified workflows, MCP, CLI, TUI, and Rust APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Build the MCP initialize request used by a Glass client.

use serde_json::json;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let request = json!({
        "jsonrpc": "2.0",
        "id": 1,
        "method": "initialize",
        "params": {
            "protocolVersion": "2024-11-05",
            "capabilities": {},
            "clientInfo": {"name": "glass-example", "version": env!("CARGO_PKG_VERSION")}
        }
    });
    println!("{}", serde_json::to_string_pretty(&request)?);
    Ok(())
}