cloud_search
Search codebases with natural language queries to find files, classes, or functions by their behavior and purpose, even without knowing exact names.
Instructions
Search for code by meaning using AI embeddings. Requires cloud_sync first.
Use for conceptual queries where you don't know the exact file, class, or function name. Prefer agentic_search when you know the exact identifier or symbol name.
Prerequisite: cloud_sync must have been run at least once. Fails if RELACE_API_KEY is not set or no sync state exists.
Returns: {results (list), result_count (int), warnings (list[str]), query (str), branch (str), repo_id (str)}. Check warnings[] for stale index alerts (e.g., uncommitted local changes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language description of the code to find. ✅ 'function that validates JWT and returns user ID' ✅ 'rate limiting middleware for HTTP requests' ❌ 'auth' (too vague — low-relevance results) Be specific about behavior, not just topic. | |
| branch | No | Branch to search (null = API default branch). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||