search_code
Search code snippets across CERN GitLab repositories to find usage examples of libraries, functions, or patterns. Search globally or within specific projects with line-level context.
Instructions
Search for code snippets across CERN GitLab repositories. Can search globally across all public projects or within a specific project. Returns matching files with line-level context. Useful for finding usage examples of specific libraries, functions, or patterns.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search_term | Yes | The code or text to search for | |
| project | No | Optional: limit search to a specific project. Either a numeric ID or path (e.g. 'atlas/athena'). If omitted, searches across all public projects. | |
| scope | No | Search scope: 'blobs' searches file content (default), 'filenames' searches only file names | |
| ref | No | Optional: Git branch or tag to search within. If omitted, uses the default_ref from configuration (or searches all branches if not configured). | |
| per_page | No | Number of results to return (default: 20, max: 100) | |
| page | No | Page number to retrieve (default: 1) |