use serde::{Deserialize, Serialize};
use serde_json::Value;
pub(crate) const PROTOCOL_VERSION: &str = "2024-11-05";
pub(crate) const SERVER_NAME: &str = "rustyroad-mcp";
pub(crate) const SERVER_VERSION: &str = env!("CARGO_PKG_VERSION");
#[derive(Debug, Deserialize)]
#[allow(dead_code)]
pub(crate) struct JsonRpcRequest {
pub(crate) jsonrpc: String,
pub(crate) id: Option<Value>,
pub(crate) method: String,
#[serde(default)]
pub(crate) params: Value,
}
#[derive(Debug, Serialize)]
pub(crate) struct JsonRpcResponse {
pub(crate) jsonrpc: String,
pub(crate) id: Value,
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) result: Option<Value>,
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) error: Option<JsonRpcError>,
}
#[derive(Debug, Serialize)]
pub(crate) struct JsonRpcError {
pub(crate) code: i32,
pub(crate) message: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) data: Option<Value>,
}
#[derive(Debug, Serialize)]
pub(crate) struct Tool {
pub(crate) name: String,
pub(crate) description: String,
#[serde(rename = "inputSchema")]
pub(crate) input_schema: Value,
}