feat: 모든 도구에 outputSchema 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -15,6 +15,25 @@ import { getHistory } from "./tools/get-history.js";
|
|||||||
|
|
||||||
type Lang = "en" | "ko";
|
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 = [
|
const STANDARDS = [
|
||||||
"wcag_2.0_a",
|
"wcag_2.0_a",
|
||||||
"wcag_2.0_aa",
|
"wcag_2.0_aa",
|
||||||
@ -57,6 +76,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server {
|
|||||||
idempotentHint: true,
|
idempotentHint: true,
|
||||||
openWorldHint: true,
|
openWorldHint: true,
|
||||||
},
|
},
|
||||||
|
outputSchema: TEXT_OUTPUT,
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object" as const,
|
type: "object" as const,
|
||||||
properties: {
|
properties: {
|
||||||
@ -88,6 +108,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server {
|
|||||||
idempotentHint: false,
|
idempotentHint: false,
|
||||||
openWorldHint: true,
|
openWorldHint: true,
|
||||||
},
|
},
|
||||||
|
outputSchema: TEXT_OUTPUT,
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object" as const,
|
type: "object" as const,
|
||||||
properties: {
|
properties: {
|
||||||
@ -127,6 +148,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server {
|
|||||||
idempotentHint: true,
|
idempotentHint: true,
|
||||||
openWorldHint: false,
|
openWorldHint: false,
|
||||||
},
|
},
|
||||||
|
outputSchema: TEXT_OUTPUT,
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object" as const,
|
type: "object" as const,
|
||||||
properties: {
|
properties: {
|
||||||
@ -153,6 +175,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server {
|
|||||||
idempotentHint: true,
|
idempotentHint: true,
|
||||||
openWorldHint: false,
|
openWorldHint: false,
|
||||||
},
|
},
|
||||||
|
outputSchema: TEXT_OUTPUT,
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object" as const,
|
type: "object" as const,
|
||||||
properties: {
|
properties: {
|
||||||
@ -198,6 +221,7 @@ export function createServer(apiUrl: string, defaultLang: Lang): Server {
|
|||||||
idempotentHint: true,
|
idempotentHint: true,
|
||||||
openWorldHint: false,
|
openWorldHint: false,
|
||||||
},
|
},
|
||||||
|
outputSchema: TEXT_OUTPUT,
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object" as const,
|
type: "object" as const,
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
Reference in New Issue
Block a user