Skip to main content
Glama
vincenthopf

Gemini Web Automation MCP

by vincenthopf

check_web_task

Monitor the status and progress of background web automation tasks initiated through Gemini Web Automation MCP. Retrieve task summaries or detailed progress reports to track completion, results, or errors.

Instructions

Check progress of a background web browsing task.

Returns a summary of task progress. By default, returns compact format to
avoid filling your context window with verbose progress logs.

IMPORTANT: To prevent context bloat, wait at least 3-5 seconds between
checks. Use the 'recommended_poll_after' timestamp as guidance.

Args:
    task_id: Task ID from start_web_task()
    compact: Return summary only (default: True). Set to False for full details.

Returns:
    Dictionary containing:
    - ok: Boolean indicating success
    - task_id: Task identifier
    - status: "pending", "running", "completed", "failed", or "cancelled"
    - progress_summary: Recent actions (compact mode only)
    - progress: Full action history (full mode only)
    - result: Task results (when completed)
    - error: Error message (when failed)
    - recommended_poll_after: Timestamp to check again (when running)
    - polling_guidance: Message about polling frequency

Examples:
    - check_web_task("abc-123-def")  # Compact summary
    - check_web_task("abc-123-def", compact=False)  # Full details

Best Practice:
    Only poll every 3-5 seconds to keep your context window clean.
    Use the wait() tool to pause between checks if your platform doesn't
    support automatic delays.

Recommended workflow:
    1. start_web_task("...")
    2. wait(5)
    3. check_web_task(task_id)
    4. If still running, repeat steps 2-3

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
compactNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function implementing the 'check_web_task' tool logic. It is registered via the @mcp.tool() decorator. Fetches task status from task_manager, handles not found cases, and adds polling guidance for running tasks.
    @mcp.tool()
    async def check_web_task(task_id: str, compact: bool = True) -> dict[str, Any]:
        """
        Check progress of a background web browsing task.
    
        Returns a summary of task progress. By default, returns compact format to
        avoid filling your context window with verbose progress logs.
    
        IMPORTANT: To prevent context bloat, wait at least 3-5 seconds between
        checks. Use the 'recommended_poll_after' timestamp as guidance.
    
        Args:
            task_id: Task ID from start_web_task()
            compact: Return summary only (default: True). Set to False for full details.
    
        Returns:
            Dictionary containing:
            - ok: Boolean indicating success
            - task_id: Task identifier
            - status: "pending", "running", "completed", "failed", or "cancelled"
            - progress_summary: Recent actions (compact mode only)
            - progress: Full action history (full mode only)
            - result: Task results (when completed)
            - error: Error message (when failed)
            - recommended_poll_after: Timestamp to check again (when running)
            - polling_guidance: Message about polling frequency
    
        Examples:
            - check_web_task("abc-123-def")  # Compact summary
            - check_web_task("abc-123-def", compact=False)  # Full details
    
        Best Practice:
            Only poll every 3-5 seconds to keep your context window clean.
            Use the wait() tool to pause between checks if your platform doesn't
            support automatic delays.
    
        Recommended workflow:
            1. start_web_task("...")
            2. wait(5)
            3. check_web_task(task_id)
            4. If still running, repeat steps 2-3
        """
        logger.info(f"Checking status for task: {task_id}")
    
        status = task_manager.get_task_status(task_id, compact=compact)
    
        if not status:
            return {
                "ok": False,
                "error": f"Task {task_id} not found"
            }
    
        # Add poll delay guidance for running tasks
        from datetime import datetime, timedelta, timezone
    
        result = {
            "ok": True,
            **status
        }
    
        if status.get("status") == "running":
            next_check = datetime.now(timezone.utc) + timedelta(seconds=5)
            result["recommended_poll_after"] = next_check.isoformat()
            result["polling_guidance"] = "Task in progress. Wait 5 seconds before next check to avoid context bloat."
    
        return result
  • server.py:202-202 (registration)
    The @mcp.tool() decorator registers the check_web_task function as an MCP tool.
    @mcp.tool()
  • Type hints and docstring define the input schema (task_id: str, compact: bool=True) and output schema (dict with status, progress, etc.).
    async def check_web_task(task_id: str, compact: bool = True) -> dict[str, Any]:
        """
        Check progress of a background web browsing task.
    
        Returns a summary of task progress. By default, returns compact format to
        avoid filling your context window with verbose progress logs.
    
        IMPORTANT: To prevent context bloat, wait at least 3-5 seconds between
        checks. Use the 'recommended_poll_after' timestamp as guidance.
    
        Args:
            task_id: Task ID from start_web_task()
            compact: Return summary only (default: True). Set to False for full details.
    
        Returns:
            Dictionary containing:
            - ok: Boolean indicating success
            - task_id: Task identifier
            - status: "pending", "running", "completed", "failed", or "cancelled"
            - progress_summary: Recent actions (compact mode only)
            - progress: Full action history (full mode only)
            - result: Task results (when completed)
            - error: Error message (when failed)
            - recommended_poll_after: Timestamp to check again (when running)
            - polling_guidance: Message about polling frequency
    
        Examples:
            - check_web_task("abc-123-def")  # Compact summary
            - check_web_task("abc-123-def", compact=False)  # Full details
    
        Best Practice:
            Only poll every 3-5 seconds to keep your context window clean.
            Use the wait() tool to pause between checks if your platform doesn't
            support automatic delays.
    
        Recommended workflow:
            1. start_web_task("...")
            2. wait(5)
            3. check_web_task(task_id)
            4. If still running, repeat steps 2-3
        """
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does so comprehensively. It explains the tool's polling behavior (3-5 second intervals), context management strategy (compact format to avoid bloat), return format variations based on parameters, and provides practical guidance about using the wait() tool for delays.

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 well-structured with clear sections (purpose, args, returns, examples, best practice, workflow) but could be slightly more concise. The 'Best Practice' and 'Recommended workflow' sections contain some redundancy about polling intervals. Every sentence adds value, but some information is repeated.

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

Completeness5/5

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

Given the tool's complexity (polling behavior, output variations) and the presence of an output schema, the description provides excellent contextual completeness. It explains the tool's role in the workflow, behavioral constraints, parameter effects, and practical usage patterns while appropriately deferring detailed return structure to the output schema.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining both parameters in detail. It clarifies that task_id comes from start_web_task(), and explains the compact parameter's effect on output format (summary vs full details) with clear examples showing both usage patterns.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('check progress', 'returns a summary') and distinguishes it from siblings by explicitly mentioning it works with tasks created by 'start_web_task()'. It identifies the exact resource being operated on (background web browsing tasks).

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool (after starting a task with start_web_task, with 3-5 second intervals between checks) and includes a complete recommended workflow. It also distinguishes this from other tools by showing its role in the task lifecycle.

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/vincenthopf/computer-use-mcp'

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