zapcap_mcp_upload_video_by_url
Upload video files to ZapCap by providing a URL. This tool processes video uploads through the ZapCap API for subsequent tasks.
Instructions
Upload video by URL to ZapCap
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Implementation Reference
- src/zapcap_mcp_server/server.py:72-87 (handler)The handler function that implements the zapcap_mcp_upload_video_by_url tool. It sends a POST request to the ZapCap API with the provided URL to upload the video.def zapcap_mcp_upload_video_by_url(request: UploadVideoByUrl) -> Dict[str, Any]: headers = { "x-api-key": get_api_key(), "Content-Type": "application/json" } data = {"url": request.url} with httpx.Client() as client: response = client.post( "https://api.zapcap.ai/videos/url", headers=headers, json=data ) response.raise_for_status() return response.json()
- Pydantic BaseModel defining the input schema for the tool, which requires a 'url' field.class UploadVideoByUrl(BaseModel): url: str = Field(description="URL to video file")
- src/zapcap_mcp_server/server.py:71-71 (registration)The @mcp.tool decorator that registers the function as an MCP tool with its description.@mcp.tool(description="Upload video by URL to ZapCap")
- Helper function to retrieve the ZapCap API key from environment variable, used in 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