github/github-mcp-server · error
issue field %q was not found in %s/%s
Error message
issue field %q was not found in %s/%s
What it means
resolveIssueRequestFieldValues (pkg/github/issues.go:342) matches each requested field_name (lowercased and trimmed) against the repository's issue fields returned by the metadata query. This error fires when no configured field matches — the field genuinely does not exist in owner/repo, so its database ID cannot be resolved and the write is aborted before any mutation.
Source
Thrown at pkg/github/issues.go:342
name = string(node.IssueFieldText.Name)
case "IssueFieldNumber":
name = string(node.IssueFieldNumber.Name)
case "IssueFieldDate":
name = string(node.IssueFieldDate.Name)
case "IssueFieldSingleSelect":
name = string(node.IssueFieldSingleSelect.Name)
default:
continue
}
fieldByName[strings.ToLower(strings.TrimSpace(name))] = node
}
resolved := make([]*github.IssueRequestFieldValue, 0, len(issueFields))
var fieldIDsToDelete []int64
for _, fieldInput := range issueFields {
node, ok := fieldByName[strings.ToLower(strings.TrimSpace(fieldInput.FieldName))]
if !ok {
return nil, nil, fmt.Errorf("issue field %q was not found in %s/%s", fieldInput.FieldName, owner, repo)
}
var fullDatabaseIDStr, dataType string
switch string(node.TypeName) {
case "IssueFieldText":
fullDatabaseIDStr = string(node.IssueFieldText.FullDatabaseID)
dataType = string(node.IssueFieldText.DataType)
case "IssueFieldNumber":
fullDatabaseIDStr = string(node.IssueFieldNumber.FullDatabaseID)
dataType = string(node.IssueFieldNumber.DataType)
case "IssueFieldDate":
fullDatabaseIDStr = string(node.IssueFieldDate.FullDatabaseID)
dataType = string(node.IssueFieldDate.DataType)
case "IssueFieldSingleSelect":
fullDatabaseIDStr = string(node.IssueFieldSingleSelect.FullDatabaseID)
dataType = string(node.IssueFieldSingleSelect.DataType)
}
View on GitHub (pinned to 0ea1f775a7)
Solutions
- List the repository's issue fields first (repo settings, or the metadata query) and use the exact configured name
- Match is case-insensitive and whitespace-trimmed — fix pure typos only
- If fields were renamed, update the payload to the new name
- If the repo has no fields, configure them in repository settings before calling update_issue with issue_fields
Example fix
# before
{"issue_fields": [{"field_name": "Prioroty", "field_option_name": "P0"}]}
# after
{"issue_fields": [{"field_name": "Priority", "field_option_name": "P0"}]} Defensive patterns
Strategy: validation
Validate before calling
// fetch configured field names once, then diff
known := fetchRepoIssueFieldNames(ctx, gqlClient, owner, repo) // lowercased set
for _, f := range requestedFields {
if !known[strings.ToLower(strings.TrimSpace(f))] {
return fmt.Errorf("field %q not configured in %s/%s; available: %v", f, owner, repo, known)
}
} Type guard
func isKnownField(name string, known map[string]bool) bool {
return known[strings.ToLower(strings.TrimSpace(name))]
} Prevention
- Cache the repo's issue-field names at job start and validate every payload against them
- Re-validate after admins announce field renames; treat field-name drift as a config change
- Trim and lowercase names client-side — the server does, so exact-case matches are unnecessary
When it happens
Trigger: update_issue with field_name "priority" when the repo's field is named "Priority" is fine (case-insensitive) — but "Prioroty" (typo), "Priority Level" (renamed), or a field defined in a different repo/organization template fails. Also when the repo has zero issue fields configured.
Common situations: Fields renamed or removed by admins after scripts were written; copying tool payloads between repos with different field sets; issue-fields preview returning an incomplete list; typo'd names from LLM args.
Related errors
- issue field %q is %q, so field_option_name cannot be used
- issue field option %q was not found for field %q
- each issue_fields item must be an object
- issue_fields must be an array
- field_name is required for each issue_fields item
AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15).
Data as JSON: /api/errors/5a852d69dfc635b6.
Report an issue: GitHub.