fetch_file_content
Retrieves a Canvas file's bytes inline so an AI assistant can read small file content directly instead of saving it to disk; optionally decodes UTF-8 text or returns base64.
Instructions
Fetch a file's bytes inline. Use for small files where the agent needs to read the content directly rather than save to disk.
Args: file_id: Canvas file ID. as_text: if True, attempt to decode as UTF-8 text. Otherwise returns base64-encoded bytes.
Returns {"file_id", "display_name", "content_type", "size", "content": str, "encoding": "utf-8"|"base64"}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_text | No | ||
| file_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||