use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "client_objectiveai_mcp.client_request.Payload")]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum Payload {
#[schemars(title = "McpListChanged")]
McpListChanged(McpListChanged),
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "client_objectiveai_mcp.client_request.McpListChanged")]
pub struct McpListChanged {
pub mcp_kind: super::super::McpKind,
pub kind: McpListChangedKind,
}
#[derive(
Debug, Clone, Copy, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash,
)]
#[schemars(rename = "client_objectiveai_mcp.client_request.McpListChangedKind")]
#[serde(rename_all = "snake_case")]
pub enum McpListChangedKind {
Tools,
Resources,
}
impl McpListChangedKind {
pub fn method(&self) -> &'static str {
match self {
McpListChangedKind::Tools => "notifications/tools/list_changed",
McpListChangedKind::Resources => {
"notifications/resources/list_changed"
}
}
}
}