Skip to main content
Glama

get-drive-item

Read-only

Retrieves metadata for a specified file or folder in a Microsoft 365 drive, including name, size, timestamps, download URL, and permissions.

Instructions

All items contained in the drive. Read-only. Nullable.

đź’ˇ TIP: Gets metadata for a file or folder: name, size, lastModifiedDateTime, createdBy, webUrl, file (mimeType, hashes), folder (childCount), parentReference, and @microsoft.graph.downloadUrl. For large drive/SharePoint files, call get-download-url with target=/drives/{drive-id}/items/{driveItem-id}/content to fetch out-of-band with no Authorization header. For small files where base64 in the tool response is acceptable, call download-bytes with the same /content target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expandNoExpand related entities
selectNoComma-separated fields to return, e.g. id,subject,from,receivedDateTime
driveIdYesPath parameter: driveId
driveItemIdYesPath parameter: driveItemId
fetchAllPagesNoFollow @odata.nextLink and merge up to 100 pages into one response. Can return enormous payloads—only when the user explicitly needs a full export. Prefer a small $top first, then paginate or narrow with $filter/$search.
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds valuable behavioral context: it explains the tool is read-only and nullable, lists exact fields returned (name, size, etc.), and warns about the potentially enormous payload of fetchAllPages. There is no contradiction with annotations.

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

Conciseness3/5

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

The description is somewhat verbose with a list of fields and a tip. The opening sentence is misleading ('All items') and could be simplified. While it packs useful information, it could be more concise and front-loaded accurately.

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?

Despite lacking an output schema, the description thoroughly explains what the tool returns (a list of metadata fields) and covers important context like pagination, download alternatives, and the nullable nature. It provides enough information for an agent to use 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?

Schema coverage is 100% with good descriptions for all 7 parameters. The description adds extra context beyond the schema, particularly for the 'select' and 'expand' parameters, and provides a warning for 'fetchAllPages' about payload size. This adds value beyond the schema baseline.

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?

The description clearly states it 'Gets metadata for a file or folder', which identifies the verb and resource. However, the opening line 'All items contained in the drive' is misleading, as the tool retrieves a single item, not all items. It distinguishes from siblings like get-download-url and download-bytes by explaining when to use those alternatives.

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

Usage Guidelines5/5

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

The description explicitly provides usage guidance: it tells when to use this tool for metadata, and when to use alternatives (get-download-url for large files, download-bytes for small files). It also warns against using fetchAllPages unless necessary, offering best practice advice.

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/Softeria/ms-365-mcp-server'

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