Skip to main content
POST
Workspace: Glob
Find files in the per-agent workspace matching a glob pattern (e.g. **/*.py). Useful for discovering files before reading or editing them.

Path Parameters

string
required
Agent ID (UUID)

Request Body

string
required
Glob pattern to match (e.g. **/*.py).
string
Directory to search from, relative to the workspace root. Defaults to the workspace root when omitted.
integer
default:1000
Maximum number of matches to return.

Response

string
Result status (e.g., ok).
array
Array of matching file paths.

Example Request

Notes

  • Use ** to match across directory boundaries and * to match anything within a single path segment.
  • Combine with Grep to search the contents of the matched files.

See Also

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

agent_id
string
required

Body

application/json
pattern
string
required

Glob pattern for file matching. Supports ** for recursive matching, * for wildcards.

Example:

"**/*.py"

root_dir
string
default:""

Root directory to search from, relative to workspace root.

Example:

"src"

max_results
integer
default:1000

Maximum number of results to return. Prevents excessive output for broad patterns.

Required range: 1 <= x <= 50000

Response

Successful Response

matches
string[]

List of matched file paths

total_found
integer
default:0

Total number of files matching the pattern

truncated
boolean
default:false

True if results were truncated due to max_results limit