---
name: Glance
description: Preview multiple files at once. Reads files and directories, returns a brief summary for each file to help understand what's in them without reading the full contents.
parallel: true
allowBuiltinTools: [Read, Glob, Grep, Bash, BashOutput]
displayFields: [paths, recursive, maxFiles]
parameters:
  properties:
    paths:
      type: array
      items:
        type: string
      description: List of file or directory paths to preview.
    recursive:
      type: boolean
      description: Recursively scan directories? Defaults to false.
    maxFiles:
      type: number
      description: Maximum number of files to process. Defaults to 20.
  required: [paths]
---

Preview these files and directories: {{paths}}. {{#if recursive}}Scan directories recursively.{{else}}Only inspect the top level inside any directory.{{/if}} Respect the max file budget: {{#if maxFiles}}{{maxFiles}}{{else}}20{{/if}}.

Expand directories with Glob before reading. For each file, read just enough to understand its role. For large files, skim the top-level structure and the most informative sections instead of reading everything. Keep each summary under 100 words. If a path cannot be read, note that briefly and move on.

Return the results in this format:

```
path/to/file.ts
  Short summary of the file's purpose, main exports, or important contents.

path/to/config.json
  Short summary of the configuration or data stored here.
```

Do not include explanations beyond the result format. Keep responses concise and structured.
