Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| RELACE_API_KEY | Yes | API key from Relace Dashboard (https://app.relace.ai/settings/billing) | |
| RELACE_LOGGING | No | Enable file logging (set to 1 to enable) | 0 |
| RELACE_BASE_DIR | No | Absolute path to project root (auto-detected via MCP Roots or Git if not set) | |
| RELACE_TIMEOUT_SECONDS | No | Timeout for API requests in seconds | |
| RELACE_DEFAULT_ENCODING | No | Force file encoding (e.g., gbk, big5) for legacy repos | |
| RELACE_ENCODING_SAMPLE_LIMIT | No | Max files for auto-detecting encoding | 30 |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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:
For deletions:
On NEEDS_MORE_CONTEXT error, re-run with 1-3 real lines before AND after target. Rules:
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:
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); |
| cloud_info | Get detailed sync status for the current repository. Use before cloud_sync to understand what action is needed. Returns:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| tool_list | List all available tools with their status. |