Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 1.78 KB

File metadata and controls

69 lines (52 loc) · 1.78 KB

Common Search Examples

Real-world search examples for common tasks.

Finding Implementations

"Where is authentication handled?"

mcp__sourcegraph__nls_search: "repo:^github.com/org/repo$ authentication middleware validation"

"How do we make API calls?"

mcp__sourcegraph__keyword_search: "repo:^github.com/org/repo$ fetch\|axios\|http\.request"

"Find all database queries"

mcp__sourcegraph__keyword_search: "repo:^github.com/org/repo$ \.query\(\|\.execute\("

Understanding Flow

"How does user signup work end-to-end?"

mcp__sourcegraph__deepsearch_read: "Trace the user signup flow from form submission to database creation"

"What happens when a payment fails?"

mcp__sourcegraph__deepsearch_read: "How does the system handle failed payment attempts?"

Debugging

"Find where this error is thrown"

mcp__sourcegraph__keyword_search: "repo:^github.com/org/repo$ 'User not found'"
mcp__sourcegraph__find_references: Find all usages of the error constant

"What changed in authentication recently?"

mcp__sourcegraph__diff_search: repos=["github.com/org/repo"] pattern="auth" after="2 weeks ago"

Finding Patterns

"How do other features handle validation?"

mcp__sourcegraph__nls_search: "repo:^github.com/org/repo$ input validation schema"

"Find examples of pagination"

mcp__sourcegraph__keyword_search: "repo:^github.com/org/repo$ offset\|limit\|cursor\|pageToken"

Tracing Dependencies

"What uses this utility function?"

mcp__sourcegraph__find_references: repo="github.com/org/repo" path="src/utils/format.ts" symbol="formatDate"

"Where is this type defined?"

mcp__sourcegraph__go_to_definition: repo="github.com/org/repo" path="src/api/handler.ts" symbol="UserResponse"