MCP server for tangled

validate labels before creating issue to prevent duplicates #13

Closed zzstoatzz.io
Closed opened by zzstoatzz.io

bug report #

when creating an issue with invalid labels, the mcp server currently:

  1. creates the issue successfully
  2. then returns an error about invalid labels
  3. 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.

Sign up or Sign in to add to the discussion.