Skip to main content

Read document

The Read Document tool allows an agent to read the full content of specific documents or URLs. This tool is useful for incorporating document context into workflows and enables agents in subsequent steps to work with the retrieved information.

Limitations​

Keep the following limits in mind when using the Read Document tool:

  • Files per step: A single Read Document step can read up to 100 files. If you need to process more files, split them across multiple steps.
  • Google Sheets: Reading a Google Sheet through this tool retrieves approximately 1,000 rows. Rows beyond this limit aren’t included. If your sheet has more rows, consider exporting it and using Data Analysis instead.
  • Large documents: When a document’s content is very large, the agent may trim it to fit within the model’s context window. If this happens, you’ll see a warning that the document was partially read.

Configuration​

caution

Prerequisites

Ensure your desired documents are accessible.

Configure the Read Document connector by entering search queries in one of two ways:

  • Define Fixed Queries Manually: Use this method to provide your exact queries to the Read Document agent. You can tag individual documents using the @ tag or enter a specific document’s URL.
  • Write a Plain Text Prompt for Glean to Generate Queries From: Glean uses this plain text field to generate queries, which it passes to the Read Document connector.

Read a Slack Canvas​

Share a Slack Canvas URL with Glean Assistant or an agent. Glean uses the Read Document tool to retrieve content through your authorized Slack connection.

Use an HTTPS URL that matches one of these formats:

  • https://<workspace>[.slack.com/docs/](https://.slack.com/docs/)<team-id>/<canvas-id>
  • https://<workspace>[.slack.com/canvas/](https://.slack.com/canvas/)<team-id>/<canvas-id>

Your Slack account requires permission to open the Canvas. Glean also verifies your access to the Slack data source before returning any content.

This workflow reads a Canvas only when you provide a specific URL. It does not add Canvas content to native Slack indexing or search. Slack message and thread URLs maintain their standard behavior and do not use this Canvas retrieval path. For information on Glean Canvas, review Glean Canvas.

Troubleshoot Slack Canvas reads​

  • Missing authorization: Confirm that your Slack connection has authorization for your account. If you cannot authorize the connection, contact a Glean administrator.
  • Data source access denied: Confirm that your Glean account has access to the Slack data source and that your Slack account has permission to open the Canvas. If access issues persist, ask a Glean administrator to review your access settings.
  • Unsupported URL: Provide a Slack Canvas URL that uses one of the supported path formats listed above. Slack message, thread, and List URLs do not support this Canvas retrieval path.