delete_code_insight
Delete Code Insight
Delete a Code Insight view from the Sourcegraph instance.
delete_code_insight
Delete a Code Insight view from the Sourcegraph instance.
create_code_monitor
Create a new code monitor that watches for code changes matching a search query. When matches are found in new commits, the monitor triggers notifications via email, Slack webhook, or generic webhook. The search query must include a `type:diff` or `type:commit` filter.
list_batch_changes
List batch changes on the Sourcegraph instance. Batch changes are large-scale code changes that create pull requests across many repositories. Returns batch change metadata and changeset statistics.
list_repositories
List repositories connected to the Sourcegraph instance. Supports filtering by name query, pagination, and ordering. Returns repository metadata including clone status, external source, and default branch.
create_code_insight
Create a new line chart search insight that tracks code patterns over time. Define one or more data series, each with a search query and label. Optionally scope to specific repositories and set a time interval.
list_code_insights
List Code Insight views on the Sourcegraph instance. Code Insights track code patterns over time with line charts and data series. Returns insight metadata, data series with their time-series points, and processing status.
get_repository
Get detailed information about a specific repository including branches, tags, clone status, and external source metadata. Provide the full repository name (e.g., `github.com/owner/repo`).
get_batch_change
Get detailed information about a specific batch change including its changesets (pull requests/merge requests). Returns the batch change metadata, changeset statistics, and a list of associated changesets with their status.
get_file_content
Read the content of a file or list directory entries from a repository on Sourcegraph. Provide the full repository name (e.g., `github.com/owner/repo`) and file path. Optionally specify a revision (branch, tag, or commit SHA).
search_code
Search across all repositories, branches, and code hosts using Sourcegraph's code search. Supports literal, regex, and structural search patterns. Can search code content, file paths, diffs, commit messages, and symbols. Queries can be scoped using filters like `repo:`, `lang:`, `file:`, `type:`, and more. Uses the Stream API for efficient retrieval of results.
delete_code_monitor
Delete a code monitor from the Sourcegraph instance.
close_batch_change
Close a batch change. Optionally close all associated changesets (pull requests) on the code host as well.
list_code_monitors
List code monitors for the current user. Code monitors watch for changes matching a search query and trigger notifications via email, Slack, or webhooks. Useful for tracking secrets, anti-patterns, or specific code changes.
get_current_user
Get information about the currently authenticated user, including username, email, site admin status, and organization memberships.
Search code across all repositories, branches, and code hosts using literal, regex, structural, and natural language queries. Perform AI-powered deep search to ask natural language questions and get detailed answers with code citations. Stream search results in real-time via Server-Sent Events. Manage batch changes to create, update, and track pull requests across many repositories and code hosts at scale. Create and manage code insights to track code patterns over time with line charts and dashboards. Set up code monitors to get notified about changes like potential secrets, anti-patterns, or typos via email, Slack, or webhooks. Query and manage repositories, branches, commit history, users, organizations, and permissions. Connect AI agents to Sourcegraph's code intelligence via the MCP Server for natural language search, file reading, and repository listing.
Common questions about connecting Sourcegraph to AI agents with Metorial.