{"record":{"id":"6a7b1f34103ee921","repo":"openai/codex","slug":"tool-input-schema-must-not-be-a-singleton-null-typ","errorCode":null,"errorMessage":"tool input schema must not be a singleton null type","messagePattern":"tool input schema must not be a singleton null type","errorType":"validation","errorClass":"serde_json::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/tools/src/json_schema.rs","lineNumber":796,"sourceCode":"        \"null\" => Some(JsonSchemaPrimitiveType::Null),\n        _ => None,\n    }\n}\n\nfn schema_type_name(schema_type: JsonSchemaPrimitiveType) -> &'static str {\n    match schema_type {\n        JsonSchemaPrimitiveType::String => \"string\",\n        JsonSchemaPrimitiveType::Number => \"number\",\n        JsonSchemaPrimitiveType::Boolean => \"boolean\",\n        JsonSchemaPrimitiveType::Integer => \"integer\",\n        JsonSchemaPrimitiveType::Object => \"object\",\n        JsonSchemaPrimitiveType::Array => \"array\",\n        JsonSchemaPrimitiveType::Null => \"null\",\n    }\n}\n\nfn singleton_null_schema_error() -> serde_json::Error {\n    serde_json::Error::io(std::io::Error::new(\n        std::io::ErrorKind::InvalidInput,\n        \"tool input schema must not be a singleton null type\",\n    ))\n}\n\n#[cfg(test)]\n#[path = \"json_schema_tests.rs\"]\nmod tests;\n","sourceCodeStart":778,"sourceCodeEnd":805,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/tools/src/json_schema.rs#L778-L805","documentation":"Schema-validation guard in the tool JSON-schema machinery: a tool declared its input schema as the singleton type \"null\" (only null is a valid input). Such a schema cannot accept any meaningful arguments, so singleton_null_schema_error rejects it at registration/serialization time.","triggerScenarios":"Thrown at codex-rs/tools/src/json_schema.rs:796 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Give the tool a real input schema (e.g. an object type with parameters, or an empty-object schema if it takes no arguments)","Remove the \"type\": [\"null\"]-only declaration from the tool definition"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}