search_files
Search files in Slack workspaces using query strings with modifiers like channel, user, or file type filters to locate specific documents and media.
Instructions
Search files across the Slack workspace.
Note: Requires a User Token (SLACK_USER_TOKEN) as search is not
available with bot tokens.
Args:
query: Search query string. Supports Slack search modifiers:
- "in:#channel" to search in specific channel
- "from:@user" to search files from a user
- "type:pdf" to filter by file type
Example: "quarterly report type:pdf in:#finance"
sort: Sort order - "timestamp" or "score". Default: "timestamp"
sort_dir: Sort direction - "asc" or "desc". Default: "desc"
count: Number of results to return (1-100). Default: 20
types: Comma-separated file types to filter (optional)
Options: images, videos, pdfs, docs, snippets, etc.
Returns:
Dictionary containing search results with files and metadata
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| sort | No | timestamp | |
| sort_dir | No | desc | |
| count | No | ||
| types | No |