Claude skill · cast

summarize-galaxy-tool

Pull JSON schema, container, source, inputs/outputs for a Galaxy tool.

← All cast skills · Source mold →

Install

/plugin marketplace add galaxyproject/foundry
/plugin install foundry-skills@galaxy-workflow-foundry

Then invoke as:

/foundry-skills:summarize-galaxy-tool

Skill Bundle

/ packaged cast
attached files
8
upfront
4
on demand
4
cast rev
n/a
validated
0

Produces: 1 artifact.

Consumes: 1 artifact.

Artifact Contract

/ skill handoff

Produces

galaxy-tool-summary

Deterministic Galaxy tool summary manifest emitted by `galaxy-tool-cache summarize`: cache provenance, embedded ParsedTool, generated input JSON Schemas.

jsongalaxy-tool-summary.json[[galaxy-tool-summary]]
Raw artifact contract
{
  "id": "galaxy-tool-summary",
  "kind": "json",
  "default_filename": "galaxy-tool-summary.json",
  "schema": "[[galaxy-tool-summary]]",
  "description": "Deterministic Galaxy tool summary manifest emitted by `galaxy-tool-cache summarize`: cache provenance, embedded ParsedTool, generated input JSON Schemas."
}

Consumes

galaxy-tool-pin

Pin identifying which cached ParsedTool to summarize: a Tool Shed pin from [[discover-shed-tool]] (owner/repo/tool + version), or a bare/stock id for a built-in Galaxy tool (e.g. `Filter1`, `Cut1`, collection ops) that resolves against the shed by the bare id. Authored UDTs from [[author-galaxy-tool-wrapper]] bypass this Mold.

Raw artifact contract
{
  "id": "galaxy-tool-pin",
  "description": "Pin identifying which cached ParsedTool to summarize: a Tool Shed pin from [[discover-shed-tool]] (owner/repo/tool + version), or a bare/stock id for a built-in Galaxy tool (e.g. `Filter1`, `Cut1`, collection ops) that resolves against the shed by the bare id. Authored UDTs from [[author-galaxy-tool-wrapper]] bypass this Mold.",
  "inherited_schema": "[[galaxy-tool-discovery]]",
  "producers": [
    "discover-shed-tool"
  ]
}

Attached Files

/ runtime references

Load upfront

cli-command

summarize

packaged

Emit the deterministic [[galaxy-tool-summary]] manifest for the cached pin; this Mold runs the command rather than hand-authoring the manifest.

Trigger: Once the pin is confirmed present in the cache.

upfront runtime sidecar corpus-observed deterministic 3.6 KB
bundle
references/cli/summarize.json
source
content/cli/galaxy-tool-cache/summarize.md
Preview json
{
  "type": "cli-command",
  "tool": "galaxy-tool-cache",
  "command": "summarize",
  "summary": "Emit a deterministic galaxy-tool-summary manifest (cache provenance + embedded ParsedTool + generated input JSON Schemas) for a cached tool.",
  "source_path": "content/cli/galaxy-tool-cache/summarize.md",
  "source_revision": 2,
  "package": "@galaxy-tool-util/cli",
  "description": "Emit a deterministic summary manifest for a cached Galaxy tool",
  "synopsis": "galaxy-tool-cache summarize [options] <tool_id>",
  "args": [
    {
      "raw": "tool_id",
      "name": "tool_id",
      "required": true,
      "variadic": false,
      "description": "Tool ID"
    }
  ],
  "options": [
    {
      "flags": "--tool-version <ver>",
      "name": "toolVersion",
      "description": "Tool version",
      "takesArgument": true,
      "argumentPlaceholder": "<ver>",
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--output <file>",
      "name": "output",
      "description": "Output file (default: stdout)",
      "takesArgument": true,
      "argumentPlaceholder": "<file>",
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--cache-dir <dir>",
      "name": "cacheDir",
      "description": "Cache directory",
      "takesArgument": true,
      "argumentPlaceholder": "<dir>",
      "optionalArgument": false,
      "negatable": false
    }
  ],
  "body": "# `galaxy-tool-cache summarize`\n\nEmit a deterministic summary manifest for a tool already in the cache. This is the command [[summarize-galaxy-tool]] invokes: it does not hand-author the manifest, it runs `summarize` against a cache populated for the pin (see `add`). The cache entry must exist — `summarize` does not re-fetch; cache the pin with `add` first.\n\n`<tool_id>` plus `--tool-version` select the cached entry; they must match the pin used at `add` time and the cache key, or the wrong wrapper is summarized. `<tool_id>` accepts a full Tool Shed path, a TRS id, or a **bare/stock id** for built-in tools (`Show beginning1`, `Cut1`, …) — the same id form used at `add` time. A cache miss reports `Tool not found in cache: <id>. Run 'galaxy-tool-cache add' first.`\n\n## Output\n\nA single JSON document conforming to [[galaxy-tool-summary]]. Top-level fields: `schema_version`, `tool_id`, `tool_version`, `cache_key`, `source`, `artifacts`, `parsed_too
...
cli-tool

galaxy-tool-cache

packaged

Runtime that emits the tool summary; the Mold's entire job is invoking it against a populated cache. Install before driving the skill.

upfront runtime verbatim corpus-observed deterministic 1.6 KB
bundle
references/cli/galaxy-tool-cache.md
source
content/cli/galaxy-tool-cache/index.md
Preview md
---
type: cli-tool
tool: galaxy-tool-cache
origin: npm
package: "@galaxy-tool-util/cli"
package_version: "^1.8.1"
invoke: galaxy-tool-cache
invoke_fallback: "npx --yes --package @galaxy-tool-util/cli@1.8.1 galaxy-tool-cache"
availability_check: "galaxy-tool-cache --help | grep -q summarize"
docs_url: "https://github.com/jmchilton/galaxy-tool-util-ts/tree/main/packages/cli"
tags:
  - cli-tool
  - cli/galaxy-tool-cache
status: draft
created: 2026-06-16
revised: 2026-06-18
revision: 2
ai_generated: true
summary: "Cache and inspect Galaxy tool metadata (fetch from ToolShed, summarize ParsedTool, export input JSON Schema)."
---

# galaxy-tool-cache

Fetches Galaxy tool metadata from the Tool Shed, caches the parsed wrapper locally, and inspects it. Bundled with `@galaxy-tool-util/cli` alongside [[gxwf]]; subcommand pages cover individual operations. The cache is the input source for [[summarize-galaxy-tool]] — `summarize` reads an already-cached pin, so populate the cache first with `add` (single pin) or `populate-workflow` (every tool a draft references). Both Tool Shed wrappers and stock/built-in tools resolve against the shed; `list` enumerates what a cache holds and at which versions.

## Install

`npx --yes --package @galaxy-tool-util/cli@1.8.1 galaxy-tool-cache <subcommand>` runs without a global install. For repeat use, `npm install -g @galaxy-tool-util/cli@1.8.1`. The `@1.8.1` pin matches [[gxwf]] (same npm package), tracks the `^1.8.1` devDependency in the repo `package.json` / `pnpm-lock.yaml`, and is the floor for stock/built-in tool resolution (bare ids).
research

galaxy-tool-summary-input-source

packaged

Treat cached ParsedTool JSON from galaxy-tool-cache as the v1 input source for Galaxy tool summaries.

upfront runtime verbatim hypothesis deterministic 2.3 KB
bundle
references/notes/galaxy-tool-summary-input-source.md
source
content/research/galaxy-tool-summary-input-source.md
Preview md
---
type: research
subtype: design-spec
title: "Galaxy tool summary input source"
tags:
  - research/design-spec
  - target/galaxy
status: draft
created: 2026-05-03
revised: 2026-05-03
revision: 2
ai_generated: true
related_notes:
  - "[[component-tool-shed-search]]"
related_molds:
  - "[[discover-shed-tool]]"
  - "[[summarize-galaxy-tool]]"
summary: "Decides that summarize-galaxy-tool reads cached ParsedTool JSON as its v1 input source."
---

# Galaxy Tool Summary Input Source

## Decision

`summarize-galaxy-tool` reads `galaxy-tool-cache` ParsedTool JSON populated from the Tool Shed pin emitted by `discover-shed-tool`.

The v1 handoff is:

1. `discover-shed-tool` emits `(tool_shed_url, owner, repo, tool_id, version, changeset_revision)` plus confidence evidence.
2. The harness or caller runs `galaxy-tool-cache add toolshed.g2.bx.psu.edu/repos/<owner>/<repo>/<tool_id> --tool-version <version>` using the chosen pin.
3. `summarize-galaxy-tool` loads the cached ParsedTool JSON and emits the Foundry-owned Galaxy tool summary schema once that schema exists.

## Rationale

This source is already implied by the discovery chain and avoids making `summarize-galaxy-tool` repeat Tool Shed search, version selection, or Mercurial materialization.

ParsedTool JSON is better than raw XML as the primary input because it exposes a normalized parse surface for inputs, outputs, requirements, tests, and command/source metadata. Raw XML remains supporting evidence only when the parsed object is lossy or ambiguous.

Galaxy API input is deferred. It is useful for installed-only tools and instance-local wrappers, but it changes the trust and availability model: the result depends on a configured Galaxy instance instead of the Tool Shed pin selected by `discover-shed-tool`.

## Non-Goals

- Do
...
schema

galaxy-tool-summary

packaged

Validate the manifest emitted by `galaxy-tool-cache summarize` before handing it to downstream step Molds.

upfront runtime verbatim corpus-observed deterministic 7.6 KB
bundle
references/schemas/galaxy-tool-summary.schema.json
source
package://@galaxy-foundry/foundry#galaxyToolSummarySchema
Preview json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://galaxyproject.org/foundry/schemas/galaxy-tool-summary.schema.json",
  "$comment": "Canonical source: packages/foundry/src/schemas/galaxy-tool-summary/galaxy-tool-summary.schema.json in galaxyproject/foundry. Mold frontmatter cites this as `content/schemas/galaxy-tool-summary.schema.json` for stability; the cast pipeline and Astro site resolve that ref back to this file at build time. The `$defs.ParsedTool` definition is a placeholder that the AJV validator replaces at compile time with the upstream `parsedToolSchema` from `@galaxy-tool-util/schema`. Static consumers that do not use the validator should consult `[[parsed-tool]]` for the upstream definition.",
  "title": "Galaxy Tool Summary",
  "description": "Deterministic per-tool manifest emitted by `galaxy-tool-cache summarize`. Bundles cache provenance, the upstream `ParsedTool` payload, and per-representation input JSON Schemas so downstream Molds can bind a single workflow step against a Galaxy tool wrapper without re-parsing XML.",
  "$ref": "#/$defs/GalaxyToolSummary",
  "$defs": {
    "GalaxyToolSummary": {
      "title": "GalaxyToolSummary",
      "description": "Top-level shape. Every Galaxy tool summary is exactly this object.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schema_version",
        "tool_id",
        "tool_version",
        "cache_key",
        "source",
        "artifacts",
        "parsed_tool",
        "input_schemas",
        "warnings"
      ],
      "properties": {
        "schema_version": {
          "type": "integer",
          "const": 1,
          "description": "Manifest schema version. v1 is the shape emitted by `galaxy-tool-cache summarize` in `@galaxy-tool-util/cli@1.3.x`."
        },
        "tool_id": {
          "type": "string",
          "minLength": 1,
          "description": "Tool id as it appears in the cached `ParsedTool`. For Tool Shed wrappers this is the short XML id, not the fully qualified `toolshed.g2.bx.psu.edu/repos/...` form."
        },
        "tool_version": {
          "type": [
            "string",
            "null"
          ],
          "description": "Tool version from the cached `ParsedTool`. Null only when the wrapper itself omits a version."
        },
        "cache_key": {
          "type": "string",
          "mi
...

Load on demand

cli-command

add

packaged

Cache-population precondition: `summarize` reads an already-cached pin and fails if missing, so `add` fetches the pin into the cache first. Stock/built-in bare ids resolve against the shed but need an explicit `--tool-version`.

Trigger: When the requested pin is not yet present in the configured cache directory.

on-demand runtime sidecar corpus-observed deterministic 4.0 KB
bundle
references/cli/add.json
source
content/cli/galaxy-tool-cache/add.md
Preview json
{
  "type": "cli-command",
  "tool": "galaxy-tool-cache",
  "command": "add",
  "summary": "Fetch a tool from the Tool Shed (shed-path or bare/stock id) and cache its ParsedTool locally for later summarize/schema.",
  "source_path": "content/cli/galaxy-tool-cache/add.md",
  "source_revision": 2,
  "package": "@galaxy-tool-util/cli",
  "description": "Fetch a tool from the ToolShed (shed-path or bare/stock ID) and cache it",
  "synopsis": "galaxy-tool-cache add [options] <tool_id>",
  "args": [
    {
      "raw": "tool_id",
      "name": "tool_id",
      "required": true,
      "variadic": false,
      "description": "Tool ID: shed path (owner/repo/tool), TRS ID, or bare/stock ID (e.g. Filter1)"
    }
  ],
  "options": [
    {
      "flags": "--tool-version <ver>",
      "name": "toolVersion",
      "description": "Tool version",
      "takesArgument": true,
      "argumentPlaceholder": "<ver>",
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--cache-dir <dir>",
      "name": "cacheDir",
      "description": "Cache directory",
      "takesArgument": true,
      "argumentPlaceholder": "<dir>",
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--galaxy-url <url>",
      "name": "galaxyUrl",
      "description": "Alternate Galaxy source, tried after the ToolShed",
      "takesArgument": true,
      "argumentPlaceholder": "<url>",
      "optionalArgument": false,
      "negatable": false
    }
  ],
  "body": "# `galaxy-tool-cache add`\n\nFetch a single tool by id from the Tool Shed and cache its parsed wrapper into the local cache directory. This is the cache-population precondition for [[summarize-galaxy-tool]]: `summarize` reads an already-cached pin and fails if the entry is missing, so `add` runs first.\n\n`<tool_id>` is a full Tool Shed path (e.g. `toolshed.g2.bx.psu.edu/repos/iuc/staramr/staramr_search`), a TRS id, **or a bare/stock id** for a built-in Galaxy tool (`Filter1`, `sort1`, `Cut1`, `Show beginning1`, collection ops). The Tool Shed serves stock tools too, so bare ids resolve against the same shed source — there is no separate Galaxy lookup in the default path. Pin the exact wrapper with `--tool-version` so the cache key matches the discovery pin from [[discover-shed-tool]].\n\nTo cache every tool a draft references in one pass instead of pin-by-pin, use `populate-workflow`
...
cli-command

list

packaged

Discover the concrete cached version of a stock/built-in bare id before `add`/`summarize`, since the shed's TRS version-list endpoint can't auto-resolve it; never hand-guess a stock version.

Trigger: When the pin is a bare/stock id (no owner/repo) and its concrete version isn't already known.

on-demand runtime sidecar corpus-observed deterministic 2.6 KB
bundle
references/cli/list.json
source
content/cli/galaxy-tool-cache/list.md
Preview json
{
  "type": "cli-command",
  "tool": "galaxy-tool-cache",
  "command": "list",
  "summary": "Enumerate the tools in a cache directory with their resolved versions; the surface for confirming which stock/shed pin got cached.",
  "source_path": "content/cli/galaxy-tool-cache/list.md",
  "source_revision": 1,
  "package": "@galaxy-tool-util/cli",
  "description": "List cached tools with their resolved versions",
  "synopsis": "galaxy-tool-cache list [options]",
  "args": [],
  "options": [
    {
      "flags": "--json",
      "name": "json",
      "description": "Output as JSON",
      "takesArgument": false,
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--cache-dir <dir>",
      "name": "cacheDir",
      "description": "Cache directory",
      "takesArgument": true,
      "argumentPlaceholder": "<dir>",
      "optionalArgument": false,
      "negatable": false
    }
  ],
  "body": "# `galaxy-tool-cache list`\n\nEnumerate the entries in a `--cache-dir` with their resolved versions, ids, and provenance. Read-only — `list` never fetches; it reports what `add` / `populate-workflow` already cached.\n\nThis is the version-confirmation surface for the cache: after `add` resolves a pin, `list` shows the concrete `tool_version` it stored — including for **stock/built-in** ids, whose version is otherwise hard to confirm while the shed's TRS version-list endpoint is down (see [[add]]). Discovery of a not-yet-cached stock version still depends on a populated cache or a known pin; `list` reports an empty array for an empty cache, it does not synthesize the shed's catalogue.\n\n## Output\n\nHuman-readable rows by default; `--json` emits an array of cache entries. Per-entry JSON fields: `cache_key`, `tool_id`, `tool_version`, `source` (`api` for shed-fetched, `local` for a pre-seeded tree), `source_url`, `cached_at`. For a stock tool the `tool_id` carries the shed `readableId` form (e.g. `toolshed.g2.bx.psu.edu/repos/Filter1`) while the bare id still selects it in `summarize` / `schema`.\n\n## Examples\n\n```bash\ngalaxy-tool-cache list --json --cache-dir ~/.cache/gxwf\n# [ { \"tool_id\": \"toolshed.g2.bx.psu.edu/repos/Filter1\", \"tool_version\": \"1.1.1\",\n#     \"source\": \"api\", \"source_url\": \".../api/tools/Filter1/versions/1.1.1\", ... } ]\n```\n\n## Gotchas\n\n- `list` only sees the `--cache-dir` it is pointed at. A versio
...
research

component-tool-shed-search

packaged

Resolve Galaxy tool identity, Tool Shed versioning, and changeset context before summarizing a wrapper.

Trigger: When a tool summary starts from a Tool Shed hit rather than an installed Galaxy tool object.

on-demand runtime verbatim corpus-observed deterministic 27.1 KB
bundle
references/notes/component-tool-shed-search.md
source
content/research/component-tool-shed-search.md
Preview md
---
type: research
subtype: component
tags:
  - research/component
component: "Tool Shed Search and Indexing"
status: draft
created: 2026-04-30
revised: 2026-05-03
revision: 2
ai_generated: true
summary: "Tool Shed's Whoosh repo/tool search and partial GA4GH TRS v2, indexed from hg-walked metadata with no auto-refresh on upload"
related_notes:
  - "[[galaxy-tool-summary-input-source]]"
  - "[[tool-search]]"
  - "[[tool-versions]]"
  - "[[tool-revisions]]"
  - "[[discover-shed-tool]]"
---

# Galaxy Tool Shed — Search, Indexing, and TRS APIs: Current State

## 1. Architecture primer

The Galaxy Tool Shed is a standalone web application that hosts and serves Galaxy tool wrappers (XML tool definitions plus helper files) to Galaxy servers for installation. Its server code lives under `lib/tool_shed/` in the Galaxy monorepo, sharing model/security/tool-parsing libraries with Galaxy itself but running as its own FastAPI application (`lib/tool_shed/webapp/fast_app.py`, with route modules under `lib/tool_shed/webapp/api2/`). The legacy web framework is almost gone — only `lib/tool_shed/webapp/controllers/hg.py` survives, because the Tool Shed also serves each repository's Mercurial working copy over HTTP for `hg clone`.

A **repository** is the unit of distribution in the Tool Shed: it is a named, owned Mercurial repository (the Tool Shed still runs on `hg`, not `git` — see `mercurial` imports in `lib/tool_shed/util/shed_index.py:4` and `lib/tool_shed/managers/repositories.py:471` onward). A repository has a `name`, an owner (`User.username`), a `type` (e.g. `unrestricted`, `repository_suite_definition`, `tool_dependency_definition` — see `lib/tool_shed/repository_types/`), optional `description`/`long_description`/`homepage_url`/`remote_repository_url`, and a set of categories 
...
schema

parsed-tool

packaged

Resolve field-level questions about the upstream `ParsedTool` payload embedded under `parsed_tool`.

Trigger: When a downstream Mold needs a specific input/output/help/citation field from the embedded `ParsedTool`.

on-demand runtime verbatim corpus-observed deterministic 21.5 KB
bundle
references/schemas/parsed-tool.schema.json
source
package://@galaxy-tool-util/schema#parsedToolSchema
Preview json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": [
    "id",
    "version",
    "name",
    "description",
    "inputs",
    "outputs",
    "citations",
    "license",
    "profile",
    "edam_operations",
    "edam_topics",
    "xrefs"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "outputs": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "required": [
              "name",
              "label",
              "hidden",
              "type",
              "format",
              "format_source",
              "metadata_source",
              "discover_datasets",
              "from_work_dir",
              "precreate_directory"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "label": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "hidden": {
                "type": "boolean"
              },
              "type": {
                "type": "string",
                "enum": [
                  "data"
                ]
              },
              "format": {
                "type": "string"
              },
              "format_source": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "metadata_source": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "discover_datasets": {
        
...

SKILL.md


# summarize-galaxy-tool

Follow the procedure below and use the artifact/reference sections as the runtime contract.

## When To Use

- Pull JSON schema, container, source, inputs/outputs for a Galaxy tool.

## Inputs

- Read artifact `galaxy-tool-pin`. Schema: galaxy-tool-discovery. Produced by `discover-shed-tool`. Pin identifying which cached ParsedTool to summarize: a Tool Shed pin from discover-shed-tool (owner/repo/tool + version), or a bare/stock id for a built-in Galaxy tool (e.g. `Filter1`, `Cut1`, collection ops) that resolves against the shed by the bare id. Authored UDTs from author-galaxy-tool-wrapper bypass this Mold.

## Outputs

- Write artifact `galaxy-tool-summary` as `galaxy-tool-summary.json`. Format: `json`. Schema: galaxy-tool-summary. Deterministic Galaxy tool summary manifest emitted by `galaxy-tool-cache summarize`: cache provenance, embedded ParsedTool, generated input JSON Schemas.

## Required Tools

- **`galaxy-tool-cache`** (galaxy-tool-cache). `npm install -g @galaxy-tool-util/cli@^1.8.1`.
  Ephemeral run: `npx --yes --package @galaxy-tool-util/cli@1.8.1 galaxy-tool-cache`.
  Check: `galaxy-tool-cache --help | grep -q summarize`.
  Docs: https://github.com/jmchilton/galaxy-tool-util-ts/tree/main/packages/cli
  Bundled reference: `references/cli/galaxy-tool-cache.md`.

## Load Upfront

- `references/cli/summarize.json`: CLI command reference packaged as a sidecar. Emit the deterministic galaxy-tool-summary manifest for the cached pin; this Mold runs the command rather than hand-authoring the manifest. Use when: once the pin is confirmed present in the cache.
- `references/cli/galaxy-tool-cache.md`: CLI tool reference copied verbatim into the bundle. Runtime that emits the tool summary; the Mold's entire job is invoking it against a populated cache. Install before driving the skill.
- `references/notes/galaxy-tool-summary-input-source.md`: Research note copied verbatim into the bundle. Treat cached ParsedTool JSON from galaxy-tool-cache as the v1 input source for Galaxy tool summaries.
- `references/schemas/galaxy-tool-summary.schema.json`: Schema file copied verbatim into the bundle. Validate the manifest emitted by `galaxy-tool-cache summarize` before handing it to downstream step Molds.

## Load On Demand

- `references/cli/add.json`: CLI command reference packaged as a sidecar. Cache-population precondition: `summarize` reads an already-cached pin and fails if missing, so `add` fetches the pin into the cache first. Stock/built-in bare ids resolve against the shed but need an explicit `--tool-version`. Use when: the requested pin is not yet present in the configured cache directory.
- `references/cli/list.json`: CLI command reference packaged as a sidecar. Discover the concrete cached version of a stock/built-in bare id before `add`/`summarize`, since the shed's TRS version-list endpoint can't auto-resolve it; never hand-guess a stock version. Use when: the pin is a bare/stock id (no owner/repo) and its concrete version isn't already known.
- `references/notes/component-tool-shed-search.md`: Research note copied verbatim into the bundle. Resolve Galaxy tool identity, Tool Shed versioning, and changeset context before summarizing a wrapper. Use when: a tool summary starts from a Tool Shed hit rather than an installed Galaxy tool object.
- `references/schemas/parsed-tool.schema.json`: Schema file copied verbatim into the bundle. Resolve field-level questions about the upstream `ParsedTool` payload embedded under `parsed_tool`. Use when: a downstream Mold needs a specific input/output/help/citation field from the embedded `ParsedTool`.

## Validation

- Validate `galaxy-tool-summary.json` before returning it: run `foundry galaxy-tool-summary.json` from `@galaxy-foundry/foundry`. If the command is not on PATH, run `npx --package @galaxy-foundry/foundry foundry galaxy-tool-summary.json`. This checks artifact `galaxy-tool-summary` against the galaxy-tool-summary schema.

## Procedure

Read a cached Galaxy `ParsedTool` object for an existing wrapper and emit a compact tool summary that downstream step implementation can bind to. This skill runs after discover-shed-tool has selected a Tool Shed pin and after the caller has populated `galaxy-tool-cache` for that pin.

This skill owns the **wrapper summarization** step only. It does not search the Tool Shed, choose a version, author XML, or decide how a workflow step should use the wrapper. Its job is to preserve the wrapper's executable contract: identity, command shape, inputs, outputs, requirements, tests, and any conditional or data-table behavior that could affect binding.

The v1 input-source decision is galaxy-tool-summary-input-source: read cached ParsedTool JSON, using raw XML only as supporting evidence when the cache object is lossy or ambiguous.

### Inputs

The skill expects:

- A Tool Shed pin from discover-shed-tool: `tool_shed_url`, `owner`, `repo`, `tool_id`, `version`, and `changeset_revision`; **or** a bare/stock id for a built-in tool (`Filter1`, `Cut1`, `Show beginning1`, collection ops, `__APPLY_RULES__`) plus a concrete version.
- A `galaxy-tool-cache` directory containing the cached ParsedTool JSON for that pin.
- Optional raw XML source for ambiguity checks, normally fetched through cache metadata rather than treated as the primary input.
- Optional step intent from the caller, used only to prioritize which wrapper details to explain; it must not change the wrapper facts.

### Outputs

A single JSON document conforming to galaxy-tool-summary — the deterministic manifest emitted by `galaxy-tool-cache summarize` from `@galaxy-tool-util/cli`. Top-level fields: `schema_version`, `tool_id`, `tool_version`, `cache_key`, `source`, `artifacts`, `parsed_tool`, `input_schemas`, `warnings`. The `parsed_tool` subtree is the upstream parsed-tool payload verbatim; `input_schemas.workflow_step` and `input_schemas.workflow_step_linked` carry generated JSON Schemas describing the tool's inputs at workflow-step authoring time.

This skill does not hand-author the manifest — it invokes `galaxy-tool-cache summarize` against a cache populated for the Tool Shed pin. Wrapper-derived facts that are not yet exposed by upstream `ParsedTool` (currently: requirements, containers, stdio) flow into the manifest additively as Galaxy upstream extends `ParsedTool`; no Foundry-side schema change is needed when they ship.

### Procedure

#### 1. Load the cached wrapper

Locate the ParsedTool JSON in the configured `galaxy-tool-cache` directory using the Tool Shed pin. `galaxy-tool-cache summarize` reads an already-cached pin — it does not re-fetch — so the pin must be cached first via add (single pin) or `populate-workflow` (the loop driver's whole-draft form). If the cache entry is missing, run add for the pin rather than silently re-searching the Tool Shed; fail early if `add` cannot resolve it.

Confirm the cached identity matches the requested pin. If the cache exposes a tool id or version that conflicts with the pin, emit a hard failure rather than summarizing the wrong wrapper.

**Built-in / stock tools.** When the pin is a bare/stock id (no `owner/repo` — `Filter1`, `Cut1`, `Show beginning1`, collection ops, `__APPLY_RULES__`), the same cache flow applies with the bare id: add fetches it from the Tool Shed by the bare id and summarize reads it back. The shed's TRS version-list endpoint can't auto-resolve a stock version, so pass an explicit `--tool-version` to both. Discover that concrete version from a populated cache via list (or a known pin carried in the step plan) — **never hand-guess a stock version**. If no concrete version can be resolved from the cache or a known pin, surface it as an unmet requirement rather than inventing one.

#### 2. Capture identity and provenance

Populate `source` from the discovery pin and cache metadata. Populate `tool` from the parsed wrapper identity fields, not from the search hit. Search hits can omit version and changeset detail.

Keep both forms when they differ:

- Short XML `id` for human matching.
- Fully qualified installed Tool Shed id for gxformat2 step binding.

#### 3. Extract executable requirements

Read `<requirements>` into structured package/container requirements. Preserve requirement `type`, `name`, `version`, and any container URI or resolver hints exposed by the cache.

Do not invent Bioconda equivalences here. Equivalence inference belongs to author-galaxy-tool-wrapper when authoring a new UDT. Existing wrapper summaries report what the wrapper declares.

#### 4. Summarize command and failure behavior

Preserve the command template enough for downstream binding to understand which inputs and parameters are consumed. Record strict-shell, stdio regexes, exit-code handling, environment variables, and dynamic output behavior when present.

The command summary should be readable, but lossy prose is not enough. Keep template fragments and wrapper flags where they affect required inputs, output discovery, or runtime failure classification.

#### 5. Enumerate inputs

For every wrapper input parameter, emit:

- `name` and label/help text when available.
- Parameter kind (`data`, `data_collection`, `select`, `integer`, `float`, `boolean`, `text`, conditional section, repeat, section).
- Required/optional/default semantics.
- Datatypes, collection types, and multiple-value behavior.
- Select choices and dynamic options when statically available.
- Data-table references separately from user-provided parameters.

Nested conditionals must preserve branch ownership. Do not flatten `when` branches into independent parameters without recording the controlling selector and branch value.

#### 6. Enumerate outputs

For every output and collection output, emit:

- Output name, datatype, label, and `from_work_dir` or discovery rule when available.
- Conditional output ownership.
- Dynamic output collection shape and naming rules.
- Relationship to input collections when the wrapper maps over or preserves identifiers.

If output discovery depends on runtime filenames, record that as a warning for downstream test and debug skills.

#### 7. Capture tests and citations

Summarize wrapper tests into input fixture expectations, parameter settings, and output assertions. Do not treat wrapper tests as workflow tests; they are evidence about legal parameter combinations and output behavior.

Preserve citations, help text, and upstream URLs when present because they help resolve ambiguous wrappers during review.

#### 8. Emit warnings

Warnings should identify missing or lossy surfaces, especially:

- ParsedTool JSON omits raw XML behavior that affects binding.
- Conditional inputs cannot be reconstructed completely.
- Dynamic data-table options require Galaxy instance configuration.
- Output discovery is runtime-dependent.
- Tests are absent or too thin to confirm key outputs.

### Non-goals

- **Tool discovery.** Use discover-shed-tool before this skill.
- **Wrapper authoring.** Use author-galaxy-tool-wrapper when no acceptable wrapper exists.
- **Step implementation.** implement-galaxy-tool-step binds abstract workflow intent to this summary.
- **Installed-Galaxy-only wrappers.** Deferred until a Galaxy API discovery/input path exists.

## Runtime Notes

- Do not read Foundry source files at runtime; use only files packaged in this skill bundle and user-supplied artifacts.
- Preserve declared artifact filenames unless the user or harness supplies explicit paths.
- Carry unresolved assumptions into the output artifact instead of silently inventing missing source evidence.