AI-powered Telegram bot for Paperless-ngx — chat with your document archive, upload and process documents, set metadata, and search — all from Telegram.
This server has critical definition gaps. Tool descriptions are present but generic (50-100 chars, below the 194-char baseline). Input schemas are visible but lack depth: parameters have types and basic descriptions, but no enums, ranges, or format constraints. The archive_document tool exposes user_token as a parameter, a critical security violation. No output schemas are documented. Error handling is absent from descriptions. Tool naming is acceptable (verb_noun pattern), but composition issues exist: archive_document combines file upload, OCR wait, and AI metadata analysis, three concerns that should be separate. No pagination support visible for search_documents despite returning lists.
Uploads a document file to Paperless-ngx, waits for OCR processing, and uses AI to analyze and set metadata (title, tags, correspondent, document type, storage path).
Clears the conversation history for the current user, starting a new topic.
Downloads a document by its Paperless ID and sends it as a PDF file.
Searches the Paperless-ngx document archive using natural language queries with AI assistance. Returns matching documents with metadata and download links.
user_token exposed as tool parameter (archive_document, search_documents, get_document). Credentials must never appear in tool parameters, they leak into logs and traces. Use server-side secret injection via environment variables.
archive_document combines three responsibilities: file upload, OCR wait, and AI metadata analysis. Should be split into separate tools (upload_document, wait_for_ocr, analyze_and_set_metadata) so agents can compose them independently.
No output schemas documented for any tool. LLMs cannot plan downstream calls or extract required fields without knowing response structure. Document what each tool returns (e.g., search_documents returns list of {doc_id, title, tags, download_url}).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 43 | <=2025-11-25 | v2 |
search_documents accepts conversation_history as string but no pagination (limit, offset, page_size). Returning unbounded lists risks context window exhaustion. Add limit (default 20, max 100) and offset/cursor parameters.
Descriptions lack actionable detail. 'Uploads a document file...' (archive_document) is 50 chars; baseline is 194. Add WHEN to use, prerequisites, and what happens on error. E.g., 'Uploads a document to Paperless-ngx, waits for OCR completion (may take 30s), then uses AI to suggest title, tags, correspondent, and storage path. Requires valid Paperless API token.'