diff --git a/mcp/src/server.ts b/mcp/src/server.ts index 3007639..e88cab7 100644 --- a/mcp/src/server.ts +++ b/mcp/src/server.ts @@ -15,6 +15,25 @@ import { getHistory } from "./tools/get-history.js"; type Lang = "en" | "ko"; +// Common output schema for all tools (markdown text content) +const TEXT_OUTPUT = { + type: "object" as const, + properties: { + content: { + type: "array", + items: { + type: "object", + properties: { + type: { type: "string", const: "text" }, + text: { type: "string", description: "Markdown-formatted inspection result" }, + }, + required: ["type", "text"], + }, + }, + }, + required: ["content"], +}; + const STANDARDS = [ "wcag_2.0_a", "wcag_2.0_aa", @@ -57,6 +76,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server { idempotentHint: true, openWorldHint: true, }, + outputSchema: TEXT_OUTPUT, inputSchema: { type: "object" as const, properties: { @@ -88,6 +108,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server { idempotentHint: false, openWorldHint: true, }, + outputSchema: TEXT_OUTPUT, inputSchema: { type: "object" as const, properties: { @@ -127,6 +148,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server { idempotentHint: true, openWorldHint: false, }, + outputSchema: TEXT_OUTPUT, inputSchema: { type: "object" as const, properties: { @@ -153,6 +175,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server { idempotentHint: true, openWorldHint: false, }, + outputSchema: TEXT_OUTPUT, inputSchema: { type: "object" as const, properties: { @@ -198,6 +221,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server { idempotentHint: true, openWorldHint: false, }, + outputSchema: TEXT_OUTPUT, inputSchema: { type: "object" as const, properties: {