Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
967 B ยท 34 lines
TypeScript
1234567891011121314151617181920212223242526272829303132333435import { z } from "zod";
import { listPages } from "../page";import type { AgentTool } from "./types";
const ListStatusPagesInput = z.object({}).strict();const ListStatusPagesOutput = z.object({ items: z.array( z.object({ id: z.number().int(), title: z.string(), slug: z.string(), }), ),});
export const listStatusPagesTool: AgentTool< z.infer<typeof ListStatusPagesInput>, z.infer<typeof ListStatusPagesOutput>> = { name: "list_status_pages", description: "List status pages in this workspace with their slug and ids. Use to discover the pageId required by create_status_report and create_maintenance.", scope: "read", destructive: false, inputSchema: ListStatusPagesInput, outputSchema: ListStatusPagesOutput, async run({ ctx }) { const pages = await listPages({ ctx, input: { order: "desc" } }); return { items: pages.map((p) => ({ id: p.id, title: p.title, slug: p.slug })), }; },};