You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add_issue_comment, update_issue, and get_issue reject valid integer issue_number #2807
Three endpoints that take issue_number as a required parameter consistently fail when invoked with an integer, even though the tool schema declares issue_number as number. Other endpoints on the same server that take integer parameters work correctly, and the failure survives reconnecting the MCP server.
Affected tools
add_issue_comment
update_issue
get_issue
Unaffected tools (for comparison, same session, same repo, same auth)
create_issue — succeeds (does not take issue_number)
list_issues, search_issues — succeed
create_branch, create_or_update_file, push_files, create_pull_request — all succeed, including calls with integer fields like milestone
Call fails. Retrying multiple times, including after fully reconnecting the MCP server, reproduces the failure.
create_issue against the same repo in the same session succeeds, ruling out auth, permissions, and rate limiting.
Reproduced across at least two independent sessions on the same day.
Expected
Comment is posted / issue is updated / issue is fetched, matching a direct REST call to POST /repos/{owner}/{repo}/issues/{issue_number}/comments (etc.).
Actual
Call is rejected before it reaches GitHub. The failure pattern is consistent with issue_number being serialised as a string somewhere in the request pipeline and then rejected by the server's own integer validation.
[TODO fill in with error string on next occurrence]
Hypothesis
The three broken endpoints are exactly the ones where issue_number is templated into a URL path segment (/repos/{owner}/{repo}/issues/{issue_number}[/comments]), whereas the working endpoints pass their integers in the request body or query string. Likely culprits:
A path-parameter substitution step stringifies the value before an internal validator runs.
A schema-validation layer runs after path substitution and sees a string where a number is required.
Anywhere issue_number is interpolated into a URL is worth checking first.
None from the client side; the caller cannot influence how the server serialises the parameter. Affected users have to fall back to the GitHub REST API directly or edit the issue in the web UI.
This looks like an operation-identity boundary bug, not just a parameter type mismatch.
The invariant I would want is:
the schema-accepted issue_number value should have one canonical representation from tool input through URL construction
path interpolation must happen after validation, or it must preserve the typed value used for validation
any coercion from number to path string should be recorded as transport serialization, not fed back into schema validation
add_issue_comment, update_issue, and get_issue should share the same issue identity normalization contract
rejection should produce a typed client-visible error that identifies schema stage vs path-construction stage without exposing token or repo secrets
Tests I would add:
integer issue_number accepted for get_issue, update_issue, and add_issue_comment
numeric-looking string rejected or normalized according to one documented rule, not depending on endpoint
path-bound issue_number and query/body integer params use the same canonicalization test fixture
failing validation returns no-effect evidence: no REST call made and no issue mutation
retries with the same input produce the same request digest and error stage
That keeps MCP tool schemas honest while making issue mutations auditable before any GitHub write is attempted.
Boundary: architecture and conformance feedback only; no claim about GitHub/MCP Server alignment, implementation correctness, acceptance, partnership, integration, customer interest, official alignment, GitHub MCP usage, or Neura usage.
Verified against current main — this appears to be already fixed.
I built the server from main (64a49f3, go1.26.7) and drove it over stdio JSON-RPC with a real token:
issue_read (the modern replacement of get_issue) with "issue_number": 2807 passed as a JSON integer returns the issue normally — no parameter error.
Unit-level, the shared coercion helper RequiredInt → toInt in pkg/github/params.go now accepts both float64 and numeric-string representations and rejects NaN/Inf/fractional/out-of-range values, with tests covering the numeric-string path.
The reporter's hypothesis about URL-path templating was reasonable, but the actual root cause looks like the pre-refactor parameter handling: since the params-helper refactor (commit 21c5a6f, which introduced pkg/github/params.go with the tolerant toInt), integer inputs are coerced correctly on all three tools named here. Note the tool surface has also changed: get_issue/update_issue are now the method-parameterized issue_read/issue_write.
Suggest closing as fixed; happy to re-check with a specific version if anyone still reproduces this on a release built after 2026-08-17.
Activity
rpelevin commentedon Jul 3, 2026
This looks like an operation-identity boundary bug, not just a parameter type mismatch.
The invariant I would want is:
Tests I would add:
That keeps MCP tool schemas honest while making issue mutations auditable before any GitHub write is attempted.
Boundary: architecture and conformance feedback only; no claim about GitHub/MCP Server alignment, implementation correctness, acceptance, partnership, integration, customer interest, official alignment, GitHub MCP usage, or Neura usage.
fix(issues): rebase native integer issue_number validation onto main
fix(issues): rebase native integer issue_number validation onto main
CAOShurong commentedon Aug 24, 2026
Verified against current
main— this appears to be already fixed.I built the server from
main(64a49f3, go1.26.7) and drove it over stdio JSON-RPC with a real token:issue_read(the modern replacement ofget_issue) with"issue_number": 2807passed as a JSON integer returns the issue normally — no parameter error.RequiredInt→toIntinpkg/github/params.gonow accepts bothfloat64and numeric-string representations and rejects NaN/Inf/fractional/out-of-range values, with tests covering the numeric-string path.The reporter's hypothesis about URL-path templating was reasonable, but the actual root cause looks like the pre-refactor parameter handling: since the params-helper refactor (commit
21c5a6f, which introducedpkg/github/params.gowith the toleranttoInt), integer inputs are coerced correctly on all three tools named here. Note the tool surface has also changed:get_issue/update_issueare now the method-parameterizedissue_read/issue_write.Suggest closing as fixed; happy to re-check with a specific version if anyone still reproduces this on a release built after 2026-08-17.
fix(params): accept native integer types for numeric tool parameters