Skip to main content
Glama

delete_file

Remove specified files or folders by providing the file ID and account ID using a Microsoft MCP server integration. Ensures efficient file management within connected Microsoft services.

Instructions

Delete a file or folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes
file_idYes

Implementation Reference

  • The delete_file tool handler that deletes a file or folder from OneDrive by sending a DELETE request to the Microsoft Graph API endpoint /me/drive/items/{file_id}.
    @mcp.tool def delete_file(file_id: str, account_id: str) -> dict[str, str]: """Delete a file or folder""" graph.request("DELETE", f"/me/drive/items/{file_id}", account_id) return {"status": "deleted"}

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/elyxlz/microsoft-mcp'

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