Commands

The server publishes its complete Brigadier command graph to the client with Commands (0x10) (clientbound, Play state). The client uses this graph to drive in-chat tab-completion, parse-time error highlighting, and to filter /-prefixed input from the chat box. The client never executes commands locally — it sends them to the server as Chat Command packets — but it must be able to recognize the syntax.

Tab-completion uses Command Suggestions Request (0x0F) and Command Suggestions (0x0F). Their byte-level layouts live on the packet pages; this page documents the Brigadier sub-payloads they reference.

Node graph

The graph is sent as a flat array of nodes plus a root index. Children and redirects are referenced by integer indices into that array.

Node

Field Type Notes
Flags Byte See flags.
Children count VarInt
Children indices VarInt × count Indices into the node array.
Redirect index VarInt (optional) Present iff flags & 0x08.
Name String (optional) Present for literal/argument nodes.
Parser sub-payload (optional) Present for argument nodes only — see Parsers.
Suggestions identifier Identifier (optional) Present iff flags & 0x10.

Flags byte

bits 0..1   Node type:
              0 = root
              1 = literal
              2 = argument
bit  2 (0x04)  is_executable    — node can terminate a command.
bit  3 (0x08)  has_redirect     — node redirects to the node at `redirect index`.
bit  4 (0x10)  has_suggestions  — argument node uses an explicit suggestions provider
                                  identified by `Suggestions identifier`.
bit  5 (0x20)  is_restricted    — node is permission-restricted; the client should
                                  display it dimmed and not suggest it.
bits 6..7      reserved (must be 0).

For a root node (type 0): no name, no parser, no suggestion id. For a literal node (type 1): Name is the literal token (e.g. "give"). For an argument node (type 2): Name is the parameter name (used in /help-style hints), then Parser follows, then Suggestions identifier if has_suggestions.

Parsers

The argument node's Parser sub-payload starts with a VarInt — the parser's numeric ID into the minecraft:command_argument_type registry — followed by parser-specific bytes.

The parser registry is fixed for a given protocol version. Parsers in 26.1.2:

Identifier Properties
brigadier:bool none
brigadier:float Flags byte (0x01 has_min, 0x02 has_max), optional Float min, optional Float max.
brigadier:double Flags byte (0x01 has_min, 0x02 has_max), optional Double min, optional Double max.
brigadier:integer Flags byte (0x01 has_min, 0x02 has_max), optional Int min, optional Int max.
brigadier:long Flags byte (0x01 has_min, 0x02 has_max), optional Long min, optional Long max.
brigadier:string VarInt mode (0=single word, 1=quotable phrase, 2=greedy phrase).
entity Flags byte (0x01 single target, 0x02 only players).
game_profile none
block_pos none
column_pos none
vec3 none
vec2 none
block_state none
block_predicate none
item_stack none
item_predicate none
color none
hex_color none
component none
style none
message none
nbt_compound_tag none
nbt_tag none
nbt_path none
objective none
objective_criteria none
operation none
particle none
angle none
rotation none
scoreboard_slot none
score_holder Flags byte (0x01 allow multiple).
swizzle none
team none
item_slot none
item_slots none
resource_location none
function none
entity_anchor none
int_range none
float_range none
dimension none
gamemode none
time Int min — minimum tick value the parser accepts.
resource_or_tag Identifier — the registry being looked up.
resource_or_tag_key Identifier — registry.
resource Identifier — registry.
resource_key Identifier — registry.
resource_selector Identifier — registry.
template_mirror none
template_rotation none
heightmap none
loot_table none
loot_predicate none
loot_modifier none
dialog none
uuid none

NOTE: When an argument node uses one of vanilla's suggestions providers (rather than the parser's built-in suggestions), flags & 0x10 is set and Suggestions identifier is the provider's identifier. The vanilla providers are minecraft:ask_server, minecraft:all_recipes, minecraft:available_sounds, minecraft:summonable_entities. minecraft:ask_server instructs the client to call back via Command Suggestions Request whenever the user types in that argument.

Validation

The client validates the graph before installing it: every child/redirect index must point to a node already buildable (no forward dangling references after redirect resolution). A malformed graph terminates the connection.

Source: net/minecraft/network/protocol/game/ClientboundCommandsPacket.java, net/minecraft/network/protocol/game/ClientboundCommandSuggestionsPacket.java, net/minecraft/network/protocol/game/ServerboundCommandSuggestionPacket.java, net/minecraft/commands/synchronization/ArgumentTypeInfos.java, net/minecraft/commands/synchronization/SuggestionProviders.java.