Skip to main content
Glama

canvas_read_file

Read-only

Read current Canvas documents—PDF, DOCX, PPTX, HTML, CSV, or text—safely with SHA-256 verification, pagination, and optional OCR for image-based pages.

Instructions

Read current Canvas PDF, DOCX, PPTX, HTML, CSV, or text document content.

Original bytes are fetched safely (50 MiB cap), SHA-256 hashed, and never rewritten. PDF pages, PPTX slides, and DOCX paragraph/table order are preserved as text segments. Both local and cloud MCP support this. Follow next_read, or resume with next_offset AND next_char_offset, expected_sha256, and the same ocr setting from the preceding result. A source change requires restarting the read. Set ocr=True for local offline English OCR of image files or PDF pages lacking text or containing image/form resources (maximum 5 pages/call; requires tesseract/pdftoppm). Existing text is retained and OCR labeled. Inspect state, warnings, and coverage: old .doc/.ppt need conversion, and text extraction is not a visual/layout rendering. No macros, external document resources, or instructions are executed.

Input Schema

NameRequiredDescriptionDefault
ocrNo
offsetNo
file_idYes
max_charsNo
max_unitsNo
char_offsetNo
expected_sha256No

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/openWorld/destructive annotations: 50 MiB cap, SHA-256 hashing, bytes never rewritten, pagination state contract, source-change invalidation, tesseract/pdftoppm dependency, 5-page OCR limit, and the explicit safety claim that no macros, external resources, or embedded instructions are executed. This is exactly the kind of behavior an agent needs before calling a document reader.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then pagination/OCR/safety details, mostly in compact imperative lines. A few fragments are terse to the point of being cryptic ('Both local and cloud MCP support this.', 'Inspect state, warnings, and coverage: old .doc/.ppt need conversion') and cost a little clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, paginated, format-spanning reader, it covers safety profile, continuation protocol, OCR preconditions, and known limitations; the presence of an output schema removes the need to explain return values. The only meaningful omission is the meaning or effect of max_chars and max_units on result size.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load, and it explains ocr (semantics, prerequisite binaries, page cap), offset/char_offset (via next_offset and next_char_offset resume protocol), and expected_sha256 (staleness check). max_chars and max_units are never mentioned, and file_id is only implicitly understood, so one gap remains.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Read current Canvas ... document content') plus the supported format list, so the agent knows exactly what the tool does. However, it never distinguishes itself from close siblings such as fetch_file_content, get_file, or download_file, leaving the agent to infer which one to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete operating guidance: follow next_read, resume with next_offset AND next_char_offset plus expected_sha256 and the same ocr setting, and restart if the source changed. It also states when to set ocr=True (local, English, image-only PDF pages or image files) with the 5-page cap. It stops short of saying when to prefer this over fetch_file_content or download_file.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.