sd_get_raw_document_by_id
Fetch raw XML for a TEI document by its xml:id to enable custom processing and edition-specific analysis.
Instructions
Retrieve raw XML document by its xml:id.
PURPOSE: Fetch raw XML for a document using its TEI xml:id attribute.
WHEN TO USE:
After finding a document via search or browse
When you need the raw XML for custom processing
As a low-level building block for edition-specific tools
WHEN NOT TO USE:
For exploring/discovering documents → use browse or search tools
When you only have a file path → use get_raw_document_by_path()
Args: document_id: The xml:id attribute of the TEI document collection: Optional collection filter (relative to data_path) ctx: FastMCP Context for progress reporting
Returns: RawDocument with id and xml content
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | No | ||
| document_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document identifier (xml:id or filename) | |
| xml | Yes | Raw XML content | |
| path | No | File path in database |