Skip to main content
Glama

files_get_content

Read-onlyIdempotent

Extract text content from OneDrive or SharePoint files using drive and item IDs. Supports Office documents and PDFs; binary files return a placeholder. Set a character limit to control output length.

Instructions

Read the text content of a file in OneDrive or SharePoint, given a drive id and item id from files_search or files_list_recent. Works for text, Office documents and PDFs; binary files return a placeholder instead of bytes. Output is truncated to a caller-specified character limit. Requires Files.Read.All.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYesThe file item ID
drive_idYesThe OneDrive/SharePoint drive ID
max_charsNoMaximum characters of content to extract
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive hints, but the description adds valuable details beyond those: supported file types (text, Office, PDF), placeholder behavior for binary files, truncation to a caller-specified limit, and required permissions. This provides rich behavioral context without contradicting the annotations.

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

Conciseness5/5

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

The description is three succinct sentences, front-loaded with the core purpose, followed by supported formats, behavior for binary files, truncation, and permissions. Every sentence adds necessary information with no redundancy.

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

Completeness5/5

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

For a file-content retrieval tool with no output schema, the description covers all critical aspects: input origins, supported file types, binary handling, output truncation, and required scope. It is self-sufficient for an agent to select and invoke the tool correctly.

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?

Although the schema already describes all three parameters (100% coverage), the description adds meaning by explaining where the drive_id and item_id come from (files_search or files_list_recent) and that max_chars is a character limit for output truncation. This supplements the schema-level descriptions.

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 clearly states the verb ('Read the text content') and the resource ('a file in OneDrive or SharePoint'), and specifies how to locate the file via drive id and item id from files_search or files_list_recent. This distinguishes it from sibling tools that list or search files.

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 explains the prerequisite of having a drive id and item id from files_search or files_list_recent, and notes the permission requirement (Files.Read.All). While it doesn't explicitly mention when not to use it or name alternative tools, the context is clear and actionable.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nitin27may/ms-graph-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server