> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useagentflow.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Toolkits

> Validate and import reusable JavaScript tool modules

Toolkits package multiple related custom tools as one JavaScript or TypeScript module. AgentFlow validates the module, extracts its tool definitions, and imports them into the tenant tool catalog with `source="toolkit"`.

Use a toolkit when several tools share one module and should be versioned, exported, or removed together. Use `client.agents.tools.create(...)` for a single persisted custom tool, and use [MCP servers](/concepts/mcp-servers) for remotely hosted protocol tools.

```python theme={null}
source = """
/**
 * @tool
 * @name normalize_domain
 * @description Normalize a website hostname.
 * @param value - Website hostname
 */
export async function normalize_domain(value) {
  return { domain: value.trim().toLowerCase() };
}
"""

preview = await client.toolkits.validate(
    source=source,
    module_name="domain_tools",
)
if preview.valid:
    imported = await client.toolkits.import_module(
        source=source,
        module_name="domain_tools",
    )
```

Validation never imports or assigns tools. Import is tenant-admin scoped and adds the parsed definitions to the tenant catalog; assign them to agents afterward. Export returns the stored module; uninstall removes every tool owned by that toolkit, so inspect dependencies before uninstalling it.

Toolkit validation and execution require the deployment's Deno sandbox runtime. If that runtime is unavailable, validation fails without importing anything.

See [SDK: Toolkits](/sdk/toolkits) and the [Toolkits API reference](/api-reference/toolkits/validate-toolkit).
