1 Resources tool
Forgejo Actions edited this page 2026-11-26 06:34:52 +00:00

openwebui_tool (Resource)

Manages a Python tool in Open WebUI. Tools expose callable functions to language models.

Example Usage

resource "openwebui_tool" "example" {
  tool_id     = "web_scraper"
  name        = "Web Scraper"
  description = "Fetches and parses web page content"
  content     = file("${path.module}/tools/web_scraper.py")

  read_groups  = ["Support"]
  write_groups = ["Support"]
}

Schema

Required

  • content (String) Python source code that defines the tool's functions.
  • name (String) Display name of the tool.
  • tool_id (String) Unique identifier for the tool, e.g. web_scraper. Forces replacement.

Optional

  • description (String) Short description shown in the Open WebUI interface.
  • manifest_json (String) JSON manifest stored under the tool's meta.manifest, e.g. jsonencode({ author = "ops", version = "1.0" }). The web editor fills it from the frontmatter of content. This resource sends whatever the configuration holds. Leave it unset to keep the manifest Open WebUI already stores.
  • public_read (Boolean) When true, every signed-in user can read the tool. This is what the Open WebUI interface calls public sharing.
  • public_write (Boolean) When true, every signed-in user can edit the tool.
  • read_groups (List of String) List of group names or IDs granted read access.
  • read_users (List of String) List of user email addresses or IDs granted read access.
  • write_groups (List of String) List of group names or IDs granted write access.
  • write_users (List of String) List of user email addresses or IDs granted write access. Name the same address in read_users as well.

Read-Only

  • created_at (Number) Unix timestamp of creation. Set by Open WebUI.
  • has_user_valves (Boolean) Whether the tool source declares a UserValves class. Open WebUI derives this from content on every write.
  • id (String) Terraform identifier. Always equal to tool_id.
  • specs_json (String) JSON OpenAPI-style specification of the tool's functions. Read-only; set by Open WebUI.
  • updated_at (Number) Unix timestamp of last update. Set by Open WebUI.
  • user_id (String) Owner user identifier. Set by Open WebUI.
  • write_access (Boolean) Whether the authenticated user has write access to this tool. Read-only; set by Open WebUI.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# A tool is imported by its tool_id, the identifier it was registered under.
terraform import openwebui_tool.example web_scraper