MCP server for executing C# code with precise computation, real-time data processing, and complex logic handling. Supports both script mode and program mode execution with a worker pool architecture.
Single tool 'run_csharp' with mixed-quality definition. Naming is verb-based and clear ('run_csharp' follows action-verb convention). Description is comprehensive (530+ chars, exceeds baseline 194 avg) with use cases and constraints, but written in Chinese which limits LLM interpretability in English-dominant contexts. Input schema is well-defined with type declarations and descriptions. However, output schema is undocumented, the tool returns 'string' but the actual structure (success/error format, content encoding) is invisible. Parameter timeout has a sensible default (30000ms). No enum constraints despite accepting arbitrary code. Error handling guidance is minimal, tool description warns against certain use cases but provides no actionable recovery steps. The tool's 'Risk: IRREVERSIBLE' designation is acknowledged but not reflected in tool-level safeguards (no confirmation pattern, no dry-run support).
C#代码执行器,用于精确计算、实时数据或复杂逻辑处理,默认超时时间30秒。 何时使用: - 数学运算: (BigInteger.Pow(2, 64) - 1).ToString() - 日期时间: new DateTime(2025, 12, 25).DayOfWeek.ToString() - 加密哈希: string.Concat(SHA256.Create().ComputeHash(Encoding.UTF8.GetBytes("Gemini")).Select(b => b.ToString("x2"))) - LINQ处理: new[] { "anna", "bob" }.Select(n => char.ToUpper(n[0]) + n[1..].ToLower()).OrderBy(n => n).ToList() - JSON解析: JsonDocument.Parse("{\"name\": \"John\"}").RootElement.GetProperty("name").GetString() - 正则匹配: Regex.Match("[email protected]", @"[\w]+@[\w]+\.\w+").Value - HTTP请求: await new HttpClient().GetStringAsync("https://example.com") - 算法验证: int n = 1997; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return n > 1; 何时避免:开放式问题、外部NuGet包、状态维持、长时间任务、本地文件访问、UI构建。 原则:精确优先,任务分解,善用工具。
Output schema is not documented. Tool returns 'string' but actual format (JSON, plain text, error structure) is undocumented. LLMs cannot reliably parse or validate the response.
No confirmation or dry-run pattern for irreversible operation. Tool description flags 'Risk: IRREVERSIBLE' but provides no safeguard (e.g. dry_run parameter, confirm_execution flow). Arbitrary code execution could corrupt agent state.
Description is in Chinese, limiting clarity for LLMs trained primarily on English. While the Chinese description is detailed, multilingual tool definitions reduce cross-model compatibility and increase interpretation errors.
No explicit error recovery guidance. Tool documentation warns what NOT to do (open-ended questions, NuGet packages, UI building) but does not guide LLMs on what to do when the code fails. Missing pattern: 'If execution times out, simplify the code and retry' or 'If a syntax error occurs, validate C# grammar.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 63 | 2026-07-28+ | v2 |
| 2026-03-09 | C | 62 | - | v1 |
'code' parameter accepts free-form string with no constraints (no regex pattern, no length limit, no syntax validation hint). LLMs may pass non-C# input, incomplete snippets, or syntax errors without guidance on expected format.
Progress parameter ('IProgress<ProgressNotificationValue>') appears in C# signature but is not exposed to the caller via the schema. Schema only shows 'code' and 'timeout'. Progress handling is opaque to the MCP client.