Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLog level (optional, default: INFO)INFO
E2B_API_KEYYesE2B API key for sandbox
E2B_TEMPLATENoE2B template (optional, default: base)base
GITHUB_TOKENYesGitHub personal access token
ALLOWED_REPOSYesComma-separated list of allowed repositories (e.g., owner/repo1,owner/repo2)
GITHUB_USERNAMEYesYour GitHub username
E2B_ALLOW_LOCAL_FALLBACKNoAllow local fallback for testing (optional, default: false)false

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
workspace_createB

Create a new workspace and return its identifier.

The ``ttl_minutes`` is clamped to the maximum allowed TTL from configuration.
Returns workspace info including expiration time.
workspace_destroyC

Destroy a workspace by ID.

run_commandA

Execute a command inside a workspace.

The ``mode`` argument controls the command allowlist.  Supported values:

* ``safe`` (default): Only allow a restricted set of commands (git, uv, pip install,
  pytest/unittest, ruff, mypy).  This prevents dangerous operations.
* ``expert``: Allows the same commands plus additional dev tools (not implemented here).

Commands that violate the allowlist will raise a ``PermissionError``.
ensure_forkA

Ensure a fork exists for the given upstream_repo_slug.

The upstream repository must be allowed according to the configured
allowlist (via ``upstream_allowed``).  A fork will be created under the
authenticated user's account if it does not already exist.  The function
returns the fork slug (``username/repo``), the HTTPS clone URL, and
whether a new fork was created.
repo_cloneA

Clone a repository into the workspace.

The repository is cloned into the ``repo`` subdirectory within the sandbox.
All operations happen inside E2B - no host filesystem access.

The repository must be in the allowlist.
repo_setup_remotesA

Clone the user's fork and add the upstream remote.

This helper encapsulates the recommended cloning workflow for a fork-based
contribution flow:
1. Clone the fork into repo/
2. Add upstream remote
3. Fetch upstream
4. Checkout base branch tracking upstream

All operations happen inside E2B sandbox.
Both fork and upstream URLs must be in the allowlist.
repo_add_remoteC

Add a new remote to the repository.

repo_fetchC

Fetch updates from a remote.

repo_checkoutB

Checkout a branch, tag or commit.

repo_create_branchB

Create a new branch from a given reference.

repo_diffA

Get the unified diff of all changes in the working directory.

repo_commitB

Commit staged changes with a commit message.

repo_pushA

Push the current HEAD to the specified remote/branch.

A valid ``approval_id`` must be provided.
Only pushing to 'origin' (the fork) is allowed.
The fork must be under the configured GitHub username.
repo_list_branchesC

List branches in the repository.

repo_find_existing_branchesC

Find branches matching any of the provided patterns.

repo_read_pr_templateB

Read the repository's pull request template.

Reads `.github/pull_request_template.md` from inside the sandbox.
read_fileA

Read a file within the checked-out repository.

The path is relative to the repository root. Content is read from the E2B sandbox and secrets are redacted.

search_repoA

Search for query within files under the repository root.

Executes a Python search script inside the sandbox to find matches.
Limited to a modest time budget and maximum match count.
apply_patchB

Apply a unified diff patch and enforce patch limits.

The patch is written to a temporary file inside the sandbox and applied
using ``git apply``.  Patch limits are enforced before application.
write_fileC

Write content to a file in the repository.

The path is relative to the repository root.

detect_projectD
install_depsD
run_testsD
run_lintD
run_typecheckD
run_formatD
run_precommitD
github_ensure_forkA

Ensure a fork exists for the given upstream repository.

Creates a fork under the authenticated user's account if it does not already exist. Returns the fork slug, clone URL, upstream clone URL, and whether the fork was newly created.

The upstream repository must be in the allowlist.

github_get_issueC

Get issue details from GitHub.

The repository must be in the allowlist.
github_find_prs_for_issueB

Find PRs linked to an issue.

The repository must be in the allowlist.
github_open_prA

Open a pull request on GitHub.

Requires a valid ``approval_id``, which is consumed prior to performing
the API call.  Raises ``PermissionError`` if the approval ID is missing or
invalid.  Delegates to the underlying GitHub API implementation.

Validates that:
1. The upstream repository is in the allowlist
2. The fork owner matches the configured GitHub username
3. The PR body does not contain auto-close keywords (closes, fixes, resolves)
request_approvalA

Record the approval decision and return an approval token if approved.

The server verifies that mandatory fields (summary, unified_diff, checks,
branch_plan) are present.  If ``approved`` is True, a unique approval
identifier is generated and stored.  This identifier must be provided to
tools that perform side effects (e.g., pushing commits or opening
pull requests).

The approval ID is multi-use: it can be consumed for both "push" and
"open_pr" actions, but each action can only be performed once per approval.
The approval record is only deleted when all allowed actions have been used.
bundle_artifactsA

Bundle artifacts into a redacted zip and return it as base64.

The caller must provide the diff text, metadata dictionary, before and
after failure structures, and any logs to include.  A list of secrets
should be supplied to aid in redaction.

S3: Returns the zip archive as base64-encoded bytes so the client can
retrieve it directly via the MCP protocol without needing filesystem
access to the server.

Returns:
    A dictionary containing:
    - artifact_path: Local filesystem path to the zip (for debugging)
    - zip_filename: The filename of the zip archive
    - zip_base64: Base64-encoded contents of the zip file
    - size_bytes: Size of the zip file in bytes

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/saakshigupta2002/PR_Orchestrator_MCP'

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