Pull a string id from an SDK response without scattering as { id?: string } across CLI or MCP code. A wrong-shaped value yields undefined, never a silently typed absent field.
id
as { id?: string }
undefined
Pull a string
idfrom an SDK response without scatteringas { id?: string }across CLI or MCP code. A wrong-shaped value yieldsundefined, never a silently typed absent field.