Skip to main content
Glama
Softeria

Microsoft 365 MCP Server

by Softeria

get-upload-url

Mint a short-lived, single-use URL that this server serves for uploading a file as an attachment to a draft message or an event, so the bytes go straight from the caller to Microsoft Graph instead of passing as base64 through the agent…

Instructions

Mint a short-lived, single-use URL that this server serves for uploading a file as an attachment to a draft message or an event, so the bytes go straight from the caller to Microsoft Graph instead of passing as base64 through the agent context. target is the attachments collection of the item: /me/messages/{message-id}/attachments (a draft; create it first) or /me/events/{event-id}/attachments. PUT the raw file bytes to the returned uploadUrl with a Content-Length (e.g. curl -T file ""); the response confirms the attachment. Files under 3 MB are attached directly, larger ones (up to 150 MB) through a Graph upload session. Requires --enable-attachment-urls. Returns { uploadUrl, method, expiresAt, singleUse, maxBytes }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAttachment file name as the recipient will see it, e.g. report.pdf
targetYesAttachments collection of a draft message or an event, e.g. /me/messages/{message-id}/attachments or /me/events/{event-id}/attachments.
contentTypeNoMIME type of the file, e.g. application/pdf. Defaults to application/octet-stream.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.166.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, openWorldHint=true): single-use, expiring URL, 3 MB direct-attach vs up to 150 MB upload session, and a required server flag (--enable-attachment-urls). The curl/Content-Length mechanics and the 'response confirms the attachment' note give the agent everything needed to execute safely.

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-loads the purpose in the first clause, then layers usage, size thresholds, and return shape; every sentence carries information. The single dense paragraph is longer than strictly needed but wastes little.

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?

With no output schema, the description enumerates the return shape ({ uploadUrl, method, expiresAt, singleUse, maxBytes }), the size-dependent behavior, and the feature-flag prerequisite. Nothing an agent needs to call and consume this tool correctly is missing.

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%, so baseline is 3, but the description adds real meaning beyond it: target is the item's attachments collection and must reference a pre-existing draft, and name is what the recipient sees. The flow context (URL is PUT-to, not GET) is not recoverable from the bare schema.

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?

Specific verb+resource: mints a short-lived, single-use URL for uploading a file as an attachment to a draft message or event, and implicitly contrasts with the base64 path (add-mail-attachment). It does not name the closely related siblings (create-mail-attachment-upload-session, create-calendar-event-attachment-upload-session), so an agent must still infer which of the three attachment-upload tools applies.

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?

Gives concrete preconditions and steps: target must point at an existing draft ('create it first'), PUT raw bytes to the returned URL with Content-Length, with a curl example. It stops short of stating when to pick this over the sibling upload-session tools, so the exclusions are left implicit.

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