MCP server for tangled

validate labels before creating issue to prevent duplicates #13

open
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 login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xbtmt2zjwlrfegqvch7fboei/sh.tangled.repo.issue/1761178781817153