Add brin to Mastra. Check packages, pages, repos, and MCP servers inside createTool() before the action executes.
Mastra tools execute inside createTool(), which gives you a deterministic place to run brin before the tool reaches outside your system. instead of hoping the agent remembers a policy, make the policy part of the tool itself.
put the brin check inside the tool's execute function or a shared helper that all external tools call. that keeps package installs, web fetches, repo clones, and MCP setup flows behind the same gate.