Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
agentsNo
session_idNo
text_messageYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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"}
  • 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"]
Behavior2/5

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

With no annotations provided, the description carries full burden but offers limited behavioral insight. It mentions using 'defaults and contextual information if explicit parameters are not provided' and session_id continuity, but doesn't cover critical aspects like authentication needs, rate limits, error handling, or what 'orchestrates' entails operationally. The description doesn't contradict annotations (none exist), but it's insufficient for a tool with such broad capabilities.

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

Conciseness2/5

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

The description is overly verbose and poorly structured, with a long bulleted list of examples that could be summarized. It front-loads core purpose but buries important session_id instructions at the end. Many sentences (e.g., detailed task examples) don't earn their place for tool selection, making it inefficient for an AI agent.

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

Completeness2/5

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

Given the tool's complexity (broad multimedia orchestration), 3 parameters with 0% schema coverage, no annotations, and an output schema (which reduces need for return value explanation), the description is incomplete. It lists capabilities but lacks operational context, parameter guidance, and behavioral transparency needed for effective tool use, leaving major gaps despite the output schema.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate but adds minimal parameter semantics. It vaguely references 'queries' and 'contextual defaults,' but doesn't explain the three parameters (agents, session_id, text_message) or their relationships. The IMPORTANT notes about session_id provide some usage context but not parameter meaning. With 3 parameters undocumented in both schema and description, this is a significant gap.

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 that the tool 'orchestrates specialized agents within the VideoDB server' to 'handle multimedia and video-related queries' through delegation. It specifies the verb (orchestrate/delegate) and resource (VideoDB agents), though it doesn't explicitly differentiate from sibling tools like code_assistant or doc_assistant beyond the multimedia focus.

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

Usage Guidelines3/5

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

The description implies usage by stating clients should send 'queries that Director can interpret clearly' and 'aligned with Director's capabilities,' with examples of supported tasks. However, it lacks explicit guidance on when to use this tool versus alternatives like play_video, and doesn't mention prerequisites or exclusions beyond query clarity.

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

Related 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/video-db/agent-toolkit'

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