MCP server for PySR (Python Symbolic Regression) - discover symbolic mathematical expressions from data
Server has 5 tools with explicit schemas and descriptions, but significant gaps prevent a higher score. Tool naming is generally verb-based and clear (fit_, get_, predict, export_, train_). However, descriptions lack LLM-optimization guidance and vary widely in quality. Schemas are present but incomplete, several tools lack output schema documentation. Parameter descriptions exist but some are generic (e.g., 'Path to the saved PySR model' repeated 4 times without usage context). Error handling is minimal with no recovery guidance. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are visible. The fit_symbolic_regression and train_model_complete tools are high-risk WRITE operations but have no confirmation or dry-run patterns, and no error handling visible in tool definitions themselves.
Export a discovered equation in various formats (latex, sympy, torch, jax). Useful for documentation or integration with other frameworks.
Train a PySR model to find symbolic expressions that fit the given data. Takes X (features) and y (target) arrays, along with optional configuration parameters. Returns a model_path that can be used with other tools.
Retrieve all discovered equations from a trained PySR model. Returns a list of equations with their scores, complexity, and other metrics.
Make predictions using a trained PySR model. Can optionally specify which equation to use by index.
Complete training pipeline: validates data, trains model, and returns all results. This is an all-in-one tool that takes CSV data and returns discovered equations.
fit_symbolic_regression: HIGH-RISK WRITE operation (trains model, consumes CPU/memory) lacks dry-run, confirmation pattern, or error recovery guidance. Description does not warn about prerequisites (data validation, timeout handling) or side effects.
train_model_complete: Duplicate high-risk WRITE tool with overlapping functionality to fit_symbolic_regression. Composition rubric states 'Avoid multiple tools that do the same thing differently.' This forces LLM to choose between them, wasting reasoning cycles. Unclear when to use which.
All tools: NO output schemas documented. Tools return results but LLMs cannot plan downstream calls (e.g., get_equations returns 'list of equations' but structure undefined; predict returns 'predictions' but array format, data types, and shape unknown). Rubric: '100% of A+ tools have documented return types.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 62 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 54 | - | v1 |
get_equations, predict, export_equation: Descriptions are generic and under 100 chars. 'Retrieve all discovered equations...' and 'Make predictions...' lack context for selection. No guidance on when to call vs alternatives, prerequisites, or return structure. Rubric baseline: avg param annotation 72 chars, descriptions 194 chars; A+ tools optimize for LLM selection.
fit_symbolic_regression, train_model_complete: Missing parameter validation rules in descriptions. 'niterations', 'populations', 'population_size' have no ranges specified; 'timeout_in_seconds' could accept 0 or negative values. Rubric: 'Specify minimum and maximum for numeric parameters.' This invites LLM-generated invalid inputs.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) visible. fit_symbolic_regression and train_model_complete are destructive (write to disk, modify state); get_equations, predict, export_equation are read-only. These hints help LLMs reason about retry safety and plan composition safely.
All tools: Error handling absent from tool definitions. No guidance on what errors can occur (file not found, timeout, invalid format), how to classify them (retryable vs user-fixable), or recovery steps. Rubric: 'Error responses must tell the LLM what to do next.' Current state forces LLMs to guess.
train_model_complete: Parameter 'data' accepts both CSV string and file path without distinction. Description: 'CSV data as string or file path', ambiguous for LLM. If path is used, does it expect local disk or remote URL? Rubric: 'Describe the expected format, range, and allowed values directly in the parameter description.'
fit_symbolic_regression, predict, train_model_complete: Accept array parameters (X, y, feature_columns) but no guidance on array shape, dtype, or range validation. For X (2D feature matrix), no mention of expected row count, column count, or numeric range. LLMs may pass malformed data.