Static source inference · medium confidence · evidence: Streamable HTTP
Current-spec patterns detected
Summary
This server exposes two tools with minimal documentation and structural issues. Tool names lack standard action verbs, descriptions are sparse, and parameter schemas are incomplete or missing. The 'predict' tool has an array input with nested object items that lack type constraints, the LeadData model shows 'List[Dict[str, Any]]' with no enumeration, range, or format validation. Output schemas are not documented. Error handling is present but provides generic HTTP status codes without recovery guidance for LLMs. No tool annotations (readOnlyHint, destructiveHint) are used despite both tools being READ_ONLY. The server is functional as a REST API but fails to meet production MCP quality standards for agent integration.
Tools (2)
health_checkread onlysource verified37/100
Check API health status and model loading state
predictread onlysource verified28/100
Make lead conversion probability predictions using XGBoost model pipeline
Tool names lack action verbs. 'health_check' should be 'check_health'; 'predict' is too generic and does not indicate it's specifically for lead conversion prediction.
Parameter 'data' in predict tool has no description. It is defined as List[Dict[str, Any]] with no constraints, allowed keys, or data format guidance. LLMs cannot determine what lead features to include.
Output schema not documented for either tool. Clients cannot know what fields to expect (e.g., predict returns {'predictions': [{'conversion_probability': float, 'converted_prediction': bool}]} but this is not declared in the schema).
Error responses are HTTP exceptions (400, 500) with raw exception strings. No recovery guidance for LLMs. Example: 'Model not loaded' should suggest retry or describe prerequisites.
Recommendations
Rename 'health_check' to 'check_health' and 'predict' to 'predict_lead_conversion_probability' to use standard action-verb patterns.
Expand tool descriptions to 80 - 150 characters each. For 'check_health': 'Check if the lead scoring model is loaded and the API is responsive. Call this first to verify service availability before making predictions.' For 'predict_lead_conversion_probability': 'Predict lead conversion probability (0 - 1) and binary classification (converted/not converted) for a batch of leads using the trained XGBoost pipeline. Input must include all expected feature columns or NaN for missing values.'
Document the 'data' parameter with explicit guidance: 'Array of lead records. Each record must be a dictionary with feature columns matching the training set (numeric features: age, income, etc.; categorical features: source, product_type, etc.). Missing values will be imputed. Pass null or omit keys with unknown values; the pipeline will handle imputation.'
Add recovery guidance to error responses. Instead of HTTPException(status_code=500, detail='Model not loaded'), return {'error': 'Model not loaded', 'recovery': 'The XGBoost pipeline failed to load at startup. Call check_health() to verify. If the issue persists, contact the server administrator.'}.
Tool descriptions too short and generic. 'Check API health status and model loading state' (8 words) lacks context on when to call or what the LLM should do with the result. 'Make lead conversion probability predictions using XGBoost model pipeline' (12 words) does not explain input requirements or output interpretation.
Nested parameter schema for 'data' has no item type constraints. Items are 'object' with description 'Lead data dictionary with feature columns' but no enum of required/optional columns, expected types (numeric vs categorical), or validation rules.
predict
Add toolAnnotations: set readOnlyHint=true for both tools since they do not modify state.
Specify constraints for the 'data' parameter: minimum 1 record, maximum 1000 records per batch. Document expected feature names and types (e.g., 'numeric: age (int, 18 - 120), income (float, >0); categorical: source (enum: online, referral, direct), product_type (enum: basic, premium, enterprise)').
Implement per-item error handling in predict: if one lead record fails validation, return its error in the predictions array rather than failing the entire batch. Example: {'predictions': [{'lead_id': 'L001', 'conversion_probability': 0.72, 'converted_prediction': true}, {'lead_id': 'L002', 'error': 'Missing required feature: age'}]}.
Add input validation with clear error messages. Instead of generic 'str(e)', return structured errors: 'Invalid input: lead record L002 has unknown feature columns ["bad_col"]. Expected columns: ["age", "income", ...]. Remove unknown columns and retry.'
Document model pipeline details in tool descriptions: feature engineering steps, imputation strategy (median for numeric, 'missing' for categorical), scaling, and handling of 'Select' placeholder values.