Skip to main content
Glama

inspect_mount

Preview what a mount sync would change without modifying anything: list files to transfer, cluster-only paths, and stale uploads so deletions can be reviewed before syncing.

Instructions

Report what syncing a mount would change, without changing anything.

Read-only: this never transfers, deletes, or creates anything on the
cluster. Call it freely, including before a sync you are unsure about.

Its main job is answering a question ``sync_files`` cannot: **what is on the
cluster that no longer exists locally?** A sync is additive, so those files
stay — including code deleted in a local refactor, which a job on the
cluster can still import and run. They are listed here as
``mirror_delete_candidate_paths``.

Those candidates mix two kinds of thing:

* **produced by jobs** — checkpoints, logs, outputs. Must NOT be deleted.
* **left over locally** — stale modules, renamed files. Usually should be.

``stale_upload_paths`` is the second group on its own: paths srunx recorded
uploading that are no longer present locally. Job output was never uploaded,
so it does not appear there — which holds even when the mount's exclude list
misses an output directory, the case that otherwise buries a few stale
scripts among dozens of artifacts.

One exception: output pulled into the local tree with ``srunx cluster sync
--pull`` becomes a file the next push manages, so it is recorded like any
other and can be reported as stale once its local copy is removed. Excluding
the output directories on the mount avoids that, and is worth doing anyway.

**Check ``stale_uploads_known`` first.** When it is false the record could
not answer (nothing uploaded with tracking yet, an unreadable record, or a
changed exclude filter), and ``stale_uploads: 0`` means "could not tell",
not "nothing is stale" — ``stale_uploads_unknown_reason`` says which. Fall
back to reading the full candidate list yourself in that case.

Args:
    cluster: SSH cluster name (see ``list_clusters``). Required.
    project: Project root (directory holding ``.srunx/config.toml``)
        whose mounts are used. Required.
    mount: Mount name from that project on that cluster.
    max_paths: Cap on how many paths to list. Counts stay exact regardless;
        past the cap the list is omitted rather than shortened, and
        ``mirror_delete_candidate_paths_omitted`` says so.

Returns:
    ``files_would_transfer``, ``mirror_delete_candidates`` (a count),
    ``mirror_delete_candidate_paths``, whether that list was omitted,
    ``effective_exclude_patterns``, and the stale-upload fields described
    above (``stale_uploads_known`` / ``stale_uploads`` /
    ``stale_upload_paths`` / ``stale_uploads_unknown_reason``).

    The exclude list matters for reading the result: excluded paths are
    invisible to this inspection *and* protected from a mirror's deletions,
    so something absent from the candidates may simply be excluded rather
    than in sync.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cluster": "<cluster>",
      "project": "<project>",
      "mount": "<mount>"
    },
    "name": "inspect_mount"
  }
}

Input Schema

NameRequiredDescriptionDefault
mountYes
clusterYes
projectYes
max_pathsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv6.0.0
    • addedInput schema / properties / cluster
      Added value: +{
      +  "title": "Cluster",
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "title": "Project",
      +  "type": "string"
      +}
    • removedInput schema / properties / transport
      Removed value: -{
      -  "title": "Transport",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "transport",
      -  "mount"
      -]New value: +[
      +  "cluster",
      +  "project",
      +  "mount"
      +]
  2. Addedv4.0.1

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: it declares the operation read-only and guarantees nothing is transferred, deleted, or created. It also discloses non-obvious behaviors — that a sync is additive, that job-produced artifacts can appear as delete candidates but must not be deleted, the --pull exception, and that excluded paths are invisible to the inspection while also being protected from deletion.

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

Conciseness4/5

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

The core purpose and the read-only guarantee are front-loaded, and the bold callouts plus bullets make the result fields scannable. It is nonetheless long for a single tool, and the pull/complementary-exclude discussion and the closing exclude-pattern paragraph restate related points that could be tightened.

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?

Although an output schema exists, the description adds the interpretive layer an agent actually needs: which fields distinguish 'could not tell' from 'nothing is stale', why counts remain exact when lists are omitted, and how the exclude filter can produce false-negative candidate lists. Nothing needed to call or correctly interpret this tool is missing.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must supply meaning, and it does for all four: cluster (SSH cluster name, see list_clusters), project (root holding .srunx/config.toml), mount (name within that project/cluster), and max_paths (cap on listed paths while counts stay exact, with the list omitted rather than truncated past the cap). It stops short of format examples (e.g., path style for project/mount), so not quite maximal.

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?

States a specific verb and resource ('Report what syncing a mount would change') and immediately scopes it as a dry-run by adding 'without changing anything.' It also names the sibling it differs from ('a question sync_files cannot'), so an agent can separate the two without inspecting schemas.

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?

Gives explicit when-to-use guidance ('Call it freely, including before a sync you are unsure about') and an explicit alternative trigger ('Fall back to reading the full candidate list yourself' when stale_uploads_known is false). The relationship to sync_files is spelled out rather than implied.

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