list_files
Display files within a shared folder using the folder's unique share ID. Returns a JSON map of file paths with their document IDs and types.
Instructions
List files in a folder share.
Args: share_id: UUID of the folder share.
Returns: JSON with doc_id and files map (path -> {doc_id, type}).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| share_id | Yes |
Implementation Reference
- relay_mcp.py:147-164 (handler)The list_files tool handler implementation - makes a GET request to retrieve files from a folder share by share_id@mcp.tool() def list_files(share_id: str) -> str: """List files in a folder share. Args: share_id: UUID of the folder share. Returns: JSON with doc_id and files map (path -> {doc_id, type}). """ with _get_client() as client: r = client.get( f"{_get_base_url()}/v1/documents/{share_id}/files", headers=_headers(), params={"share_id": share_id}, ) r.raise_for_status() return r.text
- relay_mcp.py:147-147 (registration)The @mcp.tool() decorator that registers list_files as an MCP tool@mcp.tool()