Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
timeoutNoTimeout in seconds for Bazel commands (default: 300)300
bazel-pathNoPath to the Bazel executable (default: bazel)bazel
workspace-rootNoPath to the Bazel workspace root (default: current directory)
max-output-charsNoMaximum output characters to capture (default: 64000)64000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
bazel_buildB

Run a Bazel build and return stdout, stderr, and exit code.

options are passed as extra bazel flags (e.g. --config=ci, -c opt).

bazel_testB

Run Bazel tests and return structured pass/fail results with failure log excerpts.

explain_build_fileB

Return BUILD file contents for analysis by the host LLM.

path is relative to the workspace root (e.g. foo/bar/BUILD or foo/bar).

bazel_queryA

Run an arbitrary Bazel query expression.

Query is read-only but can be expensive on broad patterns like //... output_format: label, build, xml, package, location, graph, etc.

list_targetsA

List all targets matching a package pattern.

Default //... lists targets across the entire workspace (can be slow). For a single package use //pkg or pkg (normalized to //pkg:all). For a subtree use //pkg/...

get_depsA

Get dependencies of a target up to the given depth, excluding the target itself.

get_rdepsA

Find reverse dependencies of a target within scope, excluding the target itself.

show_target_infoA

Show the BUILD rule definition for a target (bazel query --output=build).

Macro-generated targets may differ from on-disk BUILD files.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/saeid-rez/bazel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server