Skip to main content
Glama

delete_file

Remove files from the Grok MCP server to manage storage and maintain organization by specifying the file identifier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYes

Implementation Reference

  • This is the MCP tool handler for 'delete_file', which uses the client to delete a file by its ID.
    @mcp.tool()
    async def delete_file(file_id: str):
        client = Client(api_key=XAI_API_KEY)
        delete_response = client.files.delete(file_id)
        client.close()
        
        return f"Deleted file `{delete_response.id}`"

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/merterbak/Grok-MCP'

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