Skip to main content
Glama
Softeria

Microsoft 365 MCP Server

by Softeria

get-drive-item

get-drive-item
Read-only

Retrieve metadata for a drive file or folder, including name, size, modified date, author, web URL, and download link.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.154.2
    • addedInput schema / properties / expand / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / expand / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / expand / type
      Removed value: -"array"
    • addedInput schema / properties / select / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / select / type
      Removed value: -"string"
  2. Addedv0.134.4
  3. Removedv0.131.2
  4. Addedv0.114.0
  5. Removedv0.112.2
  6. Addedv0.110.0
  7. Removedv0.108.0
  8. Addedv0.96.0

TDQS

A3.8/5.0
Behavior4/5

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

With annotations already declaring readOnlyHint=true and destructiveHint=false, the description adds useful behavioral context: 'Read-only. Nullable.' and the fact that the response includes a download URL (@microsoft.graph.downloadUrl). It does not disclose auth requirements or error behavior, but the annotations cover the safety profile and the description extends it with response-level details.

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 relatively compact, but the first sentence 'All items contained in the drive. Read-only. Nullable.' is a cryptic fragment that does not earn its place and actively muddies the purpose. The TIP paragraph is useful and well-structured, but the weak opener prevents a higher score.

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 read-only metadata lookup with a fully documented schema, the description covers the essential context: what the item is, what fields are returned, and when to switch to download tools. It does not explain return shapes or pagination, but given the schema's completeness and the read-only nature, it is adequate. The misleading opener is the main gap.

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 coverage is 100%, so the input schema fully documents all seven parameters. The description does not add any extra meaning to parameters like driveId, driveItemId, expand, or select; it only references the /content target in the context of other tools. This meets the baseline of 3 for high coverage with no additional description compensation.

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 'Gets metadata for a file or folder' and enumerates the specific fields returned, which distinguishes it from listing or downloading tools. However, the opening sentence 'All items contained in the drive. Read-only. Nullable.' is misleading and could suggest this tool lists all drive items, creating initial confusion before the clarifying TIP.

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 alternatives: 'For large drive/SharePoint files, call get-download-url...' and 'For small files... call download-bytes.' This clearly routes agents to the right tool for content retrieval. It does not explicitly contrast with get-drive-root-item or list-folder-files, but the focus on metadata by ID is implicitly clear.

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

Deploy Server

Other Tools