-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementSome non-critical improvement of a feature; ergonomicsSome non-critical improvement of a feature; ergonomics
Description
As an AI agent using ucon-MCP tools,
I want error responses that localize the problem, name the fix, and distinguish high-confidence corrections from exploratory hints,
So that I can self-correct in a single retry without human intervention.
Acceptance Criteria
Response model
-
ConversionErrormodel with fields:error,error_type,parameter,got,expected,likely_fix,hints -
error_typeis one of:"unknown_unit","dimension_mismatch","no_conversion_path"
Unknown unit errors
-
convert()catchesUnknownUnitErrorfor bothfrom_unitandto_unit -
check_dimensions()catchesUnknownUnitErrorfor both inputs -
list_units()catches invalid dimension filter -
parameterfield identifies which input was bad - Single high-confidence fuzzy match (≥ 0.7) populates
likely_fix - Multiple or lower-confidence matches populate
hintsonly - Unrecognizable inputs produce no spurious matches — only generic hints
Dimension mismatch errors
-
convert()catchesDimensionMismatch - Error message uses readable dimension names (never
Vector(...)) -
gotandexpectedfields carry dimension names - Compatible units listed from graph edges (not theoretical dimension matches)
No conversion path errors
-
convert()catchesConversionNotFound - Pseudo-dimension isolation is explained (not just stated)
- Hints include alternative computation approach (e.g., "compute angle/2π explicitly")
- Missing-edge case suggests intermediate conversion path when dimensions match
Structural
- Suggestion logic lives in
ucon/mcp/suggestions.py, not inserver.py - No error response
errorfield contains the string"Vector(" - All error responses are valid
ConversionErrorinstances (no raw exceptions)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementSome non-critical improvement of a feature; ergonomicsSome non-critical improvement of a feature; ergonomics