github/github-mcp-server · error
field_filters: %q is not a valid date for %q (expected YYYY-
Error message
field_filters: %q is not a valid date for %q (expected YYYY-MM-DD): %s
What it means
For a DATE issue field, resolveFieldFilters requires the value to parse as YYYY-MM-DD (time.Parse with layout "2006-01-02"). The underlying Go parse error is appended. Full timestamps or other date formats are rejected even though they are valid ISO 8601.
Source
Thrown at pkg/github/issues.go:3140
matched = o.Name
break
}
}
if matched == "" {
optionNames := make([]string, 0, len(field.Options))
for _, o := range field.Options {
optionNames = append(optionNames, o.Name)
}
return nil, fmt.Errorf("field_filters: %q is not a valid option for %q. Valid options: %s", rf.Value, field.Name, strings.Join(optionNames, ", "))
}
v := githubv4.String(matched)
filter.SingleSelectOptionValue = &v
case "TEXT":
v := githubv4.String(rf.Value)
filter.TextValue = &v
case "DATE":
if _, err := time.Parse("2006-01-02", rf.Value); err != nil {
return nil, fmt.Errorf("field_filters: %q is not a valid date for %q (expected YYYY-MM-DD): %s", rf.Value, field.Name, err.Error())
}
v := githubv4.String(rf.Value)
filter.DateValue = &v
case "NUMBER":
n, err := strconv.ParseFloat(rf.Value, 64)
if err != nil {
return nil, fmt.Errorf("field_filters: %q is not a valid number for %q: %s", rf.Value, field.Name, err.Error())
}
v := githubv4.Float(n)
filter.NumberValue = &v
default:
return nil, fmt.Errorf("field_filters: field %q has unsupported data_type %q", field.Name, field.DataType)
}
out = append(out, filter)
}
return out, nil
}
View on GitHub (pinned to 0ea1f775a7)
Solutions
- Format the value as YYYY-MM-DD (zero-padded), e.g. "2023-01-15"
- Truncate timestamps to their date part before sending
- Normalize user-supplied dates through a date parser in your code first
Example fix
// before
{"field_filters":[{"field_name":"Target Date","value":"15/01/2023"}]}
// after
{"field_filters":[{"field_name":"Target Date","value":"2023-01-15"}]} Defensive patterns
Strategy: validation
Validate before calling
var dateRe = regexp.MustCompile(`^\d{4}-\d{2}-\d{2}$`)
func validFilterDate(s string) bool {
if !dateRe.MatchString(s) {
return false
}
_, err := time.Parse("2006-01-02", s)
return err == nil
} Type guard
func isYYYYMMDD(s string) bool {
_, err := time.Parse("2006-01-02", s)
return err == nil
} Prevention
- Normalize all dates to YYYY-MM-DD before building field_filters
- Truncate timestamps to the date part for DATE-typed fields
When it happens
Trigger: field_filters entry on a DATE field with a value like "2023/01/15", "January 15 2023", or "2023-01-15T14:30:00Z".
Common situations: Reusing an ISO timestamp accepted by the since/until parameters elsewhere; locale-specific date formats from user input; script formatting dates with slashes.
Related errors
- each field_filters entry must be an object
- field_filters must be an array
- field_filters entry: %s
- field_filters entry %q: %s
- field_filters: unknown field %q. Known fields: %s
AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15).
Data as JSON: /api/errors/33858a85a9c66798.
Report an issue: GitHub.