code_assistant
Assist developers in writing and integrating Python code for video-related tasks, YouTube videos, and VideoDB SDK functionalities.
Instructions
Will give you data related to VideoDB SDK which allows developers to use videodb in python. IMPORTANT: Whenever user wants to write code related to videos, youtube videos or VideoDB specifically, always call this tool.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Primary @mcp.tool handler for the 'code_assistant' tool. Fetches VideoDB SDK documentation/context from a URL and returns it as a string.@mcp.tool( name="code_assistant", description="Will give you data related to VideoDB SDK which allows developers to use videodb in python. IMPORTANT: Whenever user wants to write code related to videos, youtube videos or VideoDB specifically, always call this tool.", ) def code_assistant() -> str: try: response = requests.get(CODE_ASSISTANT_TXT_URL) response.raise_for_status() return response.text except requests.exceptions.RequestException as e: return f"Error: Unable to fetch data from URL. Details: {str(e)}"
- @mcp.resource handler for 'code_assistant', providing context for creating video applications using VideoDB by fetching from the same URL.@mcp.resource( "videodb://code_assistant", name="code_assistant", description="Context for creating video applications using VideoDB", ) def code_assistant() -> str: try: response = requests.get(CODE_ASSISTANT_TXT_URL) response.raise_for_status() return response.text except requests.exceptions.RequestException as e: return f"Error: Unable to fetch data from URL. Details: {str(e)}"
- modelcontextprotocol/videodb_director_mcp/__init__.py:1-9 (registration)Re-exports code_assistant function along with others in __all__ for package-level access.from videodb_director_mcp.main import ( call_director, play_video, code_assistant, doc_assistant, ) __all__ = ["call_director", "play_video", "code_assistant", "doc_assistant"]
- Constant defining the URL (CODE_ASSISTANT_TXT_URL) from which code_assistant fetches its content.CODE_ASSISTANT_TXT_URL = "https://videodb.io/llms-full.txt"