{"record":{"id":"218b087357d2e791","repo":"mvanhorn/last30days-skill","slug":"emit-must-be-a-string","errorCode":null,"errorMessage":"emit must be a string","messagePattern":"emit must be a string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp/internal/tools/research.go","lineNumber":124,"sourceCode":"\traw, ok := args[name]\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"%s is required\", name)\n\t}\n\tvalue, ok := raw.(string)\n\tif !ok || strings.TrimSpace(value) == \"\" {\n\t\treturn \"\", fmt.Errorf(\"%s must be a non-empty string\", name)\n\t}\n\treturn value, nil\n}\n\nfunc emitArgument(args map[string]any) (string, error) {\n\traw, ok := args[\"emit\"]\n\tif !ok {\n\t\treturn \"compact\", nil\n\t}\n\tvalue, ok := raw.(string)\n\tif !ok {\n\t\treturn \"\", errors.New(\"emit must be a string\")\n\t}\n\tswitch value {\n\tcase \"\":\n\t\treturn \"compact\", nil\n\tcase \"compact\", \"html\":\n\t\treturn value, nil\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"emit must be 'compact' or 'html', got %q\", value)\n\t}\n}\n\nfunc boolArgument(args map[string]any, name string) (bool, error) {\n\traw, ok := args[name]\n\tif !ok {\n\t\treturn false, nil\n\t}\n\tvalue, ok := raw.(bool)\n\tif !ok {","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/mvanhorn/last30days-skill/blob/c7460f6114449ddfe6ea3fc2f23c3d910c0e740c/mcp/internal/tools/research.go#L106-L142","documentation":"Error \"emit must be a string\" thrown in mvanhorn/last30days-skill.","triggerScenarios":"Fires when the research MCP tool is invoked with an 'emit' 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 emit argument as a JSON string, e.g. {\"emit\": \"compact\"} or {\"emit\": \"html\"}.","Omit the emit argument entirely to use the default 'compact' 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"}