Skip to main content
Glama

get-drive-item

get-drive-item
Read-only

Retrieve metadata for a file or folder in a Microsoft 365 drive, including name, size, timestamps, and download URL. Specify drive and item IDs to fetch details for any stored content.

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
expandNoNavigation properties to inline, e.g. attachments on a message or event. Only navigation properties can be expanded: expanding a non-navigation property such as a message body fails with "Parsing OData Select and Expand failed", and an unsupported value may be ignored rather than reported. Request ordinary fields with $select instead.
selectNoComma-separated fields to return, e.g. id,subject,from,receivedDateTime
driveIdYesValue for the 'driveId' path segment. Pass it under the name 'driveId', not as 'id'. Use the 'id' field of the drive object as returned by Microsoft Graph.
driveItemIdYesValue for the 'driveItemId' path segment. Pass it under the name 'driveItemId', not as 'id'. Use the 'id' field of the drive item object as returned by Microsoft Graph.
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
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description repeats 'Read-only', adding little. It does disclose that the result is 'Nullable' and lists the metadata fields returned, which adds context. However, the statement 'All items contained in the drive' falsely implies it returns multiple items, which misrepresents actual behavior. With the annotation bar lowered, this partial but misleading disclosure warrants a mid-range score.

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 moderately concise with a useful TIP section that provides actionable guidance on download alternatives. However, the opening 'All items contained in the drive' is not only misleading but also redundant given the tool name and later clarification. It could be tightened to a single clear statement of purpose without losing value.

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 tool with 7 parameters, no output schema, and readOnly annotations, the description reasonably covers the key aspects: it states the metadata fields returned, guides on download alternatives for large/small files, and implies the response includes a download URL. It does not explain differences between this and other drive-item tools (e.g., get-drive-root-item), but given the openWorldHint and structured schema, it is sufficiently complete for common use.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter (driveId, driveItemId, expand, select, etc.) already has a detailed description. The tool description adds no additional parameter-level meaning—it does not explain parameter formats, constraints, or relationships beyond what the schema provides. Per calibration, baseline 3 applies when the schema does the heavy lifting.

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

Purpose3/5

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

The description opens with 'All items contained in the drive' which is misleading—this tool actually retrieves metadata for a single file/folder. The tip later clarifies 'Gets metadata for a file or folder' and lists specific fields, so the purpose becomes clear, but the contradictory opening undermines clarity and fails to immediately distinguish from listing tools.

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?

The description gives explicit guidance on when to use alternative tools for content download: for large files, call get-download-url; for small files, call download-bytes. This clearly identifies when not to use this tool for content. However, it does not discuss when to use this over other metadata-centric siblings (e.g., list-drive-item-versions), so it is not fully comprehensive.

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/A-Impact-Pavel/ms365-mcp'

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