@devries-cameron20 / composio-1 / commits / a741ec787
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

docs(core): add LOCAL_/COMPOSIO_ prefix docstrings to createCustomTool/createCustomToolkit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Dhawal Upadhyay committed Mar 23, 2026 at 18:10 UTC a741ec787b07c5475ed85c8aa4d049d814aed83e
1 file changed +9
ts/packages/core/src/models/CustomTool.ts
+9
@@ -83,6 +83,11 @@ function validateSlugLength(toolSlug: string, toolkitSlug: string | undefined, c
83 * Just return the result data from `execute`, or throw an error.
84 * The SDK wraps it into the standard response format internally.
85 *
86 + * **Slug naming:** The slug you provide is automatically prefixed with `LOCAL_` when
87 + * exposed to the agent (e.g. `'GREP'` becomes `LOCAL_GREP`). If the tool is inside a
88 + * custom toolkit, the toolkit slug is also included (e.g. `LOCAL_DEV_TOOLS_GREP`).
89 + * The `LOCAL_` and `COMPOSIO_` prefixes are reserved and cannot be used in your slug.
90 + *
91 * @param slug - Unique tool identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
92 * @param options - Tool definition including name, schema, and execute function
93 * @returns A CustomTool to pass to session creation
@@ -182,6 +187,10 @@ export function createCustomTool<T extends z.ZodType>(
187 *
188 * Tools passed here must NOT have `extendsToolkit` set — they inherit the toolkit identity instead.
189 *
190 + * **Slug naming:** The toolkit slug becomes part of the final tool slug exposed to the agent.
191 + * For example, a toolkit `'DEV_TOOLS'` with a tool `'GREP'` produces `LOCAL_DEV_TOOLS_GREP`.
192 + * The `LOCAL_` and `COMPOSIO_` prefixes are reserved and cannot be used in your slug.
193 + *
194 * @param slug - Unique toolkit identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
195 * @param options - Toolkit definition including name, description, and tools
196 * @returns A CustomToolkit to pass to session creation