@baruchiro/paperless-mcp
Version:
Model Context Protocol (MCP) server for interacting with Paperless-NGX document management system. Enables AI assistants to manage documents, tags, correspondents, and document types through the Paperless-NGX API.
30 lines (29 loc) • 1.07 kB
TypeScript
/**
* Resource URI builders for document/thumbnail downloads.
*
* URIs mirror document resources under a custom `paperless://` scheme, so the
* same identifiers can back MCP resources (`resources/list` / `resources/read`)
* without a second naming scheme.
*
* The scheme also keeps the URI well-formed regardless of filename
* content, which Python MCP clients (pydantic-validated) require.
*/
/**
* Optional flags for document download resource URIs.
*/
export interface DocumentResourceUriOptions {
original?: boolean;
}
/**
* Builds a resource URI for a downloaded document.
*
* The MCP resource URI is intentionally canonical and filename-free; filenames
* belong in resource metadata, while the URI identifies the fetchable content.
*/
export declare function buildDocumentResourceUri(id: number, optionsOrFilename?: DocumentResourceUriOptions | string): string;
/**
* Builds a resource URI for a document thumbnail.
*
* Mirrors `GET /api/documents/{id}/thumb/`.
*/
export declare function buildThumbnailResourceUri(id: number): string;