Who implements those functions? E.g., store.order has to have its logic somewhere.

Those functions usually already exist, you just write light wrappers around them for the LLM.