Skip to content

fix(api-consistency): support issue_number alias and fallback across issue endpoints #13

Backlog

Description

@piyushmakhija28

Defect Class

parameter-inconsistency / api-schema-drift

Problem Statement

In mcp-github-api, tools exhibit inconsistent parameter naming for issue identifiers:

  • github_get_issue(number: int) strictly expects number.
  • github_close_issue(number: int), github_reopen_issue(number: int), github_update_issue(number: int) all strictly expect number.
  • However, github_create_issue_branch(issue_number: int) expects issue_number.
  • Moreover, tool output payloads return "issue_number": number.

When agents or callers pass issue_number to github_get_issue, Pydantic validation fails immediately with:
number: Field required; issue_number: Extra inputs are not permitted.

Proposed Resolution

Update issue-centric tool signatures in server.py (github_get_issue, github_close_issue, github_reopen_issue, github_update_issue, github_add_comment, github_list_comments) to accept number: Optional[int] = None and issue_number: Optional[int] = None (resolving whichever is provided), or provide an alias validator so either parameter name is accepted seamlessly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-consistencybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions