If you enter invalid NBT data (e.g., a negative enchantment level or a non-existent item ID), you risk or crashing the server. On an anarchy server, this is fine; on your friend’s realm, you will be hated.
Example of a simplified NBT structure for a custom sword: nbt kits minecraft horion