We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/IBM/mcp-context-forge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
json_rpc_id.rs•426 B
use serde::Deserialize;
#[derive(Deserialize, Debug)]
struct JsonRpcHeader {
id: serde_json::Value,
}
/// parses string for jsonrpc id
/// # Errors
///
/// Returns an error if the string is not valid JSON, or if the `id` field is missing or not a `u64`.
pub fn parse_id(json_str: &str) -> Result<serde_json::Value, serde_json::Error> {
let header: JsonRpcHeader = serde_json::from_str(json_str)?;
Ok(header.id)
}