mvanhorn/last30days-skill · error

format must be a string

Error message

format must be a string

What it means

Error "format must be a string" thrown in mvanhorn/last30days-skill.

Source

Thrown at mcp/internal/tools/preflight.go:75

	}
}

func preflightRunArgs(format string) []string {
	runArgs := []string{"--preflight", "--preflight-report-on-save-dir", mcpSaveDir()}
	if format == "json" {
		runArgs = append(runArgs, "--emit=json")
	}
	return runArgs
}

func preflightFormatArgument(args map[string]any) (string, error) {
	raw, ok := args["format"]
	if !ok {
		return "text", nil
	}
	value, ok := raw.(string)
	if !ok {
		return "", errors.New("format must be a string")
	}
	switch value {
	case "", "text":
		return "text", nil
	case "json":
		return "json", nil
	default:
		return "", fmt.Errorf("format must be 'text' or 'json', got %q", value)
	}
}

View on GitHub (pinned to c7460f6114)

Solutions

  1. Pass the format argument as a JSON string, e.g. {"format": "text"} or {"format": "json"}.
  2. Omit the format argument entirely to use the default 'text' output.

When it happens

Trigger: Fires when the preflight MCP tool is invoked with a 'format' argument that is not a JSON string (e.g. a number, boolean, object, or null). Only string values pass type validation.

Common situations: See trigger scenarios.


AI-assisted analysis of mvanhorn/last30days-skill@c7460f6114 (2026-08-15). Data as JSON: /api/errors/813154a681433863. Report an issue: GitHub.