Skip to main content
Glama

get_progress

Check current MBTI test progress by providing session state, showing answered questions and remaining items in personality assessment.

Instructions

查询当前测试进度。需要传入测试会话状态。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionYes测试会话状态

Implementation Reference

  • src/index.ts:78-97 (registration)
    Registration of the 'get_progress' tool in the ListTools handler, defining its name, description, and input schema.
    { name: 'get_progress', description: '查询当前测试进度。需要传入测试会话状态。', inputSchema: { type: 'object', properties: { session: { type: 'object', description: '测试会话状态', properties: { testType: { type: 'string' }, answers: { type: 'array' }, currentQuestionIndex: { type: 'number' }, }, required: ['testType', 'answers', 'currentQuestionIndex'], }, }, required: ['session'], }, },
  • Input schema for the 'get_progress' tool, validating the session object.
    inputSchema: { type: 'object', properties: { session: { type: 'object', description: '测试会话状态', properties: { testType: { type: 'string' }, answers: { type: 'array' }, currentQuestionIndex: { type: 'number' }, }, required: ['testType', 'answers', 'currentQuestionIndex'], }, }, required: ['session'], },
  • Handler implementation for the 'get_progress' tool. Computes progress percentage and completion status based on the provided session state and question bank total.
    if (name === 'get_progress') { const session = args.session as TestSession; const questions = session.testType === 'simplified' ? questionBank.simplified : questionBank.cognitive; return { content: [ { type: 'text', text: JSON.stringify({ testType: session.testType, progress: { answered: session.answers.length, total: questions.length, percentage: Math.round((session.answers.length / questions.length) * 100), }, completed: session.answers.length >= questions.length, }, null, 2), }, ], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wenyili/mbti-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server