Skip to main content
Glama

check_video_status

Verify the progress and status of a video generation task initiated via MCP Kling using a specific task ID, ensuring real-time tracking of AI-powered video creation.

Instructions

Check the status of a video generation task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID returned from generate_video or generate_image_to_video

Implementation Reference

  • Handler for the 'check_video_status' tool: retrieves task status using KlingClient, formats detailed status text including video details if successful.
    case 'check_video_status': { const status = await klingClient.getTaskStatus(args.task_id as string); let statusText = `Task ID: ${status.task_id}\nStatus: ${status.task_status}`; if (status.task_status_msg) { statusText += `\nMessage: ${status.task_status_msg}`; } if (status.task_status === 'succeed' && status.task_result?.videos) { statusText += '\n\nGenerated Videos:'; status.task_result.videos.forEach((video, index) => { statusText += `\n\nVideo ${index + 1}:`; statusText += `\n- URL: ${video.url}`; statusText += `\n- Duration: ${video.duration}`; statusText += `\n- Aspect Ratio: ${video.aspect_ratio}`; }); statusText += '\n\nNote: Videos will be cleared after 30 days for security.'; } return { content: [ { type: 'text', text: statusText, }, ], }; }
  • Input schema for 'check_video_status' tool requiring a 'task_id' string parameter.
    { name: 'check_video_status', description: 'Check the status of a video generation task', inputSchema: { type: 'object', properties: { task_id: { type: 'string', description: 'The task ID returned from generate_video or generate_image_to_video', }, }, required: ['task_id'], }, },
  • Helper method in KlingClient that fetches video task status from Kling AI API endpoint.
    async getTaskStatus(taskId: string): Promise<TaskStatus> { const path = `/v1/videos/text2video/${taskId}`; try { const response = await this.axiosInstance.get(path); return response.data.data; } catch (error) { if (axios.isAxiosError(error)) { throw new Error(`Kling API error: ${error.response?.data?.message || error.message}`); } throw error; } }

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/199-mcp/mcp-kling'

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