portal_glob
Find files on a remote host using a glob pattern. Returns results sorted by newest modification time, capped at 100 files.
Instructions
Find files by a glob pattern on a remote host, newest first.
Prefer this over running raw find/ls through portal_exec — it
returns structured JSON, sorts by modification time, and hard-caps at 100
files. Use portal_grep when you need to match file contents instead.
Args: host: SSH host alias / registered name. pattern: a glob, e.g. "/*.py", "src//.{ts,tsx}", ".toml". path: directory to search under (default: cwd "."). Returned filenames are relative to it.
Returns {filenames:[…newest first], num_files, truncated, duration_ms}.
Unlike portal_grep this does NOT respect .gitignore (matches CC Glob).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| path | No | . | |
| pattern | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |