Skip to main content
Glama

inspect_mount

Report what syncing a mount would change, without changing anything. Distinguish job-produced artifacts from stale files to prevent data loss.

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 ssh 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:
    transport: SSH profile name to inspect. Required — there is no local
        inspection, and (unlike the CLI) no implicit current-profile
        fallback. Call ``list_ssh_profiles`` for the available profiles and
        the mounts each defines.
    mount: Mount name from that SSH profile.
    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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mountYes
max_pathsNo
transportYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden, and it excels: it declares read-only behavior, explains the max_paths cap behavior (counts stay exact, list omitted), clarifies the effect of exclude patterns ('invisible to this inspection and protected from a mirror's deletions'), and details the stale-upload semantics including the failure case (stale_uploads_unknown_reason).

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 description is lengthy but well-structured: bold key concepts, clear headings for args and returns, and each paragraph addresses a distinct concern (read-only, candidates, stale uploads, exclusion). The core purpose is front-loaded. While it is verbose, no sentences are wasted; it earns its length for a complex inspection tool.

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?

Even though an output schema exists (per context signal), the description explicitly lists every return field and their meaning, explains edge cases (stale_uploads_known false, max_paths omission, exclusion invisibility), and provides fallback guidance. For a tool with this complexity, the description leaves nothing an agent needs to know to call and interpret it correctly.

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

Parameters5/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 fully explain parameters. It does: transport is described as an SSH profile name with no implicit fallback, mount is tied to that profile, and max_paths is given with its cap behavior (counts exact, list omitted if exceeded). This adds meaning far beyond the simple schema definitions.

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 opens with a precise verb+resource ('Report what syncing a mount would change') and immediately distinguishes itself from sync_files by stating it cannot answer what is on the cluster that no longer exists locally. This makes the tool's unique purpose unmistakable and differentiates it from siblings.

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?

It explicitly states when to call ('before a sync you are unsure about'), how to call safely ('Call it freely'), and provides a decision rule: check stale_uploads_known first, and fall back to reading the full candidate list if it is false. It also names sibling tools like list_ssh_profiles for parameter guidance, covering both when and how to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ksterx/srunx'

If you have feedback or need assistance with the MCP directory API, please join our Discord server