Context-Based Formal Specification of Multi-Agent Systems