You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/server/src/routes/slack/agent.ts
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,13 @@ function buildSystemPrompt(workspaceName: string): string {
18
18
return`You are the OpenStatus assistant for workspace "${workspaceName}".
19
19
You help teams create and manage status reports and maintenance windows through Slack.
20
20
21
-
IMPORTANT: You have NO knowledge of this workspace's data. NEVER guess or make up status pages, components, or reports. ALWAYS call the appropriate tool first to get real data.
22
-
- Questions about pages or components -> call listStatusPages
23
-
- Questions about reports -> call listStatusReports
24
-
- Questions about maintenances -> call listMaintenances
25
-
- Creating a report -> call listStatusPages first, then createStatusReport
26
-
- Scheduling maintenance -> call listStatusPages first, then createMaintenance
21
+
IMPORTANT: You have NO knowledge of this workspace's data. NEVER guess or make up IDs (page IDs, component IDs, report IDs). You MUST call the appropriate tool first to get real data.
22
+
- Questions about pages or components -> call listStatusPages FIRST
23
+
- Questions about reports -> call listStatusReports FIRST
24
+
- Questions about maintenances -> call listMaintenances FIRST
25
+
- Creating a report -> you MUST call listStatusPages first to get the real pageId, then call createStatusReport with that pageId
26
+
- Scheduling maintenance -> you MUST call listStatusPages first to get the real pageId, then call createMaintenance with that pageId
27
+
- NEVER pass a pageId you did not receive from listStatusPages. Guessing a pageId WILL cause an error.
27
28
28
29
Capabilities:
29
30
- Create status reports on status pages (createStatusReport)
Copy file name to clipboardExpand all lines: apps/server/src/routes/slack/tools/create-maintenance.ts
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ import { z } from "zod";
4
4
exportfunctioncreateCreateMaintenanceTool(){
5
5
returntool({
6
6
description:
7
-
"Schedule a maintenance window on a status page. Parse natural language dates into ISO 8601 format (e.g. 'next Friday 2-3 PM' -> proper ISO strings). The maintenance will be shown to the user for confirmation before publishing.",
7
+
"Schedule a maintenance window on a status page. IMPORTANT: You MUST call listStatusPages first to get the real pageId — never guess or make up a pageId. Parse natural language dates into ISO 8601 format (e.g. 'next Friday 2-3 PM' -> proper ISO strings). The maintenance will be shown to the user for confirmation before publishing.",
8
8
inputSchema: z.object({
9
9
title: z.string().describe("Short title for the maintenance window"),
10
10
message: z
@@ -18,7 +18,11 @@ export function createCreateMaintenanceTool() {
18
18
to: z
19
19
.string()
20
20
.describe("End time in ISO 8601 format (e.g. 2025-03-14T15:00:00Z)"),
21
-
pageId: z.number().describe("ID of the status page to post on"),
21
+
pageId: z
22
+
.number()
23
+
.describe(
24
+
"ID of the status page — MUST come from listStatusPages, never guess this value",
Copy file name to clipboardExpand all lines: apps/server/src/routes/slack/tools/create-status-report.ts
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ import { z } from "zod";
4
4
exportfunctioncreateCreateStatusReportTool(){
5
5
returntool({
6
6
description:
7
-
"Create a new status report. Draft the title and message based on the conversation. The report will be shown to the user for confirmation before publishing.",
7
+
"Create a new status report. IMPORTANT: You MUST call listStatusPages first to get the real pageId — never guess or make up a pageId. Draft the title and message based on the conversation. The report will be shown to the user for confirmation before publishing.",
8
8
inputSchema: z.object({
9
9
title: z.string().describe("Short title for the status report"),
10
10
status: z
@@ -15,7 +15,11 @@ export function createCreateStatusReportTool() {
15
15
.describe(
16
16
"Professional status update message for the public status page",
17
17
),
18
-
pageId: z.number().describe("ID of the status page to post on"),
18
+
pageId: z
19
+
.number()
20
+
.describe(
21
+
"ID of the status page — MUST come from listStatusPages, never guess this value",
0 commit comments