Skip to main content
Glama

delete_file

Remove files from shared Obsidian vault folders to manage content and trigger sync updates across collaborative workspaces.

Instructions

Delete a file from a folder share.

Removes the file from the folder's metadata registry. The file disappears from Obsidian on next sync.

Args: share_id: UUID of the folder share. file_path: File path within the folder (e.g. "old-note.md").

Returns: JSON with path and status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
share_idYes
file_pathYes

Implementation Reference

  • The delete_file tool handler that deletes a file from a folder share. It takes share_id and file_path parameters, URL-encodes the path, and makes a DELETE request to the Relay API endpoint at /v1/documents/{share_id}/files/{encoded_path}. The file is removed from the folder's metadata registry and disappears from Obsidian on next sync.
    @mcp.tool() def delete_file(share_id: str, file_path: str) -> str: """Delete a file from a folder share. Removes the file from the folder's metadata registry. The file disappears from Obsidian on next sync. Args: share_id: UUID of the folder share. file_path: File path within the folder (e.g. "old-note.md"). Returns: JSON with path and status. """ encoded_path = quote(file_path, safe="") with _get_client() as client: r = client.delete( f"{_get_base_url()}/v1/documents/{share_id}/files/{encoded_path}", headers=_headers(), params={"share_id": share_id}, ) r.raise_for_status() return r.text
  • relay_mcp.py:338-338 (registration)
    Tool registration using the @mcp.tool() decorator which registers the delete_file function with the FastMCP server.
    @mcp.tool()

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/entire-vc/evc-team-relay-mcp'

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