Skip to main content
Glama

zapcap_mcp_monitor_task

Monitor video processing task progress in the ZapCap API by tracking video and task IDs to check completion status.

Instructions

Monitor task progress

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Implementation Reference

  • The handler function decorated with @mcp.tool that implements the logic to monitor the task progress by making a GET request to the ZapCap API using the provided video_id and task_id.
    @mcp.tool(description="Monitor task progress") def zapcap_mcp_monitor_task(request: MonitorTask) -> Dict[str, Any]: headers = {"x-api-key": get_api_key()} with httpx.Client() as client: response = client.get( f"https://api.zapcap.ai/videos/{request.video_id}/task/{request.task_id}", headers=headers ) response.raise_for_status() return response.json()
  • Pydantic BaseModel defining the input parameters for the zapcap_mcp_monitor_task tool: video_id and task_id.
    class MonitorTask(BaseModel): video_id: str = Field(description="Video ID") task_id: str = Field(description="Task ID")
  • Helper function to retrieve and validate the ZAPCAP_API_KEY from environment variables, used by the tool handler.
    def get_api_key() -> str: api_key = os.getenv("ZAPCAP_API_KEY") if not api_key: raise ValueError("ZAPCAP_API_KEY environment variable is required") return api_key

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/bogdanminko/zapcap-mcp-server'

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