> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-tools/browser-and-computer/canvas-share-file.md).

# Canvas Share File

Display a file from a StackAI Computer environment in the conversation canvas. Use it after Terminal creates a document that the user needs to read or edit.

## Before you start

StackAI Computer and a conversation interface with canvas support are required.

## Share a generated file

1. Create the file with [Terminal (StackAI Computer)](https://docs.stackai.com/stackai-tools/browser-and-computer/terminal-stackai-computer.md) and retain its **Terminal Sandbox ID**.
2. Pass the file’s absolute **File Path**, the same **Terminal Sandbox ID**, and a short **Description** to Canvas Share File.
3. Run the tool and open the file in the canvas. Check **Success** and read **Error** if sharing fails.

**Result:** The file appears in the canvas, with its file ID and version in the output.

## Behavior and troubleshooting

The file must already exist under `/home/user/` in that sandbox. A path on your own computer or a different sandbox will not work. Markdown files can be edited in the canvas; choose that format when the reader needs to revise the document.

## Inputs

| Field                          | Parameter             | Description                                 |
| ------------------------------ | --------------------- | ------------------------------------------- |
| Description (required)         | `description`         | Short intent label shown in UI.             |
| File Path (required)           | `file_path`           | Absolute sandbox path of the file to share. |
| Terminal Sandbox ID (required) | `terminal_sandbox_id` | Sandbox ID to reuse an existing sandbox.    |

## Outputs

| Field               | Parameter             | Description                               |
| ------------------- | --------------------- | ----------------------------------------- |
| Success             | `success`             | Whether the file was shared successfully. |
| File ID             | `canvas_file_id`      | The canvas file ID.                       |
| Workspace ID        | `canvas_workspace_id` | The canvas workspace ID.                  |
| Sandbox Path        | `path`                | The file path in the sandbox.             |
| Version             | `version`             | The file version number.                  |
| Terminal Sandbox ID | `terminal_sandbox_id` | The sandbox ID used for this operation.   |
| Error               | `error`               | Error message if the operation failed.    |

## Related guidance

[Tool Results, Errors, and Agent Continuation](https://docs.stackai.com/technical-reference/models-agents-and-skills/tool-results-errors-and-agent-continuation.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-tools/browser-and-computer/canvas-share-file.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
