Skip to main content
Glama

upload-my-profile-photo

upload-my-profile-photo
Destructive

Update your Microsoft 365 profile photo by providing a base64-encoded JPEG image (max 4 MB).

Instructions

Update the photo for the specified contact, group, team, or user in a tenant. The size of the photo you can update to is limited to 4 MB. You can use either PATCH or PUT for this operation.

šŸ’” TIP: Uploads a new profile photo for the signed-in user. Body is a base64-encoded string of the image bytes (the server decodes before PUT). Photo must be JPEG, max 4 MB; the base64 travels as a tool argument and a truncated one is written without error, so resize before encoding instead of emitting a large string. Microsoft 365 generates HD downsized variants automatically (48x48, 64x64, 96x96, 120x120, 240x240, 360x360, 432x432, 504x504, 648x648). For work or school accounts, ProfilePhoto.ReadWrite.All is the more granular alternative permission. Use download-bytes with target=/me/photo/$value to retrieve the current photo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesBase64-encoded file content. The server decodes it and PUTs the raw bytes to Microsoft Graph.
confirmNoFor destructive operations when the confirm gate is enabled (MS365_MCP_REQUIRE_CONFIRM=true; off by default). Set to true only after the user has explicitly approved this action. When the gate is on, calls without confirm: true return { error: "confirmation_required" } without touching user data.
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?

With annotations already indicating destructiveHint=true and readOnlyHint=false, the description adds substantial value by disclosing the 4 MB limit, JPEG requirement, automatic HD variant generation, and the critical warning that a truncated base64 string is written without error. It also explains permission requirements and the decoding behavior, making the tool's behavior well-understood beyond 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.

Conciseness4/5

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

The description is somewhat verbose, with a formal sentence followed by a detailed tip. However, each piece of information is useful and non-redundant. It is front-loaded with the purpose statement, and the tip is logically appended. While it could be condensed, the extra details (like the truncation warning and HD variant list) justify the length. It is not bloated with irrelevant information.

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?

The description is complete for an agent to call the tool correctly. It covers the action, format, size constraints, permission considerations, and complementary retrieval method. It also addresses potential failure modes (truncation). Given there is no output schema, the description does not need to explain return values. The only slight ambiguity between 'specified contact, group, team, or user' and 'signed-in user' is resolved in the tip, so nothing critical is missing.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds significant meaning to the `body` parameter by explaining it must be a base64-encoded string of image bytes, JPEG format, and max 4 MB, plus the truncation warning. This goes beyond the schema's simple text. It also implicitly explains the confirm parameter's role in the destructive context, adding context that helps the agent decide when to set it true.

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 action: 'Update the photo for the specified contact, group, team, or user in a tenant.' It also specifies the resource (profile photo) and the operation (update/upload). The tip clarifies it is specifically for the signed-in user's photo, removing ambiguity. This distinguishes it from sibling tools like upload-file-content or create-upload-session, which are for drive 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?

The description provides practical usage guidance: it specifies the required format (JPEG), size limit (4 MB), the need to encode as base64, and a warning about truncation. It also suggests using download-bytes to retrieve the current photo, which helps the agent understand complementary tools. However, it does not explicitly compare with alternative upload tools or state when NOT to use this tool, so it falls just short of a 5.

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