Skip to main content
Glama

check_image_status

Monitor the progress of AI image generation tasks by providing the task ID from generate_image to track completion status.

Instructions

Check the status of an image generation task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID returned from generate_image

Implementation Reference

  • MCP tool handler for 'check_image_status'. Retrieves image task status from KlingClient, formats detailed status text including URLs and dimensions if successful, and returns as text content.
    case 'check_image_status': {
      const status = await klingClient.getImageTaskStatus(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?.images) {
        statusText += '\n\nGenerated Images:';
        status.task_result.images.forEach((image: any, index: number) => {
          statusText += `\n\nImage ${index + 1}:`;
          statusText += `\n- URL: ${image.url}`;
          if (image.width && image.height) {
            statusText += `\n- Dimensions: ${image.width}x${image.height}`;
          }
        });
        statusText += '\n\nNote: Images will be cleared after 30 days for security.';
      }
      
      return {
        content: [
          {
            type: 'text',
            text: statusText,
          },
        ],
      };
    }
  • Tool schema definition including name, description, and input schema requiring 'task_id'.
      name: 'check_image_status',
      description: 'Check the status of an image generation task',
      inputSchema: {
        type: 'object',
        properties: {
          task_id: {
            type: 'string',
            description: 'The task ID returned from generate_image',
          },
        },
        required: ['task_id'],
      },
    },
  • Helper method in KlingClient that makes the API GET request to check image generation task status and handles errors.
    async getImageTaskStatus(taskId: string): Promise<any> {
      const path = `/v1/image/generation/${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;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool checks status but reveals nothing about what statuses exist, whether it polls or returns immediately, error conditions, or response format. This leaves significant gaps for a status-checking operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a simple tool with one parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a status-checking tool with no annotations and no output schema, the description is insufficient. It doesn't explain what status information is returned, possible states (e.g., pending, completed, failed), or how to interpret results. The context demands more completeness than provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'task_id' well-documented in the schema as 'The task ID returned from generate_image'. The description adds no additional parameter semantics beyond what the schema already provides, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('check') and resource ('status of an image generation task'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'check_video_status' or 'list_tasks', but the specificity to 'image generation task' provides reasonable distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., requiring a task_id from generate_image), when-not scenarios, or relationships with sibling tools like list_tasks for broader status checking.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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