Skip to content
bricksentry

Docs · 04

Agents & MCP

Give your coding agent a safety loop it has to pass before a change ships.

Tools

ToolPurpose
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

  1. whats_downstream: know who depends on the table.
  2. rollback_plan: capture the undo before changing anything.
  3. preview_write for a single statement, or assess_change for a built candidate.
  4. safe_to_ship, then follow next_step. Never bypass needs_human or block.

Running the server

Transports: stdio (default), sse and streamable-http.

shell
claude mcp add bricksentry -- \
  bricksentry mcp --config ./bricksentry.yml

# remote agents
bricksentry mcp --transport streamable-http

Without MCP

The same tools are plain Python functions, so they work from LangGraph, the OpenAI Agents SDK or Databricks Agent Framework.

python
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"])