Files

Read a file's words

files_read_text · Reads only · Markdown

The words in a file as Conecto read them: text files, PDFs, office files, HTML, and scans once read with OCR.

Free*

*Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads.

An example

What does the lease for the shop say about the notice period?

Your agent callsfiles_read_textFree*

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "file_id": "1e3a5c7e-9b2d-4f4a-8c6e-0a2c4e6a8b1d"
}
What comes back
{
  "file_id": "1e3a5c7e-9b2d-4f4a-8c6e-0a2c4e6a8b1d",
  "name": "Lease 1830 SE Ash St.pdf",
  "status": "read",
  "method": "text",
  "ocr_pages": null,
  "languages": null,
  "length": 139,
  "offset": 0,
  "text": "Lease for the shop, 1830 SE Ash St, Portland\n\n12. Notice: either side may end the lease with six months notice before the end of a quarter."
}

Use it when

The agent needs a file's words, from any kind of document.

What it does

The words in a file as Conecto read them: text files, PDFs with a text layer, Word, Excel, PowerPoint, OpenDocument and HTML files, and scans once read with OCR (files_ocr). Up to max_chars from offset; next_offset gives the rest. status: read, reading (ask again in a minute), scan (an image or a PDF without text: files_ocr reads it), unpaid (auto-OCR could not be paid), none (no words to read) or failed.

What comes back

The file_id, status (read, reading, scan, unpaid, none or failed), the text from offset, and next_offset when there is more. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
file_idRequiredstringThe file_id files_upload returned. Exactly 36 characters.
offsetintegerAt least 0. Default: 0.
max_charsinteger1 to 200,000. Default: 50000.

The call

Over MCP, call files_read_text on https://api.conecto.chat/mcp/files. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/files_read_text \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id":"1e3a5c7e-9b2d-4f4a-8c6e-0a2c4e6a8b1d"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No file of the business has that file_id.Find it with files_list.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md