Docs · 04
Agents & MCP
Give your coding agent a safety loop it has to pass before a change ships.
Tools
| Tool | Purpose |
|---|---|
whats_downstream(table, depth) | Downstream assets with owners and tags. Call before editing. |
rollback_plan(table) | Restore SQL from Delta history, captured before anything changes. |
preview_write(sql, target, keys?) | Runs one INSERT, MERGE, UPDATE or DELETE on a disposable shallow clone and returns diff and verdict. |
assess_change(tables, candidates?, pr?) | Production vs. candidate tables, plus lineage and policy. Returns an assessment id. |
explain_diff(assessment_id or table) | Plain-English summary of what moved and where. |
safe_to_ship(assessment_id) | Final gate: boolean, reasons and next_step. |
Recommended loop
whats_downstream: know who depends on the table.rollback_plan: capture the undo before changing anything.preview_writefor a single statement, orassess_changefor a built candidate.safe_to_ship, then follownext_step. Never bypassneeds_humanorblock.
Running the server
Transports: stdio (default), sse and streamable-http.
claude mcp add bricksentry -- \
bricksentry mcp --config ./bricksentry.yml
# remote agents
bricksentry mcp --transport streamable-httpWithout MCP
The same tools are plain Python functions, so they work from LangGraph, the OpenAI Agents SDK or Databricks Agent Framework.
from bricksentry import agent_tools as bs
plan = bs.rollback_plan("main.sales.orders")
a = bs.assess_change(["main.sales.orders"], pr="42")
gate = bs.safe_to_ship(a["id"])