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"}
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Delete' implies a destructive mutation, but the description doesn't disclose whether deletion is permanent or reversible, what permissions are required, if there are rate limits, or what happens on success/failure. For a destructive tool with zero annotation coverage, this is a significant gap in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words. It is front-loaded with the core action and resource, making it easy to parse. Every word earns its place by specifying the scope ('file or folder').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a destructive tool with no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It doesn't explain the mutation's impact, required permissions, error conditions, or return values. For a tool that permanently removes data, more context is needed to use it safely and effectively.

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

Parameters2/5

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

Schema description coverage is 0%, so the schema provides no parameter documentation. The description adds no information about the two required parameters (account_id and file_id), such as what they represent, where to find them, or format examples. It fails to compensate for the schema's lack of descriptions.

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 the verb ('Delete') and resource ('a file or folder'), making the purpose immediately understandable. It distinguishes from siblings like 'delete_contact' and 'delete_email' by specifying the resource type. However, it doesn't specify whether this is permanent deletion or moves to trash, which would make it a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (like authentication), distinguish from 'update_file' for modification, or reference sibling tools like 'move_email' for relocation. The agent must infer usage from the tool name alone.

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

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

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