rossum-mcp 0.3.4__tar.gz → 0.3.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/PKG-INFO +255 -5
  2. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/README.md +254 -4
  3. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/pyproject.toml +1 -1
  4. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp/__init__.py +1 -1
  5. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp/server.py +2 -0
  6. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp/tools/__init__.py +2 -0
  7. rossum_mcp-0.3.5/rossum_mcp/tools/annotations.py +167 -0
  8. rossum_mcp-0.3.5/rossum_mcp/tools/base.py +40 -0
  9. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp/tools/document_relations.py +1 -3
  10. rossum_mcp-0.3.5/rossum_mcp/tools/email_templates.py +131 -0
  11. rossum_mcp-0.3.5/rossum_mcp/tools/engines.py +159 -0
  12. rossum_mcp-0.3.5/rossum_mcp/tools/hooks.py +343 -0
  13. rossum_mcp-0.3.5/rossum_mcp/tools/queues.py +299 -0
  14. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp/tools/relations.py +3 -7
  15. rossum_mcp-0.3.5/rossum_mcp/tools/rules.py +53 -0
  16. rossum_mcp-0.3.5/rossum_mcp/tools/schemas.py +781 -0
  17. rossum_mcp-0.3.5/rossum_mcp/tools/users.py +84 -0
  18. rossum_mcp-0.3.5/rossum_mcp/tools/workspaces.py +78 -0
  19. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp.egg-info/PKG-INFO +255 -5
  20. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp.egg-info/SOURCES.txt +1 -0
  21. rossum_mcp-0.3.4/rossum_mcp/tools/annotations.py +0 -130
  22. rossum_mcp-0.3.4/rossum_mcp/tools/base.py +0 -18
  23. rossum_mcp-0.3.4/rossum_mcp/tools/engines.py +0 -130
  24. rossum_mcp-0.3.4/rossum_mcp/tools/hooks.py +0 -265
  25. rossum_mcp-0.3.4/rossum_mcp/tools/queues.py +0 -133
  26. rossum_mcp-0.3.4/rossum_mcp/tools/rules.py +0 -42
  27. rossum_mcp-0.3.4/rossum_mcp/tools/schemas.py +0 -384
  28. rossum_mcp-0.3.4/rossum_mcp/tools/users.py +0 -60
  29. rossum_mcp-0.3.4/rossum_mcp/tools/workspaces.py +0 -65
  30. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp/logging_config.py +0 -0
  31. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp/py.typed +0 -0
  32. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp.egg-info/dependency_links.txt +0 -0
  33. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp.egg-info/entry_points.txt +0 -0
  34. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp.egg-info/requires.txt +0 -0
  35. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/rossum_mcp.egg-info/top_level.txt +0 -0
  36. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/setup.cfg +0 -0
  37. {rossum_mcp-0.3.4 → rossum_mcp-0.3.5}/tests/test_logging_config.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rossum-mcp
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: MCP server for AI-powered Rossum orchestration: document workflows, debug pipelines automatically, and configure intelligent document processing through natural language.
5
5
  Author-email: "Dan Stancl (Rossum AI)" <daniel.stancl@gmail.com>
6
6
  License: MIT
@@ -43,14 +43,25 @@ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "all"
43
43
  [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://stancld.github.io/rossum-mcp/)
44
44
  [![Python](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
45
45
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
46
- [![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io/)
47
- [![MCP Tools](https://img.shields.io/badge/MCP_Tools-39-blue.svg)](#available-tools)
46
+ [![PyPI - rossum-mcp](https://img.shields.io/pypi/v/rossum-mcp?label=rossum-mcp)](https://pypi.org/project/rossum-mcp/)
47
+ [![Coverage](https://codecov.io/gh/stancld/rossum-mcp/branch/master/graph/badge.svg?flag=rossum-mcp)](https://codecov.io/gh/stancld/rossum-mcp)
48
+ [![MCP Tools](https://img.shields.io/badge/MCP_Tools-49-blue.svg)](#available-tools)
49
+
48
50
  [![Rossum API](https://img.shields.io/badge/Rossum-API-orange.svg)](https://github.com/rossumai/rossum-api)
51
+ [![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io/)
52
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
53
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
49
54
 
50
55
  </div>
51
56
 
52
57
  A Model Context Protocol (MCP) server that provides tools for uploading documents and retrieving annotations using the Rossum API. Built with Python and the official [rossum-api](https://github.com/rossumai/rossum-api).
53
58
 
59
+ > [!NOTE]
60
+ > This is not an official Rossum project. It is a community-developed integration built on top of the Rossum API.
61
+
62
+ > [!WARNING]
63
+ > This project is in early stage development. Breaking changes to both implementation and agent behavior are expected.
64
+
54
65
  ## Features
55
66
 
56
67
  ### Document Processing
@@ -63,7 +74,10 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
63
74
 
64
75
  ### Queue & Schema Management
65
76
  - **get_queue**: Retrieve queue details including schema_id
77
+ - **list_queues**: List all queues with optional filtering by workspace or name
66
78
  - **get_schema**: Retrieve schema details and content
79
+ - **list_schemas**: List all schemas with optional filtering by name or queue
80
+ - **get_schema_tree_structure**: Get lightweight tree view of schema with only ids, labels, categories, and types
67
81
  - **get_queue_schema**: Retrieve complete schema for a queue in a single call
68
82
  - **get_queue_engine**: Retrieve engine information for a queue
69
83
  - **create_queue**: Create a new queue with schema and optional engine assignment
@@ -71,6 +85,7 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
71
85
  - **update_queue**: Update queue settings including automation thresholds
72
86
  - **update_schema**: Update schema with field-level automation thresholds
73
87
  - **patch_schema**: Add, update, or remove individual schema nodes without replacing entire content
88
+ - **prune_schema_fields**: Efficiently remove multiple fields from schema at once (for organization setup)
74
89
 
75
90
  ### Workspace Management
76
91
  - **get_workspace**: Retrieve workspace details by ID
@@ -101,6 +116,11 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
101
116
  - **get_rule**: Get business rule details
102
117
  - **list_rules**: List business rules with trigger conditions and actions
103
118
 
119
+ ### Email Templates
120
+ - **get_email_template**: Retrieve email template details by ID
121
+ - **list_email_templates**: List email templates with optional filtering by queue, type, or name
122
+ - **create_email_template**: Create email templates for automated or manual email sending
123
+
104
124
  ### Relations Management
105
125
  - **get_relation**: Retrieve relation details by ID
106
126
  - **list_relations**: List all relations between annotations (edit, attachment, duplicate)
@@ -160,10 +180,11 @@ uv sync --extra tests # Testing only
160
180
 
161
181
  When `ROSSUM_MCP_MODE` is set to `read-only`, only read operations are available:
162
182
  - **Annotations:** `get_annotation`, `list_annotations`
163
- - **Queues:** `get_queue`, `get_queue_schema`, `get_queue_engine`
164
- - **Schemas:** `get_schema`
183
+ - **Queues:** `get_queue`, `list_queues`, `get_queue_schema`, `get_queue_engine`
184
+ - **Schemas:** `get_schema`, `list_schemas`
165
185
  - **Engines:** `get_engine`, `list_engines`, `get_engine_fields`
166
186
  - **Hooks:** `get_hook`, `list_hooks`, `list_hook_templates`, `list_hook_logs`
187
+ - **Email Templates:** `get_email_template`, `list_email_templates`
167
188
  - **Users:** `get_user`, `list_users`, `list_user_roles`
168
189
  - **Rules:** `get_rule`, `list_rules`
169
190
  - **Relations:** `get_relation`, `list_relations`
@@ -373,6 +394,46 @@ Retrieves queue details including the schema_id.
373
394
  **Parameters:**
374
395
  - `queue_id` (integer, required): Rossum queue ID to retrieve
375
396
 
397
+ #### list_queues
398
+
399
+ Lists all queues with optional filtering by workspace or name.
400
+
401
+ **Parameters:**
402
+ - `workspace_id` (integer, optional): Filter by workspace ID
403
+ - `name` (string, optional): Filter by queue name
404
+
405
+ **Returns:**
406
+ ```json
407
+ [
408
+ {
409
+ "id": 12345,
410
+ "name": "Invoice Processing",
411
+ "url": "https://elis.rossum.ai/api/v1/queues/12345",
412
+ "workspace": "https://elis.rossum.ai/api/v1/workspaces/100",
413
+ "schema": "https://elis.rossum.ai/api/v1/schemas/200",
414
+ "inbox": "https://elis.rossum.ai/api/v1/inboxes/300",
415
+ "status": "active",
416
+ "locale": "en_GB",
417
+ "automation_enabled": true
418
+ }
419
+ ]
420
+ ```
421
+
422
+ **Example usage:**
423
+ ```python
424
+ # List all queues
425
+ all_queues = list_queues()
426
+
427
+ # List queues in a specific workspace
428
+ workspace_queues = list_queues(workspace_id=100)
429
+
430
+ # List queues by name
431
+ named_queues = list_queues(name="Invoice Processing")
432
+
433
+ # Combine filters
434
+ filtered_queues = list_queues(workspace_id=100, name="Invoice")
435
+ ```
436
+
376
437
  #### get_schema
377
438
 
378
439
  Retrieves schema details including the schema content/structure.
@@ -380,6 +441,44 @@ Retrieves schema details including the schema content/structure.
380
441
  **Parameters:**
381
442
  - `schema_id` (integer, required): Rossum schema ID to retrieve
382
443
 
444
+ #### list_schemas
445
+
446
+ Lists all schemas with optional filtering by name or queue.
447
+
448
+ **Parameters:**
449
+ - `name` (string, optional): Filter by schema name
450
+ - `queue_id` (integer, optional): Filter by queue ID
451
+
452
+ **Returns:**
453
+ ```json
454
+ [
455
+ {
456
+ "id": 12345,
457
+ "name": "Invoice Schema",
458
+ "url": "https://elis.rossum.ai/api/v1/schemas/12345",
459
+ "queues": ["https://elis.rossum.ai/api/v1/queues/100"],
460
+ "content": "<omitted>",
461
+ "metadata": {},
462
+ "modified_at": "2025-01-15T10:00:00Z"
463
+ }
464
+ ]
465
+ ```
466
+
467
+ **Example usage:**
468
+ ```python
469
+ # List all schemas
470
+ all_schemas = list_schemas()
471
+
472
+ # List schemas by name
473
+ named_schemas = list_schemas(name="Invoice Schema")
474
+
475
+ # List schemas used by a specific queue
476
+ queue_schemas = list_schemas(queue_id=100)
477
+
478
+ # Combine filters
479
+ filtered_schemas = list_schemas(name="Invoice", queue_id=100)
480
+ ```
481
+
383
482
  #### get_queue_schema
384
483
 
385
484
  Retrieves the complete schema for a queue in a single call. This is the recommended way to get a queue's schema.
@@ -1454,6 +1553,157 @@ annotation_doc_relations = list_document_relations(annotation=100)
1454
1553
  document_relations = list_document_relations(documents=200)
1455
1554
  ```
1456
1555
 
1556
+ ### Email Templates
1557
+
1558
+ #### get_email_template
1559
+
1560
+ Retrieves details of a specific email template by its ID.
1561
+
1562
+ **Parameters:**
1563
+ - `email_template_id` (integer, required): Email template ID
1564
+
1565
+ **Returns:**
1566
+ ```json
1567
+ {
1568
+ "id": 1500,
1569
+ "name": "Rejection Email",
1570
+ "url": "https://elis.rossum.ai/api/v1/email_templates/1500",
1571
+ "queue": "https://elis.rossum.ai/api/v1/queues/8199",
1572
+ "organization": "https://elis.rossum.ai/api/v1/organizations/1",
1573
+ "subject": "Document Rejected",
1574
+ "message": "<p>Your document has been rejected.</p>",
1575
+ "type": "rejection",
1576
+ "enabled": true,
1577
+ "automate": false,
1578
+ "triggers": [],
1579
+ "to": [{"type": "annotator", "value": ""}],
1580
+ "cc": [],
1581
+ "bcc": []
1582
+ }
1583
+ ```
1584
+
1585
+ **Example usage:**
1586
+ ```python
1587
+ # Get email template details
1588
+ template = get_email_template(email_template_id=1500)
1589
+ ```
1590
+
1591
+ #### list_email_templates
1592
+
1593
+ Lists all email templates with optional filters. Email templates define automated or manual email responses sent from Rossum queues.
1594
+
1595
+ **Parameters:**
1596
+ - `queue_id` (integer, optional): Filter by queue ID
1597
+ - `type` (string, optional): Filter by template type ('rejection', 'rejection_default', 'email_with_no_processable_attachments', 'custom')
1598
+ - `name` (string, optional): Filter by template name
1599
+ - `first_n` (integer, optional): Limit results to first N templates
1600
+
1601
+ **Returns:**
1602
+ ```json
1603
+ {
1604
+ "count": 2,
1605
+ "results": [
1606
+ {
1607
+ "id": 1500,
1608
+ "name": "Rejection Email",
1609
+ "type": "rejection",
1610
+ "queue": "https://elis.rossum.ai/api/v1/queues/8199",
1611
+ "automate": false
1612
+ },
1613
+ {
1614
+ "id": 1501,
1615
+ "name": "No Attachments Notification",
1616
+ "type": "email_with_no_processable_attachments",
1617
+ "queue": "https://elis.rossum.ai/api/v1/queues/8199",
1618
+ "automate": true
1619
+ }
1620
+ ]
1621
+ }
1622
+ ```
1623
+
1624
+ **Example usage:**
1625
+ ```python
1626
+ # List all email templates
1627
+ all_templates = list_email_templates()
1628
+
1629
+ # List email templates for a specific queue
1630
+ queue_templates = list_email_templates(queue_id=8199)
1631
+
1632
+ # List rejection templates
1633
+ rejection_templates = list_email_templates(type="rejection")
1634
+
1635
+ # List first 5 templates
1636
+ first_templates = list_email_templates(first_n=5)
1637
+ ```
1638
+
1639
+ #### create_email_template
1640
+
1641
+ Creates a new email template. Templates can be automated to send emails automatically on specific triggers, or manual for user-initiated sending.
1642
+
1643
+ **Parameters:**
1644
+ - `name` (string, required): Name of the email template
1645
+ - `queue` (string, required): URL of the queue to associate with
1646
+ - `subject` (string, required): Email subject line
1647
+ - `message` (string, required): Email body (HTML supported)
1648
+ - `type` (string, optional): Template type - 'rejection', 'rejection_default', 'email_with_no_processable_attachments', 'custom' (default: 'custom')
1649
+ - `automate` (boolean, optional): If true, email is sent automatically on trigger (default: false)
1650
+ - `to` (array, optional): List of recipient objects with 'type' and 'value' keys
1651
+ - `cc` (array, optional): List of CC recipient objects
1652
+ - `bcc` (array, optional): List of BCC recipient objects
1653
+ - `triggers` (array, optional): List of trigger URLs
1654
+
1655
+ **Recipient object types:**
1656
+ - `{"type": "annotator", "value": ""}` - Send to the document annotator
1657
+ - `{"type": "constant", "value": "email@example.com"}` - Send to a fixed email address
1658
+ - `{"type": "datapoint", "value": "email_field_id"}` - Send to email from a datapoint field
1659
+
1660
+ **Returns:**
1661
+ ```json
1662
+ {
1663
+ "id": 1502,
1664
+ "name": "Custom Notification",
1665
+ "url": "https://elis.rossum.ai/api/v1/email_templates/1502",
1666
+ "queue": "https://elis.rossum.ai/api/v1/queues/8199",
1667
+ "subject": "Document Processed",
1668
+ "message": "<p>Your document has been processed.</p>",
1669
+ "type": "custom",
1670
+ "automate": true,
1671
+ "to": [{"type": "constant", "value": "notifications@example.com"}]
1672
+ }
1673
+ ```
1674
+
1675
+ **Example usage:**
1676
+ ```python
1677
+ # Create a simple custom email template
1678
+ template = create_email_template(
1679
+ name="Processing Complete",
1680
+ queue="https://elis.rossum.ai/api/v1/queues/8199",
1681
+ subject="Document Processing Complete",
1682
+ message="<p>Your document has been successfully processed.</p>"
1683
+ )
1684
+
1685
+ # Create an automated rejection template
1686
+ template = create_email_template(
1687
+ name="Auto Rejection",
1688
+ queue="https://elis.rossum.ai/api/v1/queues/8199",
1689
+ subject="Document Rejected",
1690
+ message="<p>Your document could not be processed.</p>",
1691
+ type="rejection",
1692
+ automate=True,
1693
+ to=[{"type": "annotator", "value": ""}]
1694
+ )
1695
+
1696
+ # Create template with multiple recipients
1697
+ template = create_email_template(
1698
+ name="Team Notification",
1699
+ queue="https://elis.rossum.ai/api/v1/queues/8199",
1700
+ subject="New Document",
1701
+ message="<p>A new document has arrived.</p>",
1702
+ to=[{"type": "constant", "value": "team@example.com"}],
1703
+ cc=[{"type": "datapoint", "value": "sender_email"}]
1704
+ )
1705
+ ```
1706
+
1457
1707
  ## Annotation Status Workflow
1458
1708
 
1459
1709
  When a document is uploaded, the annotation progresses through various states:
@@ -5,14 +5,25 @@
5
5
  [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://stancld.github.io/rossum-mcp/)
6
6
  [![Python](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io/)
9
- [![MCP Tools](https://img.shields.io/badge/MCP_Tools-39-blue.svg)](#available-tools)
8
+ [![PyPI - rossum-mcp](https://img.shields.io/pypi/v/rossum-mcp?label=rossum-mcp)](https://pypi.org/project/rossum-mcp/)
9
+ [![Coverage](https://codecov.io/gh/stancld/rossum-mcp/branch/master/graph/badge.svg?flag=rossum-mcp)](https://codecov.io/gh/stancld/rossum-mcp)
10
+ [![MCP Tools](https://img.shields.io/badge/MCP_Tools-49-blue.svg)](#available-tools)
11
+
10
12
  [![Rossum API](https://img.shields.io/badge/Rossum-API-orange.svg)](https://github.com/rossumai/rossum-api)
13
+ [![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io/)
14
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
15
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
11
16
 
12
17
  </div>
13
18
 
14
19
  A Model Context Protocol (MCP) server that provides tools for uploading documents and retrieving annotations using the Rossum API. Built with Python and the official [rossum-api](https://github.com/rossumai/rossum-api).
15
20
 
21
+ > [!NOTE]
22
+ > This is not an official Rossum project. It is a community-developed integration built on top of the Rossum API.
23
+
24
+ > [!WARNING]
25
+ > This project is in early stage development. Breaking changes to both implementation and agent behavior are expected.
26
+
16
27
  ## Features
17
28
 
18
29
  ### Document Processing
@@ -25,7 +36,10 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
25
36
 
26
37
  ### Queue & Schema Management
27
38
  - **get_queue**: Retrieve queue details including schema_id
39
+ - **list_queues**: List all queues with optional filtering by workspace or name
28
40
  - **get_schema**: Retrieve schema details and content
41
+ - **list_schemas**: List all schemas with optional filtering by name or queue
42
+ - **get_schema_tree_structure**: Get lightweight tree view of schema with only ids, labels, categories, and types
29
43
  - **get_queue_schema**: Retrieve complete schema for a queue in a single call
30
44
  - **get_queue_engine**: Retrieve engine information for a queue
31
45
  - **create_queue**: Create a new queue with schema and optional engine assignment
@@ -33,6 +47,7 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
33
47
  - **update_queue**: Update queue settings including automation thresholds
34
48
  - **update_schema**: Update schema with field-level automation thresholds
35
49
  - **patch_schema**: Add, update, or remove individual schema nodes without replacing entire content
50
+ - **prune_schema_fields**: Efficiently remove multiple fields from schema at once (for organization setup)
36
51
 
37
52
  ### Workspace Management
38
53
  - **get_workspace**: Retrieve workspace details by ID
@@ -63,6 +78,11 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
63
78
  - **get_rule**: Get business rule details
64
79
  - **list_rules**: List business rules with trigger conditions and actions
65
80
 
81
+ ### Email Templates
82
+ - **get_email_template**: Retrieve email template details by ID
83
+ - **list_email_templates**: List email templates with optional filtering by queue, type, or name
84
+ - **create_email_template**: Create email templates for automated or manual email sending
85
+
66
86
  ### Relations Management
67
87
  - **get_relation**: Retrieve relation details by ID
68
88
  - **list_relations**: List all relations between annotations (edit, attachment, duplicate)
@@ -122,10 +142,11 @@ uv sync --extra tests # Testing only
122
142
 
123
143
  When `ROSSUM_MCP_MODE` is set to `read-only`, only read operations are available:
124
144
  - **Annotations:** `get_annotation`, `list_annotations`
125
- - **Queues:** `get_queue`, `get_queue_schema`, `get_queue_engine`
126
- - **Schemas:** `get_schema`
145
+ - **Queues:** `get_queue`, `list_queues`, `get_queue_schema`, `get_queue_engine`
146
+ - **Schemas:** `get_schema`, `list_schemas`
127
147
  - **Engines:** `get_engine`, `list_engines`, `get_engine_fields`
128
148
  - **Hooks:** `get_hook`, `list_hooks`, `list_hook_templates`, `list_hook_logs`
149
+ - **Email Templates:** `get_email_template`, `list_email_templates`
129
150
  - **Users:** `get_user`, `list_users`, `list_user_roles`
130
151
  - **Rules:** `get_rule`, `list_rules`
131
152
  - **Relations:** `get_relation`, `list_relations`
@@ -335,6 +356,46 @@ Retrieves queue details including the schema_id.
335
356
  **Parameters:**
336
357
  - `queue_id` (integer, required): Rossum queue ID to retrieve
337
358
 
359
+ #### list_queues
360
+
361
+ Lists all queues with optional filtering by workspace or name.
362
+
363
+ **Parameters:**
364
+ - `workspace_id` (integer, optional): Filter by workspace ID
365
+ - `name` (string, optional): Filter by queue name
366
+
367
+ **Returns:**
368
+ ```json
369
+ [
370
+ {
371
+ "id": 12345,
372
+ "name": "Invoice Processing",
373
+ "url": "https://elis.rossum.ai/api/v1/queues/12345",
374
+ "workspace": "https://elis.rossum.ai/api/v1/workspaces/100",
375
+ "schema": "https://elis.rossum.ai/api/v1/schemas/200",
376
+ "inbox": "https://elis.rossum.ai/api/v1/inboxes/300",
377
+ "status": "active",
378
+ "locale": "en_GB",
379
+ "automation_enabled": true
380
+ }
381
+ ]
382
+ ```
383
+
384
+ **Example usage:**
385
+ ```python
386
+ # List all queues
387
+ all_queues = list_queues()
388
+
389
+ # List queues in a specific workspace
390
+ workspace_queues = list_queues(workspace_id=100)
391
+
392
+ # List queues by name
393
+ named_queues = list_queues(name="Invoice Processing")
394
+
395
+ # Combine filters
396
+ filtered_queues = list_queues(workspace_id=100, name="Invoice")
397
+ ```
398
+
338
399
  #### get_schema
339
400
 
340
401
  Retrieves schema details including the schema content/structure.
@@ -342,6 +403,44 @@ Retrieves schema details including the schema content/structure.
342
403
  **Parameters:**
343
404
  - `schema_id` (integer, required): Rossum schema ID to retrieve
344
405
 
406
+ #### list_schemas
407
+
408
+ Lists all schemas with optional filtering by name or queue.
409
+
410
+ **Parameters:**
411
+ - `name` (string, optional): Filter by schema name
412
+ - `queue_id` (integer, optional): Filter by queue ID
413
+
414
+ **Returns:**
415
+ ```json
416
+ [
417
+ {
418
+ "id": 12345,
419
+ "name": "Invoice Schema",
420
+ "url": "https://elis.rossum.ai/api/v1/schemas/12345",
421
+ "queues": ["https://elis.rossum.ai/api/v1/queues/100"],
422
+ "content": "<omitted>",
423
+ "metadata": {},
424
+ "modified_at": "2025-01-15T10:00:00Z"
425
+ }
426
+ ]
427
+ ```
428
+
429
+ **Example usage:**
430
+ ```python
431
+ # List all schemas
432
+ all_schemas = list_schemas()
433
+
434
+ # List schemas by name
435
+ named_schemas = list_schemas(name="Invoice Schema")
436
+
437
+ # List schemas used by a specific queue
438
+ queue_schemas = list_schemas(queue_id=100)
439
+
440
+ # Combine filters
441
+ filtered_schemas = list_schemas(name="Invoice", queue_id=100)
442
+ ```
443
+
345
444
  #### get_queue_schema
346
445
 
347
446
  Retrieves the complete schema for a queue in a single call. This is the recommended way to get a queue's schema.
@@ -1416,6 +1515,157 @@ annotation_doc_relations = list_document_relations(annotation=100)
1416
1515
  document_relations = list_document_relations(documents=200)
1417
1516
  ```
1418
1517
 
1518
+ ### Email Templates
1519
+
1520
+ #### get_email_template
1521
+
1522
+ Retrieves details of a specific email template by its ID.
1523
+
1524
+ **Parameters:**
1525
+ - `email_template_id` (integer, required): Email template ID
1526
+
1527
+ **Returns:**
1528
+ ```json
1529
+ {
1530
+ "id": 1500,
1531
+ "name": "Rejection Email",
1532
+ "url": "https://elis.rossum.ai/api/v1/email_templates/1500",
1533
+ "queue": "https://elis.rossum.ai/api/v1/queues/8199",
1534
+ "organization": "https://elis.rossum.ai/api/v1/organizations/1",
1535
+ "subject": "Document Rejected",
1536
+ "message": "<p>Your document has been rejected.</p>",
1537
+ "type": "rejection",
1538
+ "enabled": true,
1539
+ "automate": false,
1540
+ "triggers": [],
1541
+ "to": [{"type": "annotator", "value": ""}],
1542
+ "cc": [],
1543
+ "bcc": []
1544
+ }
1545
+ ```
1546
+
1547
+ **Example usage:**
1548
+ ```python
1549
+ # Get email template details
1550
+ template = get_email_template(email_template_id=1500)
1551
+ ```
1552
+
1553
+ #### list_email_templates
1554
+
1555
+ Lists all email templates with optional filters. Email templates define automated or manual email responses sent from Rossum queues.
1556
+
1557
+ **Parameters:**
1558
+ - `queue_id` (integer, optional): Filter by queue ID
1559
+ - `type` (string, optional): Filter by template type ('rejection', 'rejection_default', 'email_with_no_processable_attachments', 'custom')
1560
+ - `name` (string, optional): Filter by template name
1561
+ - `first_n` (integer, optional): Limit results to first N templates
1562
+
1563
+ **Returns:**
1564
+ ```json
1565
+ {
1566
+ "count": 2,
1567
+ "results": [
1568
+ {
1569
+ "id": 1500,
1570
+ "name": "Rejection Email",
1571
+ "type": "rejection",
1572
+ "queue": "https://elis.rossum.ai/api/v1/queues/8199",
1573
+ "automate": false
1574
+ },
1575
+ {
1576
+ "id": 1501,
1577
+ "name": "No Attachments Notification",
1578
+ "type": "email_with_no_processable_attachments",
1579
+ "queue": "https://elis.rossum.ai/api/v1/queues/8199",
1580
+ "automate": true
1581
+ }
1582
+ ]
1583
+ }
1584
+ ```
1585
+
1586
+ **Example usage:**
1587
+ ```python
1588
+ # List all email templates
1589
+ all_templates = list_email_templates()
1590
+
1591
+ # List email templates for a specific queue
1592
+ queue_templates = list_email_templates(queue_id=8199)
1593
+
1594
+ # List rejection templates
1595
+ rejection_templates = list_email_templates(type="rejection")
1596
+
1597
+ # List first 5 templates
1598
+ first_templates = list_email_templates(first_n=5)
1599
+ ```
1600
+
1601
+ #### create_email_template
1602
+
1603
+ Creates a new email template. Templates can be automated to send emails automatically on specific triggers, or manual for user-initiated sending.
1604
+
1605
+ **Parameters:**
1606
+ - `name` (string, required): Name of the email template
1607
+ - `queue` (string, required): URL of the queue to associate with
1608
+ - `subject` (string, required): Email subject line
1609
+ - `message` (string, required): Email body (HTML supported)
1610
+ - `type` (string, optional): Template type - 'rejection', 'rejection_default', 'email_with_no_processable_attachments', 'custom' (default: 'custom')
1611
+ - `automate` (boolean, optional): If true, email is sent automatically on trigger (default: false)
1612
+ - `to` (array, optional): List of recipient objects with 'type' and 'value' keys
1613
+ - `cc` (array, optional): List of CC recipient objects
1614
+ - `bcc` (array, optional): List of BCC recipient objects
1615
+ - `triggers` (array, optional): List of trigger URLs
1616
+
1617
+ **Recipient object types:**
1618
+ - `{"type": "annotator", "value": ""}` - Send to the document annotator
1619
+ - `{"type": "constant", "value": "email@example.com"}` - Send to a fixed email address
1620
+ - `{"type": "datapoint", "value": "email_field_id"}` - Send to email from a datapoint field
1621
+
1622
+ **Returns:**
1623
+ ```json
1624
+ {
1625
+ "id": 1502,
1626
+ "name": "Custom Notification",
1627
+ "url": "https://elis.rossum.ai/api/v1/email_templates/1502",
1628
+ "queue": "https://elis.rossum.ai/api/v1/queues/8199",
1629
+ "subject": "Document Processed",
1630
+ "message": "<p>Your document has been processed.</p>",
1631
+ "type": "custom",
1632
+ "automate": true,
1633
+ "to": [{"type": "constant", "value": "notifications@example.com"}]
1634
+ }
1635
+ ```
1636
+
1637
+ **Example usage:**
1638
+ ```python
1639
+ # Create a simple custom email template
1640
+ template = create_email_template(
1641
+ name="Processing Complete",
1642
+ queue="https://elis.rossum.ai/api/v1/queues/8199",
1643
+ subject="Document Processing Complete",
1644
+ message="<p>Your document has been successfully processed.</p>"
1645
+ )
1646
+
1647
+ # Create an automated rejection template
1648
+ template = create_email_template(
1649
+ name="Auto Rejection",
1650
+ queue="https://elis.rossum.ai/api/v1/queues/8199",
1651
+ subject="Document Rejected",
1652
+ message="<p>Your document could not be processed.</p>",
1653
+ type="rejection",
1654
+ automate=True,
1655
+ to=[{"type": "annotator", "value": ""}]
1656
+ )
1657
+
1658
+ # Create template with multiple recipients
1659
+ template = create_email_template(
1660
+ name="Team Notification",
1661
+ queue="https://elis.rossum.ai/api/v1/queues/8199",
1662
+ subject="New Document",
1663
+ message="<p>A new document has arrived.</p>",
1664
+ to=[{"type": "constant", "value": "team@example.com"}],
1665
+ cc=[{"type": "datapoint", "value": "sender_email"}]
1666
+ )
1667
+ ```
1668
+
1419
1669
  ## Annotation Status Workflow
1420
1670
 
1421
1671
  When a document is uploaded, the annotation progresses through various states:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rossum-mcp"
7
- version = "0.3.4"
7
+ version = "0.3.5"
8
8
  description = "MCP server for AI-powered Rossum orchestration: document workflows, debug pipelines automatically, and configure intelligent document processing through natural language."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.3.4"
3
+ __version__ = "0.3.5"
@@ -18,6 +18,7 @@ from rossum_mcp.logging_config import setup_logging
18
18
  from rossum_mcp.tools import (
19
19
  register_annotation_tools,
20
20
  register_document_relation_tools,
21
+ register_email_template_tools,
21
22
  register_engine_tools,
22
23
  register_hook_tools,
23
24
  register_queue_tools,
@@ -49,6 +50,7 @@ register_queue_tools(mcp, client)
49
50
  register_schema_tools(mcp, client)
50
51
  register_engine_tools(mcp, client)
51
52
  register_hook_tools(mcp, client)
53
+ register_email_template_tools(mcp, client)
52
54
  register_document_relation_tools(mcp, client)
53
55
  register_relation_tools(mcp, client)
54
56
  register_rule_tools(mcp, client)