bug report#
when creating an issue with invalid labels, the mcp server currently:
- creates the issue successfully
- then returns an error about invalid labels
- this causes the caller to retry, creating duplicate issues
example#
> create_repo_issue(repo="zzstoatzz.io/find-bufo", title="...", labels=["enhancement"])
Error: invalid labels: ['enhancement']
available labels for this repo: ['assignee', 'documentation', 'duplicate', 'good-first-issue', 'wontfix']
this error message suggests the operation failed, but the issue was actually created. retrying creates a duplicate.
expected behavior#
the server should validate labels against the repo's available labels before creating the issue. if labels are invalid, fail fast without creating the issue.
actual behavior#
the server creates the issue first, then validates labels and returns an error, leaving the issue created even though an error was returned.
impact#
- confusing developer experience (error returned but operation succeeded)
- creates duplicate issues when retried
- wastes issue numbers
fix#
validate labels parameter against repo's available labels before calling the issue creation api.