Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoBind address for HTTP transport127.0.0.1
MCP_PORTNoBind port for HTTP transport8000
OCR_LANGNoTesseract languages, e.g. eng+araeng
INVOICE_DBNoSQLite path./data/invoices.db
INVOICE_INBOXNoOnly folder the server may read images from./samples
MCP_TRANSPORTNoTransport mode: stdio or streamable-httpstdio

Instructions

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

Reads invoice images with computer vision (OpenCV + Tesseract OCR), validates them against Saudi VAT rules (15%) and stores them in a SQLite database for analysis. Use list_inbox to see new images, ingest_invoice to process one, and spending_report or query_invoices_sql to analyse stored data.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_inboxB

List invoice images in the inbox and whether each one has already been ingested.

extract_invoiceA

Run computer vision + OCR on an invoice image and return structured fields WITHOUT saving.

Args: filename: image file name inside the inbox, e.g. "inv_001.png"

ingest_invoiceB

Extract an invoice image and save it to the database. Invalid invoices are saved but flagged.

Args: filename: image file name inside the inbox

list_invoicesC

List stored invoices with optional filters. Dates are ISO strings (yyyy-mm-dd).

Categories: office_supplies, it_services, utilities, catering, logistics, maintenance, other.

get_invoiceA

Get one stored invoice with its line items and validation issues.

spending_reportB

Aggregate spend (count, subtotal, VAT, total) grouped by 'vendor', 'category' or 'month'.

query_invoices_sqlA

Run a read-only SQL SELECT against the invoice database (tables: invoices, line_items).

Read the invoices://schema resource first. Writes are rejected.

Prompts

Interactive templates invoked by user choice

NameDescription
monthly_spend_reportPrompt template for a monthly finance report. month format: yyyy-mm

Resources

Contextual data attached and managed by the client

NameDescription
schemaDatabase schema, so a model can write correct SQL.
summaryHeadline numbers: invoice count, vendors, total spend, VAT, invalid count, date range.

TDQS

A3.5/5.0

Scored across 7 tools

Disambiguation4/5

Each tool has a distinct role: listing inbox files vs. listing stored invoices, extracting without saving vs. ingesting with save, plus a report aggregator and a raw SQL escape hatch. The only real point of confusion is list_inbox vs. list_invoices, which differ in resource (inbox images vs. database records) but sound similar; descriptions clarify the difference.

Naming Consistency4/5

Most tools follow a clean verb_noun snake_case pattern (list_inbox, get_invoice, extract_invoice, ingest_invoice, list_invoices). spending_report drops the verb and query_invoices_sql appends a suffix, which are minor but noticeable deviations.

Tool Count5/5

Seven tools is a well-scoped surface for an invoice pipeline: inbox discovery, extraction, ingestion, retrieval, listing, aggregation, and SQL query. Every tool earns its place with no obvious filler.

Completeness4/5

The pipeline covers the full core lifecycle from inbox image to stored, queryable invoice with reporting. Gaps exist around mutation/cleanup (no delete or re-ingest/update of stored invoices, no way to resolve flagged validation issues), but read-only SQL and the flags field provide reasonable workarounds.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues