Skip to main content
sharepoint_get_file_content Downloads and returns the text content of a SharePoint file. Best suited for plain-text formats: .txt, .csv, .json, .xml, .md. Binary formats (images, PDFs, Office files) are not supported for content extraction. Large files are automatically truncated.

Parameters

Returns

An object with:
  • content — the extracted text
  • truncatedtrue if the file was cut off at max_chars
  • length — the number of characters returned
If truncated is true, only a portion of the file was returned. Increase max_chars (up to 25,000) or use sharepoint_search_files to locate a more targeted excerpt.

Example use

“Read the contents of the Q3 budget CSV in the Finance library.”