create_repository_snapshot
Generate a content-hashed, immutable snapshot of a saved repository for triage and graph queries; reuses existing snapshots on identical inputs and never modifies the repository.
Instructions
Create or reuse an immutable, content-hashed snapshot of a saved repository connector (a connector of a repository type — find its id with list_connectors). Re-running with identical inputs returns the existing snapshot (status='existing') instead of duplicating it. The snapshot is the input to triage_repository and query_repository_graph; every later stage references it by snapshot_id. Reads the repository and persists snapshot, symbol, and dependency graph artifacts; it never writes to the repository. Returns snapshot_id, resolved_revision, content_hash, file_count, language_counts, and artifact refs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Git ref to snapshot; defaults to the connector's default ref. | |
| max_files | No | File-count cap, up to 200000; defaults to 20000. | |
| repository_id | Yes | Saved repository connector id from list_connectors. | |
| exclude_patterns | No | Glob patterns excluding files from the snapshot. | |
| include_patterns | No | Glob patterns limiting which files are snapshotted. | |
| max_file_size_bytes | No | Per-file size cap in bytes, 1024-10000000; defaults to 1000000. |