execute_typescript
Run TypeScript code with Canvas API credentials in a sandboxed Node.js environment. Save tokens by executing bulk operations.
Instructions
Execute TypeScript code in a Node.js environment with access to Canvas API.
IMPORTANT: This achieves 99.7% token savings for bulk operations!
Code runs in a sandboxed Node.js environment with Canvas API credentials,
all TypeScript modules in src/canvas_mcp/code_api/, and standard Node.js modules.
IMPORTANT: Security is best-effort unless container sandboxing is available.
Code runs in a temp file (deleted after), with optional network allowlist,
timeout, memory, and CPU limits.
Args:
code: TypeScript code to execute; can import from './canvas/*' modules.
timeout: Max execution time in seconds (default: 120).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |