Search codebase semantically by concept or functionality. Use when looking for code related to a topic, feature, or pattern rather than exact text matches.
Search the codebase using Mira's semantic search to find code by meaning, not just text.
Query: $ARGUMENTS
If no query is provided ($ARGUMENTS is empty), ask the user what they want to find. Suggest examples:
If a query is provided:
mcp__mira__code tool:code(action="search", query="<the query>", limit=10)
If semantic search returns no results or only poor matches:
Found 3 results for "session cleanup":
1. src/session/manager.rs:142-158 (score: 0.84)
fn cleanup_expired_sessions() -- removes sessions older than TTL
2. src/hooks/stop.rs:45-62 (score: 0.71)
fn on_stop() -- snapshots and archives the current session
3. src/background/tasks.rs:88-95 (score: 0.65)
fn schedule_cleanup() -- periodic session maintenance task
After showing results, suggest next steps:
code(action="callers", function_name="...") -- trace what calls a found functioncode(action="symbols", file_path="...") -- explore the structure of a result file/mira:search authentication middleware
/mira:search error handling patterns
/mira:search database connection pooling
/mira:search how are embeddings generated