Skip to main content
Glama

fetch_file_content

Read-only

Retrieves a Canvas file's bytes inline so an AI assistant can read small file content directly instead of saving it to disk; optionally decodes UTF-8 text or returns base64.

Instructions

Fetch a file's bytes inline. Use for small files where the agent needs to read the content directly rather than save to disk.

Args: file_id: Canvas file ID. as_text: if True, attempt to decode as UTF-8 text. Otherwise returns base64-encoded bytes.

Returns {"file_id", "display_name", "content_type", "size", "content": str, "encoding": "utf-8"|"base64"}.

Input Schema

NameRequiredDescriptionDefault
as_textNo
file_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint true, destructiveHint false, openWorldHint true), so the description's added value is the inline-vs-disk behavior and the small-file caveat. It also documents the response payload shape, though it gives no concrete size threshold for what counts as "small" or what happens on a very large file.

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 and the key usage decision in two short sentences, then structured Args and Returns blocks that are easy to scan. The Returns block is somewhat verbose given an output schema exists, but it remains informative rather than redundant filler.

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 two-parameter read tool with annotations and an output schema, the description covers purpose, parameter meaning, and return shape adequately. The only material gap is the undefined notion of "small files" and any size or rate limits an agent should respect before calling.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden, and it does: file_id is identified as a Canvas file ID, and as_text is explained as UTF-8 decoding versus base64-encoded bytes. This adds meaning well beyond the bare boolean/integer schema types.

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

Purpose5/5

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

The description states a specific verb and resource ("Fetch a file's bytes inline") and immediately contrasts with the disk-writing alternative ("rather than save to disk"), which distinguishes it from siblings like download_file and get_file. An agent can identify the tool's role without opening the schema.

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?

It gives a clear usage condition: small files where the agent needs to read content directly rather than persist it. The alternative behavior (save to disk) is named conceptually, though the specific sibling tool that does that is not named, and no explicit when-not-to-use boundary is drawn.

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