Skip to main content
Glama

check_response_status

Monitor the progress of AI-generated response tasks to track completion status and retrieve results when ready.

Instructions

Check the status of a response generation task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesThe task ID returned by generate_response

Implementation Reference

  • Handler for 'check_response_status' tool: validates input, retrieves task status from activeTasks Map, and returns formatted status JSON.
    } else if (request.params.name === 'check_response_status') { if (!isValidCheckResponseStatusArgs(request.params.arguments)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid check_response_status arguments' ); } const taskId = request.params.arguments.taskId; const task = this.activeTasks.get(taskId); if (!task) { throw new McpError( ErrorCode.InvalidRequest, `No task found with ID: ${taskId}` ); } return { content: [ { type: 'text', text: JSON.stringify({ status: task.status, reasoning: task.showReasoning ? task.reasoning : undefined, response: task.status === 'complete' ? task.response : undefined, error: task.error }) } ] };
  • src/index.ts:271-284 (registration)
    Registration of the 'check_response_status' tool in the ListTools handler, including name, description, and input schema.
    { name: 'check_response_status', description: 'Check the status of a response generation task', inputSchema: { type: 'object', properties: { taskId: { type: 'string', description: 'The task ID returned by generate_response' } }, required: ['taskId'] } }
  • TypeScript interface defining the expected input shape for check_response_status arguments.
    interface CheckResponseStatusArgs { taskId: string; }
  • Runtime validator function for CheckResponseStatusArgs type.
    const isValidCheckResponseStatusArgs = (args: any): args is CheckResponseStatusArgs => typeof args === 'object' && args !== null && typeof args.taskId === 'string';
  • Interface defining the structure of task status objects stored in activeTasks Map, used by the handler.
    interface TaskStatus { status: 'pending' | 'reasoning' | 'responding' | 'complete' | 'error'; prompt: string; showReasoning?: boolean; reasoning?: string; response?: string; error?: string; timestamp: number; }
Install Server

Other Tools

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/newideas99/Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP'

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