Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OLLAMA_URLNoBase URL of the Ollama service.http://localhost:11434
OLLAMA_MODELNoChat model for classification, extraction and queries.qwen2.5:14b
PAPERLESS_URLNoBase URL of your Paperless-ngx instance. Required with PAPERLESS_TOKEN to execute document tools.
VECTOR_DB_PATHNoLocal SQLite file for the vector index../data/vectors.db
PAPERLESS_TOKENNoPaperless API token for document operations. Optional for listing tools.
OLLAMA_VISION_MODELNoOptional vision model for photo receipts.
PAPERCORTEX_DATA_DIRNoDirectory for settings and the receipt cache.
OLLAMA_EMBEDDING_MODELNoEmbedding model used for semantic search.nomic-embed-text
PAPERCORTEX_EXPORT_DIRNoDirectory for generated exports.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Listing tools requires no credentials. To run them, configure PAPERLESS_URL and PAPERLESS_TOKEN and restart the server. Use an Ollama service you trust with document text. Build the local search index before using search or query.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
papercortex_searchA

Find matching documents in the local Paperless search index. Returns ranked IDs, titles, tags, similarity scores and short excerpts as text. Use the IDs for receipt extraction or classification. Use papercortex_query for a synthesized answer. Only indexed documents are searched.

papercortex_classifyA

Suggest metadata for one existing Paperless document using its OCR text and Ollama. Returns a text report with suggested tags, type, correspondent, language, summary and confidence. The suggestions are for review. The tool leaves the document and its tags unchanged, including when applyTags is true.

papercortex_receiptA

Read one receipt or invoice by Paperless document ID. Ollama extracts vendor, date, currency, totals, tax and line items into a labeled text report with model confidence. Missing totals default to 0 and missing currencies to EUR. Check these values against the original. Uses OCR text or a configured vision model and reports an error if extraction fails. Use papercortex_search to find an ID and papercortex_export to produce accounting files.

papercortex_queryA

Answer a question using Ollama and the closest matching excerpts from the local search index. Returns an answer with source IDs, titles and relevance scores, or a message when no sources match. Use papercortex_search to browse matches. For exact archive-wide totals, a sample of retrieved excerpts is insufficient.

papercortex_exportA

Export selected Paperless receipts, using a local extraction cache. DATEV requires configured accounting settings and writes batch files in the export directory, replacing matching filenames. Its text report lists paths and skipped receipts. CSV returns successful rows inline. Use papercortex_receipt to inspect a single receipt first.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct capability: retrieval (search), synthesis (query), metadata suggestion (classify), receipt field extraction (receipt), and file generation (export). The search/query pair is the only potential overlap, and both descriptions explicitly cross-reference each other and explain when to use which. classify and receipt both invoke Ollama on a single document but produce clearly different outputs (tags/type/correspondent vs. vendor/totals/line items).

Naming Consistency5/5

All five tools use a uniform `papercortex_` prefix followed by a single lowercase noun/verb in snake_case (search, classify, receipt, query, export). No camelCase mixing, no stray suffixes, and the prefix makes the server's tools trivially groupable.

Tool Count5/5

Five tools is tightly scoped for a Paperless document-intelligence server, and each covers a genuinely different stage of the workflow (find → answer → classify → extract → export). There are no redundant or filler tools, and the count stays well inside the comfortable 3-15 range.

Completeness3/5

The surface is read/analyze-only: there is no way to apply suggested tags, update a document, or list correspondents/tags, and the `applyTags` parameter on classify is explicitly a no-op, which is a misleading dead end for agents expecting a write path. Core read workflows (search, query, classify, receipt, export) are covered, but lifecycle coverage for acting on results is missing.

Maintenance

ActivityNo data
ResponsivenessOutdated data