MCP server that interfaces with Sandbox Fusion code interpreter to execute code snippets and Jupyter notebooks across multiple programming languages
Two tools with basic schemas and descriptions, but significant quality gaps. Tool names lack clear action verbs (execute_code, execute_jupyter are generic). Descriptions are in Chinese and lack LLM-optimized structure (no WHAT/WHEN/WHY clarity). Parameter descriptions are minimal. No output schema documentation. Error handling returns raw JSON strings without recovery guidance. No input validation or constraint documentation. Schemas present but sparse, missing type constraints, enums, and ranges. No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Both tools marked WRITE risk but no confirmation/dry-run pattern.
执行代码片段 参数: - code: 要执行的代码 - language: 编程语言 - timeout: 超时时间(秒)
执行Jupyter笔记本 参数: - notebook_content: Jupyter笔记本内容 (JSON格式) - timeout: 超时时间(秒)
Tool names lack action clarity. 'execute_code' and 'execute_jupyter' are generic verbs that don't distinguish intent. LLMs cannot infer whether these are safe reads or destructive writes from the name alone. Rename to 'run_code_snippet' and 'run_jupyter_notebook' for clarity.
Descriptions are in Chinese and lack LLM-optimized structure. No WHAT/WHEN/WHY guidance. 'Execute code snippet' (translated) does not explain when to use this vs alternatives, what happens to state, or what the output contains. Descriptions must be 50-200 chars in English, stating purpose, preconditions, and return type.
No output schema documented. Tools return JSON strings via json.dumps(response.dict()), but the structure of 'response' is opaque. LLMs cannot plan downstream calls or extract results. Document the response schema: fields, types, and what each field means.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 33 | <=2025-11-25 | v2 |
Error handling returns raw JSON error strings without recovery guidance. 'error: str(e)' gives LLMs no actionable next step. Errors must categorize as retryable/user-fixable/fatal and suggest recovery (e.g., 'Language not supported. Try: python, javascript, bash').
No input validation or constraint documentation. 'timeout' parameter is nullable integer with no bounds. 'code' parameter has no length limit or injection guards. 'language' enum is hardcoded but not exposed in schema. Add min/max for timeout, document code length limits, and expose language enum in schema.