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";
|
||||
|
||||
// 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: {
|
||||
|
||||
Reference in New Issue
Block a user