> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/open-webui/open-webui/llms.txt
> Use this file to discover all available pages before exploring further.

# List Tools

> Retrieve tools including local tools, OpenAPI servers, and MCP servers

## Get Tools

<CodeGroup>
  ```bash GET /api/tools/ theme={null}
  curl -X GET "https://your-instance.com/api/tools/" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</CodeGroup>

Returns all available tools including:

* Local tools (Python-based tools stored in the database)
* OpenAPI tool servers
* MCP (Model Context Protocol) tool servers

### Response

<ResponseField name="tools" type="array">
  Array of tool objects

  <Expandable title="ToolUserResponse properties">
    <ResponseField name="id" type="string" required>
      Unique identifier for the tool. Server tools use format `server:{id}` or `server:mcp:{id}`
    </ResponseField>

    <ResponseField name="user_id" type="string" required>
      ID of the user who created the tool (for local tools) or server ID (for server tools)
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Display name of the tool
    </ResponseField>

    <ResponseField name="meta" type="object" required>
      Tool metadata

      <Expandable title="meta properties">
        <ResponseField name="description" type="string">
          Tool description
        </ResponseField>

        <ResponseField name="manifest" type="object">
          Tool manifest data
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="has_user_valves" type="boolean">
      Whether the tool has user-configurable valves (local tools only)
    </ResponseField>

    <ResponseField name="authenticated" type="boolean">
      OAuth authentication status (MCP servers with OAuth 2.1 only)
    </ResponseField>

    <ResponseField name="updated_at" type="integer" required>
      Unix timestamp of last update
    </ResponseField>

    <ResponseField name="created_at" type="integer" required>
      Unix timestamp of creation
    </ResponseField>
  </Expandable>
</ResponseField>

### Access Control

* **Admin users** (with `BYPASS_ADMIN_ACCESS_CONTROL`): See all tools
* **Regular users**: See only:
  * Tools they created
  * Tools with read access grants
  * Server tools with appropriate access grants

## Get Tool List

<CodeGroup>
  ```bash GET /api/tools/list theme={null}
  curl -X GET "https://your-instance.com/api/tools/list" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</CodeGroup>

Returns a list of local tools with access information.

### Response

<ResponseField name="tools" type="array">
  Array of tool objects with access information

  <Expandable title="ToolAccessResponse properties">
    <ResponseField name="id" type="string" required>
      Tool identifier
    </ResponseField>

    <ResponseField name="user_id" type="string" required>
      Creator user ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Tool name
    </ResponseField>

    <ResponseField name="meta" type="object" required>
      Tool metadata
    </ResponseField>

    <ResponseField name="access_grants" type="array" required>
      Access grant configurations

      <Expandable title="access grant properties">
        <ResponseField name="principal_type" type="string">
          Type of principal: "user" or "group"
        </ResponseField>

        <ResponseField name="principal_id" type="string">
          User ID, group ID, or "\*" for all users
        </ResponseField>

        <ResponseField name="permission" type="string">
          Permission level: "read" or "write"
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="write_access" type="boolean" required>
      Whether the current user has write access to this tool
    </ResponseField>

    <ResponseField name="updated_at" type="integer" required>
      Last update timestamp
    </ResponseField>

    <ResponseField name="created_at" type="integer" required>
      Creation timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

### Access Determination

Write access is granted if:

* User is an admin (with `BYPASS_ADMIN_ACCESS_CONTROL`)
* User is the tool creator
* User has a write permission grant
* User is in a group with write permission grant

## Export Tools

<CodeGroup>
  ```bash GET /api/tools/export theme={null}
  curl -X GET "https://your-instance.com/api/tools/export" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</CodeGroup>

Export all tools accessible to the user. Requires `workspace.tools_export` permission for non-admin users.

### Response

Returns an array of complete `ToolModel` objects including:

* Tool ID, name, and metadata
* Full source code content
* Tool specifications
* Access grants

### Permissions

* **Admin users** (with `BYPASS_ADMIN_ACCESS_CONTROL`): Export all tools
* **Non-admin users**: Requires `workspace.tools_export` permission, exports only tools with read access

## Tool Types

### Local Tools

Python-based tools stored in the database:

* Identified by simple string IDs (e.g., `"calculator"`)
* Created and managed through the API
* Support user valves for customization

### OpenAPI Tool Servers

External OpenAPI-compliant tool servers:

* ID format: `server:{id}`
* Configured in `TOOL_SERVER_CONNECTIONS`
* Access controlled via server configuration

### MCP Tool Servers

Model Context Protocol servers:

* ID format: `server:mcp:{id}`
* Support OAuth 2.1 authentication
* Access controlled via server configuration
* Return `authenticated` field for OAuth status

## Authentication

All endpoints require verified user authentication. Some operations require admin privileges or specific permissions.
