{"record":{"id":"813154a681433863","repo":"mvanhorn/last30days-skill","slug":"format-must-be-a-string","errorCode":null,"errorMessage":"format must be a string","messagePattern":"format must be a string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp/internal/tools/preflight.go","lineNumber":75,"sourceCode":"\t}\n}\n\nfunc preflightRunArgs(format string) []string {\n\trunArgs := []string{\"--preflight\", \"--preflight-report-on-save-dir\", mcpSaveDir()}\n\tif format == \"json\" {\n\t\trunArgs = append(runArgs, \"--emit=json\")\n\t}\n\treturn runArgs\n}\n\nfunc preflightFormatArgument(args map[string]any) (string, error) {\n\traw, ok := args[\"format\"]\n\tif !ok {\n\t\treturn \"text\", nil\n\t}\n\tvalue, ok := raw.(string)\n\tif !ok {\n\t\treturn \"\", errors.New(\"format must be a string\")\n\t}\n\tswitch value {\n\tcase \"\", \"text\":\n\t\treturn \"text\", nil\n\tcase \"json\":\n\t\treturn \"json\", nil\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"format must be 'text' or 'json', got %q\", value)\n\t}\n}\n","sourceCodeStart":57,"sourceCodeEnd":86,"githubUrl":"https://github.com/mvanhorn/last30days-skill/blob/c7460f6114449ddfe6ea3fc2f23c3d910c0e740c/mcp/internal/tools/preflight.go#L57-L86","documentation":"Error \"format must be a string\" thrown in mvanhorn/last30days-skill.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","solutions":["Pass the format argument as a JSON string, e.g. {\"format\": \"text\"} or {\"format\": \"json\"}.","Omit the format argument entirely to use the default 'text' output."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c7460f6114449ddfe6ea3fc2f23c3d910c0e740c","analyzedAt":"2026-08-15T03:34:49.540Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}