├── .github
└── workflows
│ ├── jekyll-gh-pages.yml
│ ├── mcp_release.yml
│ ├── update_docs_context.yml
│ ├── update_examples_context.yml
│ ├── update_master_context.yml
│ └── update_sdk_context.yml
├── .gitignore
├── .python-version
├── README.md
├── config.yaml
├── context
├── __init__.py
├── count_tokens.py
├── docs
│ ├── crawl_coda_tree.py
│ ├── doc_tree.json
│ ├── docs_context.md
│ ├── fragments
│ │ ├── advanced_visual_search_pipelines_82.txt
│ │ ├── callback_details_66.txt
│ │ ├── collections_68.txt
│ │ ├── custom_annotations_81.txt
│ │ ├── deep_dive_into_prompt_engineering_mastering_video_scene_indexing_93.txt
│ │ ├── guide_subtitles_73.txt
│ │ ├── how_accurate_is_your_search_88.txt
│ │ ├── index.txt
│ │ ├── language_support_79.txt
│ │ ├── playground_for_scene_extractions_83.txt
│ │ ├── public_collections_102.txt
│ │ ├── quick_start_guide_38.txt
│ │ ├── ref_subtitle_styles_57.txt
│ │ ├── scene_extraction_algorithms_84.txt
│ │ ├── scene_level_metadata_smarter_video_search_retrieval_107.txt
│ │ ├── semantic_search_89.txt
│ │ └── video_indexing_guide_101.txt
│ └── process_docs.py
├── examples
│ ├── __init__.py
│ ├── examples_context.md
│ ├── fragments
│ │ ├── Cleanup.txt
│ │ ├── Multimodal_Quickstart.txt
│ │ ├── Scene_Index_QuickStart.txt
│ │ ├── Subtitle.txt
│ │ ├── TextAsset.txt
│ │ ├── VideoDB_Quickstart.txt
│ │ └── scene_level_metadata_indexing.txt
│ └── process_examples.py
├── instructions
│ └── prompt.md
├── llms-full.md
├── llms-full.txt
├── llms.md
├── llms.txt
├── merge_llms_full_txt.py
├── merge_llms_txt.py
├── prompts
│ ├── custom_1.txt
│ ├── custom_2.txt
│ ├── default_docs.txt
│ ├── default_ipynb.txt
│ ├── refine_docs.txt
│ └── refine_ipynb.txt
├── sdk
│ ├── context
│ │ └── index.md
│ └── sphinx_config
│ │ ├── conf.py
│ │ └── index.rst
└── utils.py
├── modelcontextprotocol
├── .python-version
├── Dockerfile
├── README.md
├── pyproject.toml
├── smithery.yaml
├── uv.lock
└── videodb_director_mcp
│ ├── __init__.py
│ ├── cli_commands.py
│ ├── constants.py
│ └── main.py
├── pyproject.toml
├── readme_shields.json
├── token_breakdown.png
└── uv.lock
/.github/workflows/jekyll-gh-pages.yml:
--------------------------------------------------------------------------------
1 | # Sample workflow for building and deploying a Jekyll site to GitHub Pages
2 | name: Deploy Jekyll with GitHub Pages dependencies preinstalled
3 |
4 | on:
5 | # Runs on pushes targeting the default branch
6 | push:
7 | branches: ["main"]
8 |
9 | # Allows you to run this workflow manually from the Actions tab
10 | workflow_dispatch:
11 |
12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13 | permissions:
14 | contents: read
15 | pages: write
16 | id-token: write
17 |
18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20 | concurrency:
21 | group: "pages"
22 | cancel-in-progress: true
23 |
24 | jobs:
25 | # Build job
26 | build:
27 | runs-on: ubuntu-latest
28 | steps:
29 | - name: Checkout
30 | uses: actions/checkout@v4
31 | - name: Setup Pages
32 | uses: actions/configure-pages@v5
33 | - name: Build with Jekyll
34 | uses: actions/jekyll-build-pages@v1
35 | with:
36 | source: ./
37 | destination: ./_site
38 | - name: Upload artifact
39 | uses: actions/upload-pages-artifact@v3
40 |
41 | # Deployment job
42 | deploy:
43 | environment:
44 | name: github-pages
45 | url: ${{ steps.deployment.outputs.page_url }}
46 | runs-on: ubuntu-latest
47 | needs: build
48 | steps:
49 | - name: Deploy to GitHub Pages
50 | id: deployment
51 | uses: actions/deploy-pages@v4
52 |
--------------------------------------------------------------------------------
/.github/workflows/mcp_release.yml:
--------------------------------------------------------------------------------
1 | name: MCP Release
2 |
3 | on:
4 | workflow_dispatch: {}
5 |
6 | jobs:
7 | python-build:
8 | name: Build for PyPi
9 | runs-on: ubuntu-latest
10 | environment: pypi
11 |
12 | defaults:
13 | run:
14 | working-directory: ./modelcontextprotocol
15 | steps:
16 | - name: Checkout
17 | uses: actions/checkout@v4
18 |
19 | - name: Set up Python
20 | uses: actions/setup-python@v4
21 | with:
22 | python-version: "3.12"
23 |
24 | - name: Install dependencies
25 | run: |
26 | python -m venv venv
27 | source venv/bin/activate
28 | python -m pip install --upgrade pip build twine
29 |
30 | - name: Build package
31 | run: |
32 | source venv/bin/activate
33 | rm -rf build dist *.egg-info
34 | python -m build
35 | python -m twine check dist/*
36 |
37 | - name: Upload artifact
38 | uses: actions/upload-artifact@v4
39 | with:
40 | name: release-dists
41 | path: ./modelcontextprotocol/dist/
42 |
43 | python-release:
44 | name: Publish to PyPi
45 | runs-on: ubuntu-latest
46 | environment: pypi
47 | needs:
48 | - python-build
49 |
50 | defaults:
51 | run:
52 | working-directory: ./modelcontextprotocol
53 |
54 | permissions:
55 | id-token: write
56 |
57 | steps:
58 | - name: Retrieve distribution
59 | uses: actions/download-artifact@v4
60 | with:
61 | name: release-dists
62 | path: dist/
63 |
64 | - name: Publish package distributions to PyPI
65 | uses: pypa/gh-action-pypi-publish@release/v1
66 |
--------------------------------------------------------------------------------
/.github/workflows/update_docs_context.yml:
--------------------------------------------------------------------------------
1 | name: Update Docs Context
2 |
3 | on:
4 | workflow_dispatch: # Manually triggered via GitHub Actions UI
5 |
6 | jobs:
7 | scrape-doc-tree:
8 | runs-on: ubuntu-latest
9 |
10 | permissions:
11 | contents: write
12 |
13 | steps:
14 | - name: Checkout Repository
15 | uses: actions/checkout@v4
16 |
17 | - name: Install yq
18 | run: |
19 | sudo apt-get update
20 | sudo apt-get install -y yq
21 |
22 | - name: Parse Config for Doc Tree Scraper
23 | id: config
24 | run: |
25 | SCRIPT=$(yq '.docs_context.doc_tree.scrape_config.script' config.yaml)
26 | OUTPUT=$(yq '.docs_context.doc_tree.scrape_config.output' config.yaml)
27 | URL=$(yq '.docs_context.doc_tree.scrape_config.url' config.yaml)
28 | SELECTOR=$(yq '.docs_context.doc_tree.scrape_config.selector' config.yaml)
29 | SELECTOR_VALUE=$(yq '.docs_context.doc_tree.scrape_config.selector_value' config.yaml)
30 | echo "script=$SCRIPT" >> $GITHUB_OUTPUT
31 | echo "output=$OUTPUT" >> $GITHUB_OUTPUT
32 | echo "url=$URL" >> $GITHUB_OUTPUT
33 | echo "selector=$SELECTOR" >> $GITHUB_OUTPUT
34 | echo "selector_value=$SELECTOR_VALUE" >> $GITHUB_OUTPUT
35 |
36 | - name: Set up Python
37 | uses: actions/setup-python@v4
38 | with:
39 | python-version: "3.9"
40 |
41 | - name: Create Virtual Environment and Install Dependencies
42 | run: |
43 | python -m venv venv
44 | source venv/bin/activate
45 | pip install --upgrade pip
46 | # Install dependencies from your pyproject.toml (assumed at repo root)
47 | pip install .
48 |
49 | - name: Run Doc Tree Scraper
50 | run: |
51 | source venv/bin/activate
52 | python ${{ steps.config.outputs.script }} ${{ steps.config.outputs.output }} \
53 | --url ${{ steps.config.outputs.url }} \
54 | --selector ${{ steps.config.outputs.selector }} \
55 | --selector-value ${{ steps.config.outputs.selector_value }}
56 |
57 | - name: Commit and Push Doc Tree
58 | run: |
59 | git config --global user.name "github-actions[bot]"
60 | git config --global user.email "github-actions[bot]@users.noreply.github.com"
61 | # Add the output file specified in config.yaml.
62 | git add .
63 | git commit -m "Update doc tree with latest changes" || echo "No changes to commit."
64 | git push
65 |
66 | build-docs-context:
67 | needs: scrape-doc-tree
68 | runs-on: ubuntu-latest
69 | permissions:
70 | contents: write
71 | pull-requests: write
72 | env:
73 | PROJECT_ID: ${{ secrets.PROJECT_ID }}
74 | GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
75 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
76 | FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }}
77 |
78 | steps:
79 | - name: Checkout This Repo
80 | uses: actions/checkout@v4
81 |
82 | - name: Install yq
83 | run: |
84 | sudo apt-get update
85 | sudo apt-get install -y yq
86 |
87 | - name: Parse Configuration
88 | id: parse_config
89 | run: |
90 | # Read from config.yaml (examples_context) with fallback defaults
91 | CLONE_URL=$(yq '.docs_context.clone_url // "https://github.com/your-username/your-notebook-repo"' config.yaml)
92 | CLONE_DIR=$(yq '.docs_context.clone_dir // "examples_source"' config.yaml)
93 | SCRIPT_PATH=$(yq '.docs_context.script_path // "context_examples/process_examples.py"' config.yaml)
94 | BRANCH_NAME=$(yq '.docs_context.branch_name // "examples-md-update"' config.yaml)
95 | COMMIT_MESSAGE=$(yq '.docs_context.commit_message // "Add combined Markdown output for examples context"' config.yaml)
96 | OUTPUT_FILE=$(yq '.docs_context.output_file' config.yaml)
97 | OUTPUT_FRAGMENTS=$(yq '.docs_context.output_fragments' config.yaml)
98 |
99 |
100 | echo "clone_url=$CLONE_URL" >> $GITHUB_OUTPUT
101 | echo "clone_dir=$CLONE_DIR" >> $GITHUB_OUTPUT
102 | echo "script_path=$SCRIPT_PATH" >> $GITHUB_OUTPUT
103 | echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
104 | echo "commit_message=$COMMIT_MESSAGE" >> $GITHUB_OUTPUT
105 | echo "output_file=$OUTPUT_FILE" >> $GITHUB_OUTPUT
106 | echo "output_fragments=$OUTPUT_FRAGMENTS" >> $GITHUB_OUTPUT
107 |
108 | - name: Set up Python
109 | uses: actions/setup-python@v4
110 | with:
111 | python-version: "3.9"
112 |
113 | - name: Create Virtual Environment
114 | run: |
115 | python -m venv venv
116 | source venv/bin/activate
117 | pip install --upgrade pip
118 |
119 | - name: Install Dependencies Using pyproject.toml
120 | run: |
121 | source venv/bin/activate
122 | # Installs dependencies as specified in your pyproject.toml (assumed to be at repo root)
123 | pip install .
124 |
125 | - name: Run Docs Processing
126 | run: |
127 | source venv/bin/activate
128 | export PYTHONPATH=$PYTHONPATH:$(pwd)
129 | python ${{ steps.parse_config.outputs.script_path }}
130 |
131 | - name: Remove Cloned Repository
132 | run: rm -rf ${{ steps.parse_config.outputs.clone_dir }}
133 |
134 | - name: Commit and Push Combined MD
135 | run: |
136 | git config --global user.name "github-actions[bot]"
137 | git config --global user.email "github-actions[bot]@users.noreply.github.com"
138 | git checkout -b ${{ steps.parse_config.outputs.branch_name }}
139 | git add ${{ steps.parse_config.outputs.output_file}}
140 | git add ${{ steps.parse_config.outputs.output_fragments }}
141 | git commit -m ${{ steps.parse_config.outputs.commit_message }}
142 | git push --force --set-upstream origin ${{ steps.parse_config.outputs.branch_name }}
143 |
144 | - name: Create Pull Request
145 | run: |
146 | gh pr create \
147 | --base main \
148 | --head ${{ steps.parse_config.outputs.branch_name }} \
149 | --title ${{ steps.parse_config.outputs.commit_message }} \
150 | --body "This PR adds the simplified Markdown output from the example notebooks." || true
151 | env:
152 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153 |
--------------------------------------------------------------------------------
/.github/workflows/update_examples_context.yml:
--------------------------------------------------------------------------------
1 | name: Update Examples Context
2 |
3 | on:
4 | workflow_dispatch: # Manually triggered via GitHub Actions UI
5 | repository_dispatch:
6 | types: [examples-context-update]
7 |
8 | permissions:
9 | contents: write
10 | pull-requests: write
11 |
12 | jobs:
13 | build-examples:
14 | runs-on: ubuntu-latest
15 |
16 |
17 | env:
18 | PROJECT_ID: ${{ secrets.PROJECT_ID }}
19 | GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
20 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
21 |
22 | steps:
23 | - name: Checkout This Repo
24 | uses: actions/checkout@v4
25 |
26 | - name: Install yq
27 | run: |
28 | sudo apt-get update
29 | sudo apt-get install -y yq
30 |
31 | - name: Parse Configuration
32 | id: parse_config
33 | run: |
34 | # Read from config.yaml (examples_context) with fallback defaults
35 | CLONE_URL=$(yq '.examples_context.clone_url // "https://github.com/your-username/your-notebook-repo"' config.yaml)
36 | CLONE_DIR=$(yq '.examples_context.clone_dir // "examples_source"' config.yaml)
37 | SCRIPT_PATH=$(yq '.examples_context.script_path // "context_examples/process_examples.py"' config.yaml)
38 | BRANCH_NAME=$(yq '.examples_context.branch_name // "examples-md-update"' config.yaml)
39 | COMMIT_MESSAGE=$(yq '.examples_context.commit_message // "Add combined Markdown output for examples context"' config.yaml)
40 | OUTPUT_FILE=$(yq '.examples_context.output_file // "videodb_helper/context_examples/context/index_ipynb.md"' config.yaml)
41 | OUTPUT_FRAGMENTS=$(yq '.examples_context.output_fragments' config.yaml)
42 |
43 |
44 | echo "clone_url=$CLONE_URL" >> $GITHUB_OUTPUT
45 | echo "clone_dir=$CLONE_DIR" >> $GITHUB_OUTPUT
46 | echo "script_path=$SCRIPT_PATH" >> $GITHUB_OUTPUT
47 | echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
48 | echo "commit_message=$COMMIT_MESSAGE" >> $GITHUB_OUTPUT
49 | echo "output_file=$OUTPUT_FILE" >> $GITHUB_OUTPUT
50 | echo "output_fragments=$OUTPUT_FRAGMENTS" >> $GITHUB_OUTPUT
51 |
52 | - name: Clone Examples Repo
53 | run: git clone ${{ steps.parse_config.outputs.clone_url }} ${{ steps.parse_config.outputs.clone_dir }}
54 |
55 | - name: Set up Python
56 | uses: actions/setup-python@v4
57 | with:
58 | python-version: "3.9"
59 |
60 | - name: Create Virtual Environment
61 | run: |
62 | python -m venv venv
63 | source venv/bin/activate
64 | pip install --upgrade pip
65 |
66 | - name: Install Dependencies Using pyproject.toml
67 | run: |
68 | source venv/bin/activate
69 | # Installs dependencies as specified in your pyproject.toml (assumed to be at repo root)
70 | pip install .
71 |
72 | - name: Run Examples Processing
73 | run: |
74 | source venv/bin/activate
75 | export PYTHONPATH=$PYTHONPATH:$(pwd)
76 | python ${{ steps.parse_config.outputs.script_path }}
77 |
78 | - name: Remove Cloned Repository
79 | run: rm -rf ${{ steps.parse_config.outputs.clone_dir }}
80 |
81 | - name: Commit and Push Combined MD
82 | run: |
83 | git config --global user.name "github-actions[bot]"
84 | git config --global user.email "github-actions[bot]@users.noreply.github.com"
85 | git checkout -b ${{ steps.parse_config.outputs.branch_name }}
86 | git add ${{ steps.parse_config.outputs.output_file }}
87 | git add ${{ steps.parse_config.outputs.output_fragments }}
88 | git commit -m ${{ steps.parse_config.outputs.commit_message }}
89 | git push --force --set-upstream origin ${{ steps.parse_config.outputs.branch_name }}
90 |
91 | - name: Create Pull Request
92 | run: |
93 | gh pr create \
94 | --base main \
95 | --head ${{ steps.parse_config.outputs.branch_name }} \
96 | --title ${{ steps.parse_config.outputs.commit_message }} \
97 | --body "This PR adds the simplified Markdown output from the example notebooks." || true
98 | env:
99 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100 |
--------------------------------------------------------------------------------
/.github/workflows/update_master_context.yml:
--------------------------------------------------------------------------------
1 | name: Update Master Markdown File and Tag
2 |
3 | on:
4 | push:
5 | # Trigger when any markdown file is changed (adjust paths as needed)
6 | paths:
7 | - "**/*.md"
8 | workflow_dispatch:
9 |
10 | jobs:
11 | update-master:
12 | runs-on: ubuntu-latest
13 |
14 | permissions:
15 | contents: write
16 |
17 | steps:
18 | - name: Checkout Repository
19 | uses: actions/checkout@v4
20 |
21 | - name: Install yq
22 | run: |
23 | sudo apt-get update
24 | sudo apt-get install -y yq
25 |
26 | - name: Parse Configuration
27 | id: parse_config
28 | run: |
29 | MERGE_SCRIPT_PATH=$(yq '.llms_full_txt_file.merge_script_path // "context_examples/process_examples.py"' config.yaml)
30 | COUNT_TOKENS_SCRIPT_PATH=$(yq '.token_count.script_path // "context_examples/process_examples.py"' config.yaml)
31 |
32 | echo "merge_script_path=$MERGE_SCRIPT_PATH" >> $GITHUB_OUTPUT
33 | echo "count_tokens_script_path=$COUNT_TOKENS_SCRIPT_PATH" >> $GITHUB_OUTPUT
34 |
35 | - name: Set up Python
36 | uses: actions/setup-python@v4
37 | with:
38 | python-version: "3.9"
39 |
40 | - name: Create Virtual Environment and Install Dependencies
41 | run: |
42 | python -m venv venv
43 | source venv/bin/activate
44 | pip install --upgrade pip
45 | pip install .
46 |
47 | - name: Run Master File Generation Script
48 | run: |
49 | source venv/bin/activate
50 | export PYTHONPATH=$PYTHONPATH:$(pwd)
51 | python ${{ steps.parse_config.outputs.merge_script_path}}
52 | python ${{ steps.parse_config.outputs.count_tokens_script_path }}
53 |
54 | - name: Commit and Push Master File
55 | run: |
56 | git config --global user.name "github-actions[bot]"
57 | git config --global user.email "github-actions[bot]@users.noreply.github.com"
58 | # Add the output file specified in config.yaml.
59 | git add .
60 | git commit -m "Update master file with latest changes" || echo "No changes to commit."
61 | git push
62 |
63 | - name: Create New Tag (Minor Version Bump)
64 | run: |
65 | # Fetch all tags
66 | git fetch --tags
67 |
68 | # List all tags that match v
9 |
10 |
16 | AI Agent toolkit for VideoDB
17 |
8 |
11 |
12 |
13 |
VideoDB Agent Toolkit
14 |
15 |
18 | llms.txt >>
19 | llms-full.txt
20 | MCP
21 |
22 |