ComposioHQ/composio · warning · ComposioToolkitNotFoundError
Toolkit with slug ${slug} not found
Error message
Toolkit with slug ${slug} not found What it means
getToolkitBySlug() catches errors from the retrieve call and, when the API returns 404 or 400, throws ComposioToolkitNotFoundError with the requested slug in meta. This gives a precise, catchable not-found signal instead of a raw APIError. Other statuses propagate as their original errors.
Source
Thrown at ts/packages/core/src/models/Toolkits.ts:114
*
* @private
*/
protected async getToolkitBySlug(
slug: string,
requestOptions?: ComposioRequestOptions
): Promise<ToolkitRetrieveResponse> {
try {
const result = await withCancellation(
() => this.client.toolkits.retrieve(slug, undefined, requestOptions),
requestOptions?.signal
);
return transformToolkitRetrieveResponse(result);
} catch (error) {
if (error instanceof ComposioRequestCancelledError) {
throw error;
}
if (error instanceof APIError && (error.status === 404 || error.status === 400)) {
throw new ComposioToolkitNotFoundError(`Toolkit with slug ${slug} not found`, {
meta: {
slug,
},
cause: error,
});
}
throw new ComposioToolkitFetchError(`Couldn't fetch Toolkit with slug: ${slug}`, {
meta: {
slug,
},
cause: error,
});
}
}
/**
* Retrieves a specific toolkit by its slug identifier.
*View on GitHub (pinned to 64b1b85502)
Solutions
- Confirm the exact slug via composio.toolkits.get() listing or the Composio app directory
- Fix casing/spelling of the slug string
- If the toolkit was renamed, update to its new slug
- Check that the connected workspace/API key can access the toolkit
Example fix
// before
const tk = await composio.toolkits.get('GITHUB');
// after
const all = await composio.toolkits.get();
const slug = all.items.find(t => t.name?.toLowerCase() === 'github')?.slug;
if (!slug) throw new Error('github toolkit unavailable');
const tk = await composio.toolkits.get(slug); Defensive patterns
Strategy: type-guard
Type guard
const isToolkitNotFound = (e: unknown): e is ComposioToolkitNotFoundError => e instanceof ComposioToolkitNotFoundError;
Try / catch
try { const tk = await composio.toolkits.get(slug); } catch (e) {
if (e instanceof ComposioToolkitNotFoundError) { /* fallback: list and fuzzy-match slug */ }
throw e;
} Prevention
- Resolve slugs dynamically from the toolkit list instead of hardcoding
- Normalize slug casing before calling get
- Handle not-found as an expected branch in user-facing flows
When it happens
Trigger: composio.toolkits.get('slug') or .toolkit('slug') where the slug does not exist, is typo'd, uses wrong casing, or refers to a toolkit not visible to the workspace/API key.
Common situations: Slug typos or casing mistakes (e.g. 'GITHUB' vs 'github'), referencing a toolkit renamed or removed in a newer API, or using an API key scoped to a workspace without that toolkit installed.
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
- Failed to fetch toolkits
- Trigger type ${slug} not found
- Cache directory {directory} is not writable please provide a
- module {__name__!r} has no attribute {name!r}
- Failed to upload to S3: {_sanitize_url_for_logging(url)}. Er
AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28).
Data as JSON: /api/errors/4ed27b1c47ee96d2.
Report an issue: GitHub.