get_document_content
Retrieve document content from Goodday project management using the document ID to access specific files for reference or analysis.
Instructions
Get the content of a specific document by its ID.
Args: document_id: The ID of the document to retrieve
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes |
Implementation Reference
- goodday_mcp/main.py:1335-1355 (handler)The handler and registration for the 'get_document_content' tool. Decorated with @mcp.tool(), it fetches document content from Goodday API endpoint 'document/{document_id}' using the shared make_goodday_request helper, handles errors, extracts content, and formats the response.async def get_document_content(document_id: str) -> str: """Get the content of a specific document by its ID. Args: document_id: The ID of the document to retrieve """ data = await make_goodday_request(f"document/{document_id}") if not data: return "Document not found or no content available." if isinstance(data, dict) and "error" in data: return f"Unable to fetch document: {data.get('error', 'Unknown error')}" if isinstance(data, dict): content = data.get('content', data.get('text', str(data))) else: content = str(data) return f"**Document Content:**\n\n{content}"