0diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
1index 4cbe4a6062..5fcb9ff0d2 100644
2--- a/src/rpc/blockchain.cpp
3+++ b/src/rpc/blockchain.cpp
4@@ -1105,7 +1105,7 @@ static RPCHelpMan gettxout()
5 {RPCResult::Type::STR_AMOUNT, "value", "The transaction value in " + CURRENCY_UNIT},
6 {RPCResult::Type::OBJ, "scriptPubKey", "", {
7 {RPCResult::Type::STR, "asm", "Disassembly of the output script"},
8- {RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
9+ {RPCResult::Type::STR, "desc", /*optional=*/true, "Inferred top level descriptor for the script (if any)"},
10 {RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
11 {RPCResult::Type::STR, "type", "The type, eg pubkeyhash"},
12 {RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
13diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
14index 14963190f4..df9a8c2f87 100644
15--- a/src/rpc/rawtransaction.cpp
16+++ b/src/rpc/rawtransaction.cpp
17@@ -505,7 +505,7 @@ static RPCHelpMan decodescript()
18 {RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
19 {RPCResult::Type::STR, "type", "The type of the output script (e.g. witness_v0_keyhash or witness_v0_scripthash)"},
20 {RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
21- {RPCResult::Type::STR, "desc", "Inferred descriptor for the script"},
22+ {RPCResult::Type::STR, "desc", /*optional=*/true, "Inferred top level descriptor for the script (if any)"},
23 {RPCResult::Type::STR, "p2sh-segwit", "address of the P2SH script wrapping this witness redeem script"},
24 }},
25 },
26@@ -827,7 +827,7 @@ const RPCResult decodepsbt_inputs{
27 {RPCResult::Type::OBJ, "scriptPubKey", "",
28 {
29 {RPCResult::Type::STR, "asm", "Disassembly of the output script"},
30- {RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
31+ {RPCResult::Type::STR, "desc", /*optional=*/true, "Inferred top level descriptor for the script (if any)"},
32 {RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
33 {RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
34 {RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined a
35ddress exists)"},
36diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp
37index b1fbc25641..ff23225548 100644
38--- a/src/rpc/util.cpp
39+++ b/src/rpc/util.cpp
40@@ -1412,7 +1412,7 @@ std::vector<RPCResult> ScriptPubKeyDoc() {
41 return
42 {
43 {RPCResult::Type::STR, "asm", "Disassembly of the output script"},
44- {RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
45+ {RPCResult::Type::STR, "desc", /*optional=*/true, "Inferred top level descriptor for the script (if any)"}
46,
47 {RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
48 {RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address
49exists)"},
50 {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"},