Files
myeasycms-v2/packages/mcp-server/src/tools/run-checks/schema.ts
Giancarlo Buomprisco f3ac595d06 MCP Server 2.0 (#452)
* MCP Server 2.0

- Updated application version from 2.23.14 to 2.24.0 in package.json.
- MCP Server improved with new features
- Migrated functionality from Dev Tools to MCP Server
- Improved getMonitoringProvider not to crash application when misconfigured
2026-02-11 20:42:01 +01:00

41 lines
1.2 KiB
TypeScript

import { z } from 'zod/v3';
export const RunChecksInputSchema = z.object({
state: z
.object({
scripts: z.array(z.string().min(1)).optional(),
includeTests: z.boolean().optional(),
failFast: z.boolean().optional(),
maxOutputChars: z.number().int().min(200).max(20000).optional(),
})
.optional(),
});
export const RunChecksResultSchema = z.object({
script: z.string(),
command: z.string(),
status: z.enum(['pass', 'fail', 'missing', 'skipped']),
exit_code: z.number().int().nullable(),
duration_ms: z.number().int().min(0),
stdout: z.string(),
stderr: z.string(),
message: z.string().optional(),
});
export const RunChecksOutputSchema = z.object({
overall: z.enum(['pass', 'fail']),
scripts_requested: z.array(z.string()),
checks: z.array(RunChecksResultSchema),
summary: z.object({
total: z.number().int().min(0),
passed: z.number().int().min(0),
failed: z.number().int().min(0),
missing: z.number().int().min(0),
skipped: z.number().int().min(0),
}),
});
export type RunChecksInput = z.infer<typeof RunChecksInputSchema>;
export type RunChecksResult = z.infer<typeof RunChecksResultSchema>;
export type RunChecksOutput = z.infer<typeof RunChecksOutputSchema>;