ComposioHQ/composio · error · ValidationError
{context}: slug must not start with "COMPOSIO_" — this prefi
Error message
{context}: slug must not start with "COMPOSIO_" — this prefix is reserved for Composio meta tools. What it means
Raised when a custom tool or toolkit slug starts with COMPOSIO_ (case-insensitive). This prefix is reserved for Composio's meta tools (framework-provided built-ins), so user slugs cannot claim it.
Source
Thrown at python/composio/core/models/custom_tool.py:99
def _validate_slug(slug: str, context: str) -> str:
"""Validate a custom tool or toolkit slug."""
if not slug:
raise ValidationError(f"{context}: slug is required")
if not SLUG_REGEX.match(slug):
raise ValidationError(
f"{context}: slug must only contain alphanumeric characters, "
f"underscores, and hyphens"
)
upper = slug.upper()
if upper.startswith("LOCAL_"):
raise ValidationError(
f'{context}: slug must not start with "LOCAL_" — '
f"this prefix is reserved for internal routing."
)
if upper.startswith("COMPOSIO_"):
raise ValidationError(
f'{context}: slug must not start with "COMPOSIO_" — '
f"this prefix is reserved for Composio meta tools."
)
return slug
def _compute_final_slug_length(tool_slug: str, toolkit_slug: t.Optional[str]) -> int:
"""Compute the final slug length: LOCAL_[TOOLKIT_]SLUG."""
length = len(LOCAL_TOOL_PREFIX) + len(tool_slug)
if toolkit_slug:
length += len(toolkit_slug) + 1 # +1 for underscore separator
return length
def _validate_slug_length(
tool_slug: str, toolkit_slug: t.Optional[str], context: str
) -> None:View on GitHub (pinned to 64b1b85502)
Solutions
- Rename the slug to remove the COMPOSIO_ prefix, e.g. 'composio_wrapper' -> 'composio_wrapper_tool' is not enough — use a different namespace like 'wrapper_tool'
- If wrapping a built-in, name it after the wrapper's purpose, not the vendor
Example fix
# before Tool(slug="composio_proxy", ...) # after Tool(slug="proxy", ...) # or "my_proxy"
Defensive patterns
Strategy: validation
Validate before calling
def ensure_prefix(slug: str) -> str:
if slug.upper().startswith(("LOCAL_", "COMPOSIO_")):
return "usr_" + slug
return slug Type guard
def has_reserved_prefix(slug: str) -> bool:
return slug.upper().startswith(("LOCAL_", "COMPOSIO_")) Try / catch
try:
Tool(slug=slug, ...)
except ValidationError:
Tool(slug="app_" + slug, ...) Prevention
- Never prefix custom slugs with composio_ or local_
- Namespace with your own org/team prefix instead
- Test slug validation early when auto-generating many tools
When it happens
Trigger: Naming a custom tool slug like 'composio_search' or 'COMPOSIO_META' when creating a Tool or toolkit.
Common situations: Wrapping a Composio built-in and prefixing the wrapper with composio_ to indicate origin; teams namespace all tools with a company/tool prefix that happens to be composio_.
Related errors
- {context}: slug must not start with "LOCAL_" — this prefix i
- Could not determine a home directory to store the Composio c
- 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/906fc77fc91a9c70.
Report an issue: GitHub.