forgejo-mcp/pkg/to
Dmitry Mikushin 9f87831c14 Fix number parameter parsing: handle string-encoded numbers from MCP clients
MCP clients (e.g. Claude Code) may serialize number parameters as JSON
strings instead of JSON numbers. The Go type assertion .(float64) silently
returns 0 for string values, causing "issue does not exist [index: 0]"
errors.

Add to.Float64() helper that handles float64, int, int64, and string types
via strconv.ParseFloat. Replace all 62 bare .(float64) assertions across
9 operation files with to.Float64() calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:08:59 +01:00
..
number.go Fix number parameter parsing: handle string-encoded numbers from MCP clients 2026-03-17 15:08:59 +01:00
to.go fix: add /v2 suffix to module path for go install compatibility 2025-12-29 15:51:03 +01:00