MCP server exposing local SageMath tools
The server provides three tools with explicit registrations, schemas, and descriptions. However, the implementation has significant gaps in parameter documentation and output clarity that limit production readiness. Tool naming follows verb_noun convention (get, evaluate, health check) but descriptions lack depth and guidance. Input schemas are present with Zod type definitions, but parameter descriptions are minimal. Output schemas are defined but use generic fields (stdout, stderr, exitCode) that could confuse LLMs about what data to extract. Error handling is minimal, no recovery guidance or classification of error types.
Evaluate SageMath code locally
Lightweight self-check of SageMath availability and basic readiness
Get local SageMath version information
Parameter descriptions are minimal or missing context. The 'code' parameter in sagemath_evaluate has description 'SageMath code to evaluate' but lacks guidance on what syntax/libraries are available, expected format, or constraints. The 'timeoutMs' parameter provides type info but no context on typical values or implications of timeout.
Output schema uses generic process-execution fields (stdout, stderr, exitCode, timedOut, durationMs) that expose implementation details rather than domain semantics. LLMs must parse stdout text to extract results. Tools should return structured, parsed results (e.g., 'result': <computed value>, 'error_message': <string>) instead of raw process output.
Error handling provides no recovery guidance. If a SageMath evaluation times out or fails, the response includes stderr text but no actionable next steps. Error messages should indicate whether the error is retryable, user-fixable (e.g., syntax error in code), or fatal (e.g., SageMath not installed).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 56 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 29 | - | v1 |
sagemath_version and sagemath_health descriptions are vague and lack context. 'Get local SageMath version information' does not explain what format the version is returned in, when to call this (before evaluate?), or what constitutes 'readiness' for the health check. Descriptions should be 50-200 characters and answer WHAT, WHEN, and WHAT-NEXT.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are declared. sagemath_evaluate is marked WRITE (destructive) in the metadata but the tool registration does not include destructiveHint, which would inform agents of side effects and retry behavior.
The 'timeoutMs' parameter in sagemath_evaluate is optional with no default explicitly stated in the description. Code shows default is 10000ms, but LLMs cannot read code, they only read descriptions. Description should state: 'Optional timeout in milliseconds (default: 10000). Must be a positive integer. Values above 60000 may be rejected by the system.'