call_director
Orchestrates multimedia tasks in VideoDB, enabling video uploads, indexing, summarization, dubbing, video generation, transcription, meeting analysis, and more using specialized agents for optimized results.
Instructions
The Director tool orchestrates specialized agents within the VideoDB server, efficiently handling multimedia and video-related queries. Clients should send queries that Director can interpret clearly, specifying tasks in natural language. Director will then delegate these queries to appropriate agents for optimized results, utilizing defaults and contextual information if explicit parameters are not provided.
Director handles queries such as:
Uploading & Downloading:
Upload media from URLs or local paths (supported media: video, audio, image)
Download the VideoDB generated video streams.
Indexing & Search:
Index spoken words or scenes in videos (spoken_words, scene indexing; scene indexing supports shot or time-based type)
Search VideoDB collections semantically or by keyword (semantic, keyword search; indexing types: spoken_word, scene)
Summarization & Subtitles:
Summarize video content based on custom prompts
Add subtitles in various languages
Dubbing:
Dub videos into target languages
Creating Videos:
Generate videos using specific models or engines (Fal, StabilityAI; job types: text_to_video, image_to_video)
Compare multiple video generation models (video_generation_comparison)
Audio Generation & Editing:
Generate speech, sound effects, or background music (engines: ElevenLabs for speech/sound effects, Beatoven for music)
Clone voices from audio sources or overlay cloned voices onto videos
Censor the video on given prompt
Image and Frame Generation:
Generate static image frames from videos at specified timestamps
Create or enhance images using GenAI models (job types: text_to_image, image_to_image using Fal, Replicate)
Video Editing & Clip Generation:
Edit or combine multiple videos and audio files
Generate targeted video clips from user prompts
Streaming & Web Search:
Stream videos by video ID or URL
Search for relevant online videos (engine: Serp)
Transcription:
Generate transcripts for videos
Pricing & Usage Information:
Provide detailed cost information and usage estimates
Meeting Recording & Analysis:
Record meetings
Deploy recording bots to Zoom, Google Meet, or Microsoft Teams
Analyze recorded meetings for AI-driven insights
Intelligently index and summarize meetings
Clients should provide queries clearly aligned with Director's capabilities, allowing Director to use contextual defaults when explicit parameters like IDs or collection details are not specified.
IMPORTANT: if you have a previous response of this method with an appropriate session_id, please provide that session_id in the next request to continue the conversation.
IMPORTANT: It is MANDATORY to send the session_id param if any earlier response from this method exists with a session_id in its output
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agents | No | ||
| session_id | No | ||
| text_message | Yes |
Implementation Reference
- The core handler function for the 'call_director' tool. It uses SocketIO to connect to the VideoDB Director API, sends text messages with optional session_id and agents, and returns the response or error.@mcp.tool(name="call_director", description=DIRECTOR_CALL_DESCRIPTION) async def call_director( text_message: str, session_id: str | None = None, agents: list[str] = [] ) -> dict[str, Any]: """ Orchestrates specialized agents within the VideoDB server to efficiently handle multimedia and video-related queries. Args: text_message (str): The natural language query that Director will interpret and delegate to appropriate agents. session_id (str | None, optional): A session identifier to maintain continuity across multiple requests. If a previous response from this method included a `session_id`, it is MANDATORY to include it in subsequent requests. """ api_key = os.getenv("VIDEODB_API_KEY") if not api_key: raise RuntimeError( "Missing VIDEODB_API_KEY environment variable. Please set it before calling this function." ) url = DIRECTOR_API timeout = 300 headers = {"x-access-token": api_key} sio = socketio.Client() response_data = None response_event = threading.Event() def on_connect(): message = { "msg_type": "input", "sender": "user", "conv_id": str(int(time.time() * 1000)), "msg_id": str(int(time.time() * 1000) + 1), "session_id": session_id if session_id else str(uuid.uuid4()), "content": [{"type": "text", "text": text_message}], "agents": agents, "collection_id": "default", } sio.emit("chat", message, namespace="/chat") def on_message(data): nonlocal response_data if isinstance(data, dict) and data.get("status") != "progress": response_data = data response_event.set() sio.on("connect", on_connect, namespace="/chat") sio.on("chat", on_message, namespace="/chat") try: sio.connect( url, namespaces=["/", "/chat"], headers=headers, wait=True, wait_timeout=10, retry=True ) received = response_event.wait(timeout=timeout) except Exception as e: return {"error": f"Connection failed :( : {e}"} finally: sio.disconnect() return response_data if received else {"error": "Timeout waiting for response"}
- modelcontextprotocol/videodb_director_mcp/__init__.py:1-9 (registration)Re-exports the call_director function from main.py, making it available via __all__ for package imports.from videodb_director_mcp.main import ( call_director, play_video, code_assistant, doc_assistant, ) __all__ = ["call_director", "play_video", "code_assistant", "doc_assistant"]