Skip to main content
Glama

create_repository_snapshot

Idempotent

Create an immutable, content-hashed snapshot of a repository for later triage and graph queries. Reuses existing snapshots when inputs match, preventing duplication.

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. Use get_repository_snapshot to fetch an existing snapshot by id instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoGit ref to snapshot; defaults to the connector's default ref.
max_filesNoFile-count cap, up to 200000; defaults to 20000.
repository_idYesSaved repository connector id from list_connectors.
exclude_patternsNoGlob patterns excluding files from the snapshot.
include_patternsNoGlob patterns limiting which files are snapshotted.
max_file_size_bytesNoPer-file size cap in bytes, 1024-10000000; defaults to 1000000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.3
    • addedInput schema / properties / exclude_patterns / description
      Added value: +"Glob patterns excluding files from the snapshot."
    • addedInput schema / properties / include_patterns / description
      Added value: +"Glob patterns limiting which files are snapshotted."
    • addedInput schema / properties / max_file_size_bytes / description
      Added value: +"Per-file size cap in bytes, 1024-10000000; defaults to 1000000."
    • addedInput schema / properties / max_files / description
      Added value: +"File-count cap, up to 200000; defaults to 20000."
    • addedInput schema / properties / ref / description
      Added value: +"Git ref to snapshot; defaults to the connector's default ref."
    • addedInput schema / properties / repository_id / description
      Added value: +"Saved repository connector id from list_connectors."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses important behavior beyond the annotations: it reads the repository, persists snapshot/symbol/dependency artifacts, never writes to the repository, is idempotent with a status='existing' result, and returns specific fields. This is rich, non-obvious context that an agent cannot derive from readOnlyHint=false, idempotentHint=true, or destructiveHint=false. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence earns its place: it covers purpose, idempotent behavior, downstream consumers, side effects, return contents, and the alternative tool. The key scoping statement is front-loaded, and no filler or redundant phrasing is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema present, the description appropriately explains return values (snapshot_id, resolved_revision, content_hash, file_count, language_counts, and artifact refs), mentions the snapshot status behavior, names downstream consumers, and identifies prerequisite connector lookup. There are no significant gaps affecting correct selection or invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter is already documented in the input schema. The description mostly restates the repository_id source ('find its id with list_connectors') but adds no new parameter semantics beyond what the schema provides. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('create or reuse') and resource ('immutable, content-hashed snapshot of a saved repository connector'), and distinguishes the tool from its sibling get_repository_snapshot by explicitly noting that one fetches an existing snapshot by id. An agent can clearly tell what this tool does and how it differs from nearby alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit guidance on when to use this tool: it is the input to triage_repository and query_repository_graph, re-running with identical inputs reuses the existing snapshot, and the alternative get_repository_snapshot is identified for fetching by id. It also names a prerequisite step, finding the connector id with list_connectors.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools