prometheus_mcp/mcp/
compat.rs

1use crate::mcp::types::*;
2// filepath: /home/brenoepic/RustroverProjects/prometheus-mcp/src/mcp/compat.rs
3use rpc_router::HandlerResult;
4
5/// No-op handler for `resources/list` to satisfy clients that probe this method.
6pub async fn compat_resources_list(
7    _request: Option<ListResourcesRequest>,
8) -> HandlerResult<ListResourcesResult> {
9    Ok(ListResourcesResult {
10        resources: vec![],
11        next_cursor: None,
12    })
13}
14
15/// No-op handler for `resources/templates/list` to satisfy clients that probe this method.
16pub async fn compat_resource_templates_list(
17    _request: Option<ListResourceTemplatesRequest>,
18) -> HandlerResult<ListResourceTemplatesResult> {
19    Ok(ListResourceTemplatesResult {
20        resource_templates: vec![],
21        next_cursor: None,
22    })
23}
24
25/// No-op handler for `prompts/list` to satisfy clients that probe this method.
26pub async fn compat_prompts_list(
27    _request: Option<ListPromptsRequest>,
28) -> HandlerResult<ListPromptsResult> {
29    Ok(ListPromptsResult {
30        prompts: vec![],
31        next_cursor: None,
32    })
33}