The best way to Design a Manufacturing-Prepared AI Agent That Automates Google Colab Workflows Utilizing Colab-MCP, MCP Instruments, FastMCP, and Kernel Execution
import asyncio import json import io import contextlib import re from dataclasses import dataclass from typing import Callable, Awaitable import nest_asyncio nest_asyncio.apply() TOOL_DEFINITIONS = [ { “name”: “execute_code”, “description”: “Execute Python code in the Colab kernel. Returns stdout, results, or errors. State persists between calls.” “parameters”: { “type”: “object”, “properties”: { “code”: {“type”: “string”, “description”:…
