MCP 도구 개발 가이드
개요
Agent Treatment Flow에서 사용하는 MCP(Model Context Protocol) 도구들의 개발 가이드입니다.
도구 목록
데이터 수집 도구
query-logs: 로그 데이터 조회query-recent-errors: 최근 에러 조회analyze-error-patterns: 에러 패턴 분석
시간 관리 도구
get-current-time: 현재 시간 조회
개발 가이드
구체적인 개발 가이드는 추후 업데이트될 예정입니다.
1.3 사용 예시
// MCP 도구 사용 예시
const response = await mcp.executeTool({
toolName: 'query-user-context',
params: {
userId: 'user123',
includePreferences: true,
includeTreatmentHistory: true,
includeRecentActivities: 7
}
});
// 응답 구조
{
user: {
id: 'user123',
demographics: { age: 35, gender: 'female' },
preferences: {
language: 'ko',
timezone: 'Asia/Seoul',
notificationSettings: { ... }
}
},
treatmentProcess: {
id: 'process456',
userCycleId: 'cycle789',
currentPhase: 'P2',
startDate: '2024-01-15',
progress: 0.25
},
recentSleepData: [ ... ],
recentActivities: [ ... ]
}
2. 치료 결정 도구
2.1 hypothesis-refinement
name: hypothesis-refinement
description: P2 단계에서 수면 문제의 원인 가설을 정제
input:
userId: string
assessmentData:
- questionnaire responses
- sleep patterns
- lifestyle factors
existingHypotheses?: Hypothesis[]
output:
hypotheses:
- id: string
type: HypothesisType
confidence: number
evidence: string[]
suggestedModules: string[]
2.2 generate-treatment-roadmap
name: generate-treatment-roadmap
description: P3 단계에서 12주 치료 로드맵 생성
input:
userId: string
hypotheses: Hypothesis[]
severity: SeverityLevel
preferences: UserPreferences
output:
roadmap:
duration: number # weeks
phases: Phase[]
modules: Module[]
milestones: Milestone[]
adaptationRules: Rule[]
2.3 evaluate-treatment-progress
name: evaluate-treatment-progress
description: P5 단계에서 주간 치료 진행 상황 평가
input:
userId: string
processId: string
weekNumber: number
metrics:
- sleep efficiency
- task completion
- subjective reports
output:
evaluation:
progressScore: number
improvements: string[]
challenges: string[]
recommendation: PathRecommendation
adjustments: Adjustment[]