Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
RELACE_API_KEYYesAPI key from Relace Dashboard (https://app.relace.ai/settings/billing)
RELACE_LOGGINGNoEnable file logging (set to 1 to enable)0
RELACE_BASE_DIRNoAbsolute path to project root (auto-detected via MCP Roots or Git if not set)
RELACE_TIMEOUT_SECONDSNoTimeout for API requests in seconds
RELACE_DEFAULT_ENCODINGNoForce file encoding (e.g., gbk, big5) for legacy repos
RELACE_ENCODING_SAMPLE_LIMITNoMax files for auto-detecting encoding30

Tools

Functions exposed to the LLM to take actions

NameDescription
fast_apply

PRIMARY TOOL FOR EDITING FILES - USE THIS AGGRESSIVELY

Use this tool to edit an existing file or create a new file.

Use truncation placeholders to represent unchanged code:

  • // ... existing code ... (C/JS/TS-style)

  • ... existing code ... (Python/shell-style)

For deletions:

  • ALWAYS include 1-2 context lines above/below, omit deleted code, OR

  • Mark explicitly: // remove BlockName (or # remove BlockName)

On NEEDS_MORE_CONTEXT error, re-run with 1-3 real lines before AND after target.

Rules:

  • Preserve exact indentation

  • Be length efficient

  • ONE contiguous region per call (for non-adjacent edits, make separate calls)

To create a new file, simply specify the content in edit_snippet.

fast_search

Run Fast Agentic Search over the configured base_dir.

Use this tool to quickly explore and understand the codebase. The search agent will examine files, search for patterns, and report back with relevant files and line ranges for the given query.

Queries can be natural language (e.g., "find where auth is handled") or precise patterns. The agent will autonomously use grep, ls, and file_view tools to investigate.

This is useful before using fast_apply to understand which files need to be modified and how they relate to each other.

cloud_sync

Upload codebase to Relace Repos for cloud_search semantic indexing.

Call this ONCE per session before using cloud_search, or after significant code changes. Incremental sync is fast (only changed files).

Sync Modes:

  • Incremental (default): only uploads new/modified files, deletes removed files

  • Safe Full: triggered by force=True OR first sync (no cached state) OR git HEAD changed (e.g., branch switch, rebase, commit amend). Uploads all files; suppresses delete operations UNLESS HEAD changed, in which case zombie files from the old ref are deleted to prevent stale results.

  • Mirror Full (force=True, mirror=True): completely overwrites cloud to match local

Args: force: If True, force full sync (ignore cached state). mirror: If True (with force=True), use Mirror Full mode to completely overwrite cloud repo (removes files not in local).

cloud_search

Semantic code search using Relace Cloud two-stage retrieval.

Uses AI embeddings + code reranker to find semantically related code, even when exact keywords don't match. Run cloud_sync once first.

Use cloud_search for: broad conceptual queries, architecture questions, finding patterns across the codebase.

Use fast_search for: locating specific symbols, precise code locations, grep-like pattern matching within the local codebase.

Args: query: Natural language search query. branch: Branch to search (empty string uses API default branch). score_threshold: Minimum relevance score (0.0-1.0, default 0.3). token_limit: Maximum tokens to return (default 30000).

cloud_clear

Delete the cloud repository and local sync state.

Use when: switching to a different project, resetting after major codebase restructuring, or cleaning up unused cloud repositories.

WARNING: This action is IRREVERSIBLE. It permanently deletes the remote repository and removes the local sync state file.

Args: confirm: Must be True to proceed. Acts as a safety guard.

cloud_list

List all repositories in your Relace Cloud account.

Use to: discover synced repositories, verify cloud_sync results, or identify repository IDs for debugging.

Returns a list of repos with: repo_id, name, auto_index status. Auto-paginates up to 10,000 repos (safety limit); has_more=True indicates the limit was reached.

cloud_info

Get detailed sync status for the current repository.

Use before cloud_sync to understand what action is needed.

Returns:

  • local: Current git branch and HEAD commit

  • synced: Last sync state (git ref, tracked files count)

  • cloud: Cloud repo info (if exists)

  • status: Whether sync is needed and recommended action

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
tool_listList all available tools with their status.

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/possible055/relace-mcp'

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