list_shares
Retrieve accessible shared documents and folders from the Obsidian vault, with filtering options for type and ownership.
Instructions
List all accessible shares.
Args: kind: Filter by share type — "doc" or "folder". Empty for all. owned_only: If true, only return shares owned by the user.
Returns: JSON array of shares with id, kind, path, visibility, user_role.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| owned_only | No |
Implementation Reference
- relay_mcp.py:120-144 (handler)The list_shares tool implementation with @mcp.tool() registration decorator. It accepts optional 'kind' and 'owned_only' parameters to filter shares, makes an authenticated GET request to /v1/shares endpoint, and returns the JSON response as text.@mcp.tool() def list_shares(kind: str = "", owned_only: bool = False) -> str: """List all accessible shares. Args: kind: Filter by share type — "doc" or "folder". Empty for all. owned_only: If true, only return shares owned by the user. Returns: JSON array of shares with id, kind, path, visibility, user_role. """ params: dict[str, Any] = {} if kind: params["kind"] = kind if owned_only: params["owned_only"] = "true" with _get_client() as client: r = client.get( f"{_get_base_url()}/v1/shares", headers=_headers(), params=params, ) r.raise_for_status() return r.text