You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-17Lines changed: 40 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,25 +42,24 @@ Restart your AI tool and ask: *"What methods does MyService have?"*
42
42
43
43
Add this to your project's `CLAUDE.md` (or equivalent instructions file). **This step is important.** Without it, the AI has the tools but won't know when to reach for them.
44
44
45
-
```markdown
45
+
````markdown
46
46
## Codebase API Lookup (codesurface MCP)
47
47
48
-
When you need to find a class, method, property, or field — use the codesurface MCP tools BEFORE Grep, Glob, or Read. They return compact, ranked results and save tokens.
49
-
50
-
| When | Tool | Example |
51
-
|------|------|---------|
52
-
| Searching for an API by keyword |`search`|`search("MergeService")`|
53
-
| Need exact method signature |`get_signature`|`get_signature("TryMerge")`|
54
-
| Want all members on a class |`get_class`|`get_class("BlastBoardModel")`|
55
-
| Overview of indexed codebase |`get_stats`|`get_stats()`|
56
-
| Force refresh after bulk file changes |`reindex`|`reindex()` (auto-refreshes on query misses) |
57
-
58
-
**Rules:**
59
-
- Before looking up a class or method, use `search` or `get_signature` instead of Grep/Glob/Read
60
-
- Use `get_class` to see all members on a class instead of reading the source file
61
-
- The index auto-refreshes on query misses — no need to manually reindex after editing files
62
-
- Only fall back to Grep/Read when you need implementation details (method bodies, control flow) that the API index doesn't cover
63
-
```
48
+
Use codesurface MCP tools BEFORE Grep, Glob, Read, or Task (subagents) for any class/method/field lookup. This applies to you AND any subagents you spawn.
49
+
50
+
| Tool | Use when | Example |
51
+
|------|----------|---------|
52
+
|`search`| Find APIs by keyword |`search("MergeService")`|
53
+
|`get_signature`| Need exact signature |`get_signature("TryMerge")`|
54
+
|`get_class`| See all members on a class |`get_class("BlastBoardModel")`|
55
+
|`get_stats`| Codebase overview |`get_stats()`|
56
+
57
+
Every result includes file path + line numbers. Use them for targeted reads:
0 commit comments