badges/shields · error · NotFound
tool not found
Error message
tool not found
What it means
Thrown in GalaxyToolshedVersionService.transform when the requested tool id is not present in the valid_tools list returned by the Tool Shed repository revision install info API. The service looks up response[1].valid_tools for an entry whose id matches the :tool parameter; if none matches, NotFound 'tool not found' is thrown.
Source
Thrown at services/galaxytoolshed/galaxytoolshed-version.service.js:76
},
{
name: 'tool',
example: 'fastq_dump',
},
{
name: 'requirement',
example: 'perl',
},
),
},
},
}
static transform({ response, tool, requirement }) {
if (tool !== undefined) {
const dataTool = response[1].valid_tools.find(x => x.id === tool)
if (dataTool === undefined) {
throw new NotFound({ prettyMessage: 'tool not found' })
}
// Requirement version
if (requirement !== undefined) {
const dataRequirement = dataTool.requirements.find(
x => x.name === requirement,
)
if (dataRequirement === undefined) {
throw new NotFound({ prettyMessage: 'requirement not found' })
}
return dataRequirement.version
}
// Tool version
return dataTool.version
}
// Repository version
return response[1].changeset_revision
}
View on GitHub (pinned to 766fd8bc89)
Solutions
- Check the exact tool id in the repository's tool_dependencies or the Tool Shed UI
- Query the Tool Shed install info API directly to list valid_tools for the latest revision
- Update the badge URL to the correct tool id
- Pin an older revision via a changeset revision if the tool existed there
Example fix
// before /galaxytoolshed/version/myrepo/myowner/missing_tool // after /galaxytoolshed/version/myrepo/myowner/data_manager_funannotate
Defensive patterns
Strategy: validation
Validate before calling
const info = await fetch(`https://toolshed.g2.bx.psu.edu/api/repos/${owner}/${repo}`, { headers: { Accept: 'application/json' } }).then(r => r.json());const valid = info?.valid_tools?.some(t => t.id === toolId);if (!valid) console.warn(`tool ${toolId} not in valid_tools`); Type guard
const hasTool = (resp, tool) => Array.isArray(resp?.valid_tools) && resp.valid_tools.some(t => t?.id === tool);
Try / catch
try { return await versionBadge({ repo, owner, tool }); } catch (e) { if (String(e.message).includes('tool not found')) { return fallbackBadge('unknown tool'); } throw e; } Prevention
- Copy tool ids verbatim from tool_dependencies.xml or the Tool Shed UI
- Watch out for casing differences in tool ids
- Re-check badge URLs when tools are renamed or removed from a repository
When it happens
Trigger: Requesting a version badge with a tool name that does not appear in the repository's valid_tools array — e.g. /galaxytoolshed/version/{repo}/{owner}/{tool} where the Tool Shed reports no tool with that id for the latest installable revision.
Common situations: Misspelled or wrong-cased tool id in the badge URL; the repository ships multiple tools and the requested one was renamed or removed; querying a revision where the tool metadata changed.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/5c1d9262452ce5ef.
Report an issue: GitHub.