Skip to main content
Glama

veo_get_task

Check the status of a video generation task and retrieve the resulting video URLs and metadata once complete.

Instructions

Query the status and result of a video generation task.

Use this to check if a generation is complete and retrieve the resulting
video URLs and metadata.

Use this when:
- You want to check if a generation has completed
- You need to retrieve video URLs from a previous generation
- You want to get the full details of a generated video

Task states:
- 'processing': Generation is still in progress
- 'succeeded': Generation finished successfully
- 'failed': Generation failed (check error message)

Returns:
    Task status and generated video information including URLs and state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID returned from a generation request. This is the 'task_id' field from any veo_text_to_video, veo_image_to_video, or veo_get_1080p tool response.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the veo_get_task tool. Queries a video generation task by ID via client.query_task, throttles polling with 5s sleep if incomplete, and formats the result.
    async def veo_get_task(
        task_id: Annotated[
            str,
            Field(
                description="The task ID returned from a generation request. This is the 'task_id' field from any veo_text_to_video, veo_image_to_video, or veo_get_1080p tool response."
            ),
        ],
    ) -> str:
        """Query the status and result of a video generation task.
    
        Use this to check if a generation is complete and retrieve the resulting
        video URLs and metadata.
    
        Use this when:
        - You want to check if a generation has completed
        - You need to retrieve video URLs from a previous generation
        - You want to get the full details of a generated video
    
        Task states:
        - 'processing': Generation is still in progress
        - 'succeeded': Generation finished successfully
        - 'failed': Generation failed (check error message)
    
        Returns:
            Task status and generated video information including URLs and state.
        """
        result = await client.query_task(
            id=task_id,
            action="retrieve",
        )
        # Throttle polling: sleep 5s for incomplete tasks so LLM clients
        # don't burn through poll attempts in seconds.
        response = result.get("response", {})
        is_complete = response.get("success", False)
        if not is_complete:
            await asyncio.sleep(5)
        return format_task_result(result)
  • Input schema using Pydantic's Field and Annotated to define the task_id parameter.
    async def veo_get_task(
        task_id: Annotated[
            str,
            Field(
                description="The task ID returned from a generation request. This is the 'task_id' field from any veo_text_to_video, veo_image_to_video, or veo_get_1080p tool response."
            ),
        ],
    ) -> str:
  • Registration of veo_get_task via the @mcp.tool() decorator, making it available as an MCP tool.
    @mcp.tool()
    async def veo_get_task(
        task_id: Annotated[
            str,
            Field(
                description="The task ID returned from a generation request. This is the 'task_id' field from any veo_text_to_video, veo_image_to_video, or veo_get_1080p tool response."
            ),
        ],
    ) -> str:
        """Query the status and result of a video generation task.
    
        Use this to check if a generation is complete and retrieve the resulting
        video URLs and metadata.
    
        Use this when:
        - You want to check if a generation has completed
        - You need to retrieve video URLs from a previous generation
        - You want to get the full details of a generated video
    
        Task states:
        - 'processing': Generation is still in progress
        - 'succeeded': Generation finished successfully
        - 'failed': Generation failed (check error message)
    
        Returns:
            Task status and generated video information including URLs and state.
        """
        result = await client.query_task(
            id=task_id,
            action="retrieve",
        )
        # Throttle polling: sleep 5s for incomplete tasks so LLM clients
        # don't burn through poll attempts in seconds.
        response = result.get("response", {})
        is_complete = response.get("success", False)
        if not is_complete:
            await asyncio.sleep(5)
        return format_task_result(result)
  • Helper function used by veo_get_task to format the result as JSON with polling guidance metadata.
    def format_task_result(data: dict[str, Any]) -> str:
        """Format task query result as JSON.
    
        Args:
            data: API response dictionary
    
        Returns:
            JSON string representation of the result
        """
        return json.dumps(
            _with_task_guidance(data, "veo_get_task", "veo_get_tasks_batch"),
            ensure_ascii=False,
            indent=2,
        )
  • The HTTP client method that sends the task query request to the /veo/tasks endpoint.
        async def query_task(self, **kwargs: Any) -> dict[str, Any]:
            """Query task status using the tasks endpoint."""
            task_id = kwargs.get("id") or kwargs.get("ids", [])
            logger.info(f"🔍 Querying task(s): {task_id}")
            return await self.request("/veo/tasks", kwargs)
    
    
    # Global client instance
    client = VeoClient()
Behavior3/5

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

Discloses task states and return content, which is helpful. Since annotations are absent, the description carries full burden but omits details like whether the operation is read-only, rate limits, or error behavior beyond stating 'failed' state.

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

Conciseness4/5

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

The description is structured with sections and bullet points, making it scannable. While not extremely concise, every sentence adds meaningful information without redundancy.

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

Completeness4/5

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

Given the tool's simplicity (single parameter, polling behavior) and the presence of an output schema, the description sufficiently covers usage scenarios, task states, and return types. Minor gaps like error handling or idempotency are acceptable for this complexity level.

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

Parameters4/5

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

Schema coverage is 100% with one parameter. The description adds value by explaining that task_id comes from previous generation requests and listing exact source tools, which is beyond the schema's description.

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 it queries status/result of a video generation task and lists specific use cases. It implicitly differentiates from siblings like veo_get_tasks_batch by focusing on a single task, but does not explicitly contrast with sibling tools.

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

Usage Guidelines4/5

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

Provides explicit bullet points on when to use, covering three common scenarios. However, it lacks guidance on when not to use (e.g., for batch queries) or alternatives among siblings.

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/AceDataCloud/VeoMCP'

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