Tools
The server intentionally exposes exactly three tools. Task status and results, when negotiated, use MCP protocol methods rather than additional tools.
bazel.run
Section titled “bazel.run”Run an allowed Bazel command and receive a bounded result.
{ "workspace": "/src/project", "command": "test", "args": ["//services/...", "--test_tag_filters=-integration"]}Supported command classes include build, test, coverage, query,
cquery, aquery, and selected informational commands. The exact policy is
configurable. Request arguments remain an array and are never concatenated into
a shell command.
The result includes the invocation lifecycle state, command outcome, a bounded
headline and diagnostics, and an invocation_id when evidence can be inspected.
bazel.inspect
Section titled “bazel.inspect”Read a narrow view from a retained invocation. Available views include:
- summary and diagnostics;
- test results and copied failed-test logs;
- coverage and artifacts;
- query results;
- normalized logs.
{ "invocation_id": "019f...", "view": "test_log", "limit": 20}Views are filtered, byte-bounded, and paginated. When a response is truncated,
pass its opaque next_cursor to the next inspection request without modifying
it.
bazel.cancel
Section titled “bazel.cancel”Cancel a queued or running invocation.
{ "invocation_id": "019f..."}Cancellation uses the same durable invocation ID as execution and inspection. The server coordinates interrupt and termination grace periods rather than leaving process cleanup to the agent.
Long-running calls
Section titled “Long-running calls”When the client and server negotiate compatible MCP task support, bazel.run
can return a durable task handle. Task polling and result retrieval are MCP
protocol methods; the three-tool inventory does not change.
See long-running builds for execution modes.