Skip to content

Commit f9c35ad

Browse files
Add more details to MCP server output + reporting
1 parent 31f86fc commit f9c35ad

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/responder/mcp.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ impl Probes {
3131
}
3232
}
3333

34-
#[tool(description = "Gets the general health report for all Vigil probes")]
34+
#[tool(
35+
description = "Returns all Vigil Status Page services and nodes and reports their status (healthy, sick, dead)"
36+
)]
3537
fn get_report(
3638
&self,
3739
Parameters(_): Parameters<ProbesRequest>,
@@ -44,7 +46,7 @@ impl Probes {
4446
impl ServerHandler for Probes {
4547
fn get_info(&self) -> ServerInfo {
4648
ServerInfo {
47-
instructions: Some("Vigil Probes".into()),
49+
instructions: Some("Vigil MCP Server. Use this server to get the status report of all Vigil Status Page services and nodes.".into()),
4850
capabilities: ServerCapabilities::builder().enable_tools().build(),
4951
..Default::default()
5052
}

src/responder/payload.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use rmcp::schemars;
88

99
use crate::prober::manager::STORE as PROBER_STORE;
1010
use crate::prober::status::Status as HealthStatus;
11+
use crate::APP_CONF;
1112

1213
#[derive(Deserialize)]
1314
pub struct ReporterRequestPayload {
@@ -66,9 +67,16 @@ pub struct ManagerProberAlertsIgnoredResolveResponsePayload {
6667
#[derive(Serialize, schemars::JsonSchema)]
6768
pub struct StatusReportResponsePayload {
6869
health: HealthStatus,
70+
page: StatusReportResponsePayloadPage,
6971
probes: Vec<StatusReportResponsePayloadProbe>,
7072
}
7173

74+
#[derive(Serialize, schemars::JsonSchema)]
75+
pub struct StatusReportResponsePayloadPage {
76+
pub name: String,
77+
pub url: String,
78+
}
79+
7280
#[derive(Serialize, schemars::JsonSchema)]
7381
pub struct StatusReportResponsePayloadProbe {
7482
pub name: String,
@@ -89,6 +97,10 @@ impl StatusReportResponsePayload {
8997

9098
StatusReportResponsePayload {
9199
health: states.status.clone(),
100+
page: StatusReportResponsePayloadPage {
101+
name: APP_CONF.branding.page_title.to_owned(),
102+
url: APP_CONF.branding.page_url.to_string(),
103+
},
92104
probes: states
93105
.probes
94106
.iter()

0 commit comments

Comments
 (0)