Skip to main content

File Index Tools

These 3 tools work with all files in the project directory — not just source code or markdown, but configuration files, images, data files, and everything else. The file index provides metadata like language detection, MIME types, and directory hierarchy.

info

These tools are always available, regardless of graph configuration.

files_list​

Lists all project files and directories with optional filters.

Parameters​

ParameterRequiredDefaultDescription
directoryNo—Filter by parent directory (e.g. "src/lib")
extensionNo—Filter by file extension (e.g. ".ts", ".json")
languageNo—Filter by detected language (e.g. "typescript", "yaml")
filterNo—Substring match on file path
limitNo50Maximum results

Returns​

Array of { filePath, kind, fileName, extension, language, mimeType, size, fileCount } — each entry includes full metadata. For directories, fileCount shows the number of files inside.

When to use​

Browsing the project file tree with filters. Useful for questions like "What configuration files are in this project?" or "List all YAML files."


Semantic search over all project files by path and name.

Parameters​

ParameterRequiredDefaultDescription
queryYes—Search query (natural language)
topKNo10Maximum results
minScoreNo0.3Minimum relevance score

Returns​

Array of { filePath, fileName, extension, language, size, score } — matching files ranked by relevance.

When to use​

When you need to find files by description rather than exact path. For instance: "Find files related to database configuration" or "Where are the test fixtures?"


files_get_info​

Returns full metadata for a specific file or directory.

Parameters​

ParameterRequiredDescription
filePathYesFile path relative to project root (e.g. "src/lib/embedder.ts")

Returns​

{ filePath, kind, fileName, directory, extension, language, mimeType, size, fileCount, mtime } — complete metadata including modification time, MIME type, and parent directory.

When to use​

When you need detailed information about a specific file, such as its size, type, or last modification time.