For the complete documentation index, see llms.txt. This page is also available as Markdown.

List Knowledge Base Contents

List the files and folders in a selected knowledge base directory. Use this tool when you need to locate a file by its path rather than by its meaning.

Use this tool

  1. Select Directory.

  2. Enter Path. Use / for the root of the selected knowledge base.

  3. Choose whether List All Children should include nested folders. Set Max Files Per Folder to control the size of the listing.

  4. Run the tool and use Directory Tree to identify the file path for Read Knowledge Base File.

Behavior and limits

The output is a directory listing, not the text inside the files. A per-folder limit can omit entries. Enable the knowledge base permission setting when access must be checked for the signed-in user.

Inputs

Field
Parameter
Description

Path

absolute_path

The absolute path to the directory to list inside of the knowledge base. Default: "/".

Configuration

Field
Parameter
Description

Max Files Per Folder

max_files_per_folder

Limit to the number of children files to list per folder. Lower this value to reduce the number of tokens used by the tool. Default: 1000.

List All Children

list_all_children

Whether to recursively list all children files and folders of the directory, or only the immediate children. Default: true.

Directory (required)

selected_kb_items

The directory to list.

Enforce StackAI knowledge base permissions

enforce_end_user_kb_access

Require the end user to hold a role on the knowledge base being explored. Default: false.

Outputs

Field
Parameter
Description

Directory Tree

directory_tree

The directory contents as a tree structure.

Was this helpful?