start_mbti_test
Initiate an MBTI personality assessment by selecting either a 28-question simplified version or a 48-question cognitive functions test to begin identifying your personality type.
Instructions
开始MBTI人格测试。用户可以选择测试类型:simplified(简化版28题)或cognitive(认知功能版48题)。返回第一道题目和测试会话状态。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testType | Yes | 测试类型:simplified(简化版)或cognitive(认知功能版) |
Implementation Reference
- src/index.ts:133-163 (handler)Executes the 'start_mbti_test' tool: initializes TestSession based on testType, selects questions from questionBank, returns first question and session state.if (name === 'start_mbti_test') { const testType = args.testType as TestType; const questions = testType === 'simplified' ? questionBank.simplified : questionBank.cognitive; const session: TestSession = { testType, answers: [], currentQuestionIndex: 0, }; return { content: [ { type: 'text', text: JSON.stringify({ message: `测试已开始!共${questions.length}题。`, testType, currentQuestion: { index: 1, total: questions.length, question: questions[0], }, session, instruction: '请使用1-5分评分:1=强烈不同意, 2=不同意, 3=中立, 4=同意, 5=强烈同意', }, null, 2), }, ], }; }
- src/index.ts:28-42 (registration)Tool registration in ListToolsResponse: defines name, description, and inputSchema for 'start_mbti_test'.{ name: 'start_mbti_test', description: '开始MBTI人格测试。用户可以选择测试类型:simplified(简化版28题)或cognitive(认知功能版48题)。返回第一道题目和测试会话状态。', inputSchema: { type: 'object', properties: { testType: { type: 'string', enum: ['simplified', 'cognitive'], description: '测试类型:simplified(简化版)或cognitive(认知功能版)', }, }, required: ['testType'], }, },
- src/types.ts:9-31 (schema)TypeScript type definitions for TestType, Question, Answer, and TestSession used in the tool's handler and schema.export type TestType = 'simplified' | 'cognitive'; // Question Structure export interface Question { id: number; text: string; dimension?: MBTIDimension; // For simplified test cognitiveFunction?: CognitiveFunction; // For cognitive test reverse?: boolean; // If true, reverse the scoring } // Answer Structure export interface Answer { questionId: number; score: number; // 1-5 (Likert scale) } // Test Session State (passed in each call for stateless design) export interface TestSession { testType: TestType; answers: Answer[]; currentQuestionIndex: number; }