Skip to main content
Glama

read_document

Retrieve document content from the evc-team-relay-mcp server using document or share identifiers. Supports reading shared folders and documents with structured JSON output.

Instructions

Read document content by doc_id (low-level).

For doc shares, omit doc_id — it defaults to share_id. For folder shares, pass the file's doc_id from list_files. Prefer read_file for folder shares.

Args: share_id: UUID of the share (for ACL check). doc_id: Document UUID. Defaults to share_id for doc shares. key: Yjs shared type key. Default "contents".

Returns: JSON with doc_id, content, format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
share_idYes
doc_idNo
keyNocontents

Implementation Reference

  • The read_document tool handler - reads document content from the EVC Relay API by doc_id. For doc shares, doc_id defaults to share_id. Uses authentication headers and returns JSON response with doc_id, content, and format.
    @mcp.tool()
    def read_document(share_id: str, doc_id: str = "", key: str = "contents") -> str:
        """Read document content by doc_id (low-level).
    
        For doc shares, omit doc_id — it defaults to share_id.
        For folder shares, pass the file's doc_id from list_files.
        Prefer read_file for folder shares.
    
        Args:
            share_id: UUID of the share (for ACL check).
            doc_id: Document UUID. Defaults to share_id for doc shares.
            key: Yjs shared type key. Default "contents".
    
        Returns:
            JSON with doc_id, content, format.
        """
        if not doc_id:
            doc_id = share_id
    
        with _get_client() as client:
            r = client.get(
                f"{_get_base_url()}/v1/documents/{doc_id}/content",
                headers=_headers(),
                params={"share_id": share_id, "key": key},
            )
            r.raise_for_status()
        return r.text
  • relay_mcp.py:219-220 (registration)
    The @mcp.tool() decorator registers read_document as an MCP tool with the FastMCP server.
    @mcp.tool()
    def read_document(share_id: str, doc_id: str = "", key: str = "contents") -> str:

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