Command reference. Usually cast to a sidecar and loaded only when invoked.
- Purpose
- Search the Tool Shed for candidate wrappers matching a step's tool need.
- Trigger
- When resolving a workflow step to an installable Galaxy tool wrapper.
Search the Tool Shed for an existing wrapper, drill from hit to a pinnable changeset, classify candidates, and recommend or fall through.
Directory Mold with only index.md frontmatter.
target-specific fields are coherent.
eval.md declares cases and check type.
5 typed references; 0 resolver issues.
All on-demand references describe triggers.
Hypothesis references include verification.
Typed Mold references describe what casting consumes and when the generated skill should load each artifact.
Command reference. Usually cast to a sidecar and loaded only when invoked.
Command reference. Usually cast to a sidecar and loaded only when invoked.
Command reference. Usually cast to a sidecar and loaded only when invoked.
Structured contract copied for validation or lookup.
Background synthesis loaded by explicit progressive-disclosure metadata.
(owner, repo, tool_id, version, changeset_revision) pin for a Tool Shed wrapper plus discovery classification.
Discover whether the Galaxy Tool Shed already publishes a wrapper for the tool a workflow step needs, and resolve the discovery to a (owner, repo, tool_id, version, changeset_revision) quintuple that downstream steps can pin and cache.
This Mold is the Tool Shed leg of the discover-or-author branch in Galaxy-targeting per-step pipelines. On a hit, the cast skill recommends a pin and exits successfully. On a miss (or a low-quality hit), it falls through to author-galaxy-tool-wrapper. The branch itself is harness logic; this Mold owns only the discovery half.
The Mold expects, per step:
devteam, iuc) when the caller has a strong prior.A structured recommendation object, JSON-shaped:
{
"status": "hit",
"candidate": {
"tool_shed_url": "https://toolshed.g2.bx.psu.edu",
"owner": "devteam",
"repo": "fastqc",
"tool_id": "fastqc",
"trs_tool_id": "devteam~fastqc~fastqc",
"version": "0.74+galaxy0",
"changeset_revision": "5ec9f6bceaee",
"score": 12.3,
"matched_terms": ["fastqc"],
"match_fields": ["name", "description"],
"rationale": "single dominant hit on tool name"
},
"alternates": [],
"rationale": "single dominant hit on tool name; latest version pinned to newest changeset",
"warnings": []
}
status semantics:
hit — recommend pinning. Caller should cache and proceed.weak — candidate exists but the cast skill is not confident (e.g. only help-text matched, multiple owners with similar tools, deprecated repo, stale-index suspicion). Caller should confirm or fall through.miss — no usable hit. Caller falls through to author-galaxy-tool-wrapper.The cast skill follows the gxwf-shaped discover-and-pin chain. It does not call the Tool Shed HTTP API directly — the TS CLI wraps the call sequence and gotchas covered in component-tool-shed-search.
Issue tool-search with the need’s keywords. Start narrow:
gxwf tool-search "<keywords>" --json --max-results 10
If an owner hint is present, add --owner <owner>. If an exact-name hint is present, add --match-name. Lowercase the query (the tool index does not lowercase, see component-tool-shed-search §6).
For each hit, score on:
toolId or name is a strong signal; help-only matches are weak.iuc and devteam repos are typically maintained; an unfamiliar owner with a single-tool repo is a weaker prior. (No machine-readable approval flag exists — the Tool Shed’s approved field is dead code.)last_updated strengthens a hit; very old wrappers can still be valid but warrant the weak classification.weak and surface the choice.Drop hits from deprecated repos when detectable. Note: deprecated repos can still appear in shed search results until the next index rebuild — see component-tool-shed-search §6.
For the top candidate, list versions:
gxwf tool-versions <trsToolId> --json
Pick the newest installable version unless the need specifies otherwise (rare: a workflow may pin to a specific historical version for reproducibility). Be aware that TRS dedupes by version string — multiple changesets may publish the same version, and only one is visible at this layer.
Drill from (trsToolId, version) to a concrete changeset:
gxwf tool-revisions <trsToolId> --tool-version <v> --latest --json
Prefer --latest so the newest changeset publishing that version wins (tool versions are not monotonic; two changesets can legally publish the same version with different content). The output’s changesetRevision is what lands in the workflow’s tool_shed_repository.changeset_revision for reproducible reinstall.
Combine the scored hit and the resolved pin into the recommendation object above:
hit.weak with the leading candidate plus alternates.miss.Validate the recommendation with validate-galaxy-tool-discovery before returning it. Do not rely on prose-only shape checks; downstream phases branch on this contract.
The procedure assumes — and the cast skill must surface in its rationale when relevant — the following Tool Shed realities (full detail in component-tool-shed-search §6):
*term* wrapping disables stemming; spelling matters. Try alternate phrasings before declaring miss.(repoName, owner); expect duplicates that need triage.owner: / category: keywords, gxwf repo-search is the right command — out of scope for this Mold but a known sibling.miss, the harness’s discover-or-author branch fall-through invokes author-galaxy-tool-wrapper.galaxy-tool-cache add toolshed.g2.bx.psu.edu/repos/<owner>/<repo>/<tool_id> --version <v> to populate the cache.discover-tool-via-galaxy-api Mold. The contrast is sketched in component-tool-shed-search §4.test-data-resolution branch elsewhere in the pipeline.