github/github-mcp-server · error

field_filters entry %q: %s

Error message

field_filters entry %q: %s

What it means

While parsing a field_filters entry whose field_name was already read, the required string parameter value is missing, empty, or not a string. The message includes the offending field name so you know which entry to fix.

Source

Thrown at pkg/github/issues.go:3088

				return nil, fmt.Errorf("each field_filters entry must be an object")
			}
			entries = append(entries, entry)
		}
	case []map[string]any:
		entries = v
	default:
		return nil, fmt.Errorf("field_filters must be an array")
	}

	filters := make([]rawFieldFilter, 0, len(entries))
	for _, entry := range entries {
		fieldName, err := RequiredParam[string](entry, "field_name")
		if err != nil {
			return nil, fmt.Errorf("field_filters entry: %s", err.Error())
		}
		value, err := RequiredParam[string](entry, "value")
		if err != nil {
			return nil, fmt.Errorf("field_filters entry %q: %s", fieldName, err.Error())
		}
		filters = append(filters, rawFieldFilter{Name: fieldName, Value: value})
	}
	return filters, nil
}

// resolveFieldFilters matches each raw filter against a known field definition and
// coerces the value into the right typed slot on IssueFieldValueFilter. Matching is
// case-insensitive on field name; option names are also matched case-insensitively for
// single-select fields.
func resolveFieldFilters(rawFilters []rawFieldFilter, fields []IssueField) ([]IssueFieldValueFilter, error) {
	byName := make(map[string]IssueField, len(fields))
	knownNames := make([]string, 0, len(fields))
	for _, f := range fields {
		byName[strings.ToLower(f.Name)] = f
		knownNames = append(knownNames, f.Name)
	}

View on GitHub (pinned to 0ea1f775a7)

Solutions

  1. Add a non-empty string value to the entry identified by the field name in the error message
  2. Send numbers as strings ("5"), since per-type coercion happens later in resolveFieldFilters
  3. Remove the entry if you do not actually want to constrain that field

Example fix

// before
{"field_filters":[{"field_name":"Points","value":5}]}
// after
{"field_filters":[{"field_name":"Points","value":"5"}]}
Defensive patterns

Strategy: validation

Validate before calling

func requireStringValue(entry map[string]any) error {
	v, ok := entry["value"]
	if !ok || v == "" {
		return fmt.Errorf("value is required in every field_filters entry")
	}
	if _, ok := v.(string); !ok {
		return fmt.Errorf("value must be a string; format numbers as %q", "5")
	}
	return nil
}

Type guard

func isNonEmptyString(v any) bool {
	s, ok := v.(string)
	return ok && s != ""
}

Prevention

When it happens

Trigger: A field_filters entry like {"field_name":"Priority"} with no value key, value:"", or a non-string value such as {"field_name":"Points","value":5}.

Common situations: Passing numbers as JSON numbers instead of strings (values are always strings and coerced later per field type); omitting value to mean "any".

Related errors


AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15). Data as JSON: /api/errors/7379a516f55c98b9. Report an issue: GitHub.