---
name: sirdas-documents
description: Read, understand and act on PDF documents locally with the Sırdaş MCP server or CLI — invoices, contracts, medical records, IDs, tax forms, bank statements. Use when the user shares or mentions a PDF and wants its content, key fields, tables, a summary, anonymized text for an AI, cited chunks for RAG, or to protect, unlock, merge, split, number, watermark or compare documents. Nothing is uploaded.
---

# Sırdaş: local document skills for agents

Every operation runs on the user's machine. No file, text or field leaves it, so it is safe for health, legal and financial documents.

## Setup (once)

Claude Code: `claude mcp add sirdas -- npx -y @sirdaspdf/mcp`
Other MCP clients: `{"mcpServers": {"sirdas": {"command": "npx", "args": ["-y", "@sirdaspdf/mcp"]}}}`
Without MCP: `npx sirdas <file.pdf>` (add `--json` for machine output).

Files must live inside the allowed root (default: the directory the server starts in; change it with `SIRDAS_ROOT`).

## The default workflow

1. **Always start with `read_document`.** One call unlocks restricted PDFs, runs OCR on scans, identifies the type, extracts key fields with page citations, anonymizes personal data, finds tables and returns cited chunks plus `next_steps`.
2. **Tell the user what it is**, in one line: type, pages, the 3–5 most useful fields (cite the page).
3. **Offer the `next_steps` proactively**, as a short choice — don't run write operations without a yes.
4. If `status` is `needs_password` or `wrong_password`, **ask the user** and call again with `password`. Never guess or brute-force.

## Choosing the next tool

| The user wants… | Tool |
|---|---|
| Ask an AI about a sensitive document | prompt `private_ai_answer` (anonymize → answer → `deanonymize_text`) |
| Index for search / RAG | `pdf_to_chunks` (use `id` as vector id; store `pages`, `section`) or prompt `index_pdf_for_rag` |
| Invoice lines or statement movements in Excel | `pdf_tables` |
| Just the fields from text you already have | `extract_fields` |
| What changed between two versions | `compare_pdfs` |
| Password on / off | `protect_pdf` / `unlock_pdf` |
| Remove, keep or rotate pages | `edit_pages` |
| «Página X de Y», CONFIDENCIAL stamp | `add_page_numbers`, `add_watermark` |
| Join / split / shrink | `merge_pdfs`, `split_pdf`, `compress_pdf_lossless` |
| Training data from many PDFs | `pdf_to_dataset`, `find_duplicates`, `check_contamination` |

## Honesty rules

- Type detection and field extraction are **rule-based**: say "looks like an invoice" and show the evidence when confidence is below 0.6.
- Anonymization can miss unusual formats: suggest a quick review before sharing outside.
- A watermark or copy restriction is not real protection; a password (AES-256) is.
