rossum-mcp 0.3.4__tar.gz → 0.4.0__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.
- {rossum_mcp-0.3.4/rossum_mcp.egg-info → rossum_mcp-0.4.0}/PKG-INFO +370 -12
- rossum_mcp-0.3.4/PKG-INFO → rossum_mcp-0.4.0/README.md +360 -49
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/pyproject.toml +12 -1
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp/__init__.py +1 -1
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp/server.py +4 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp/tools/__init__.py +14 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/annotations.py +167 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/base.py +40 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/catalog.py +169 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/discovery.py +36 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp/tools/document_relations.py +1 -3
- rossum_mcp-0.4.0/rossum_mcp/tools/email_templates.py +131 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/engines.py +159 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/hooks.py +343 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/queues.py +292 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp/tools/relations.py +3 -7
- rossum_mcp-0.4.0/rossum_mcp/tools/rules.py +53 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/schemas.py +784 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/users.py +84 -0
- rossum_mcp-0.4.0/rossum_mcp/tools/workspaces.py +75 -0
- rossum_mcp-0.3.4/README.md → rossum_mcp-0.4.0/rossum_mcp.egg-info/PKG-INFO +407 -11
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/SOURCES.txt +4 -0
- rossum_mcp-0.4.0/tests/test_catalog.py +134 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/tests/test_logging_config.py +41 -21
- rossum_mcp-0.3.4/rossum_mcp/tools/annotations.py +0 -130
- rossum_mcp-0.3.4/rossum_mcp/tools/base.py +0 -18
- rossum_mcp-0.3.4/rossum_mcp/tools/engines.py +0 -130
- rossum_mcp-0.3.4/rossum_mcp/tools/hooks.py +0 -265
- rossum_mcp-0.3.4/rossum_mcp/tools/queues.py +0 -133
- rossum_mcp-0.3.4/rossum_mcp/tools/rules.py +0 -42
- rossum_mcp-0.3.4/rossum_mcp/tools/schemas.py +0 -384
- rossum_mcp-0.3.4/rossum_mcp/tools/users.py +0 -60
- rossum_mcp-0.3.4/rossum_mcp/tools/workspaces.py +0 -65
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp/logging_config.py +0 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp/py.typed +0 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/dependency_links.txt +0 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/entry_points.txt +0 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/requires.txt +0 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/top_level.txt +0 -0
- {rossum_mcp-0.3.4 → rossum_mcp-0.4.0}/setup.cfg +0 -0
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rossum-mcp
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
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
|
|
7
7
|
Keywords: mcp,rossum,document-processing
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
8
17
|
Requires-Python: >=3.12
|
|
9
18
|
Description-Content-Type: text/markdown
|
|
10
19
|
Requires-Dist: fastmcp>2.0.0
|
|
@@ -43,17 +52,31 @@ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "all"
|
|
|
43
52
|
[](https://stancld.github.io/rossum-mcp/)
|
|
44
53
|
[](https://www.python.org/downloads/)
|
|
45
54
|
[](https://opensource.org/licenses/MIT)
|
|
46
|
-
[](https://pypi.org/project/rossum-mcp/)
|
|
56
|
+
[](https://codecov.io/gh/stancld/rossum-mcp)
|
|
57
|
+
[](#available-tools)
|
|
58
|
+
|
|
48
59
|
[](https://github.com/rossumai/rossum-api)
|
|
60
|
+
[](https://modelcontextprotocol.io/)
|
|
61
|
+
[](https://github.com/astral-sh/ruff)
|
|
62
|
+
[](https://github.com/astral-sh/ty)
|
|
63
|
+
[](https://github.com/astral-sh/uv)
|
|
49
64
|
|
|
50
65
|
</div>
|
|
51
66
|
|
|
52
67
|
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
68
|
|
|
69
|
+
> [!NOTE]
|
|
70
|
+
> This is not an official Rossum project. It is a community-developed integration built on top of the Rossum API.
|
|
71
|
+
|
|
72
|
+
> [!WARNING]
|
|
73
|
+
> This project is in early stage development. Breaking changes to both implementation and agent behavior are expected.
|
|
74
|
+
|
|
54
75
|
## Features
|
|
55
76
|
|
|
56
|
-
|
|
77
|
+
<details>
|
|
78
|
+
<summary><strong>Document Processing (6 tools)</strong></summary>
|
|
79
|
+
|
|
57
80
|
- **upload_document**: Upload a document to Rossum for processing
|
|
58
81
|
- **get_annotation**: Retrieve annotation data for a previously uploaded document
|
|
59
82
|
- **list_annotations**: List all annotations for a queue with optional filtering
|
|
@@ -61,9 +84,16 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
61
84
|
- **bulk_update_annotation_fields**: Bulk update annotation field values using JSON Patch operations
|
|
62
85
|
- **confirm_annotation**: Confirm annotation to move it to 'confirmed' status
|
|
63
86
|
|
|
64
|
-
|
|
87
|
+
</details>
|
|
88
|
+
|
|
89
|
+
<details>
|
|
90
|
+
<summary><strong>Queue & Schema Management (13 tools)</strong></summary>
|
|
91
|
+
|
|
65
92
|
- **get_queue**: Retrieve queue details including schema_id
|
|
93
|
+
- **list_queues**: List all queues with optional filtering by workspace or name
|
|
66
94
|
- **get_schema**: Retrieve schema details and content
|
|
95
|
+
- **list_schemas**: List all schemas with optional filtering by name or queue
|
|
96
|
+
- **get_schema_tree_structure**: Get lightweight tree view of schema with only ids, labels, categories, and types
|
|
67
97
|
- **get_queue_schema**: Retrieve complete schema for a queue in a single call
|
|
68
98
|
- **get_queue_engine**: Retrieve engine information for a queue
|
|
69
99
|
- **create_queue**: Create a new queue with schema and optional engine assignment
|
|
@@ -71,18 +101,31 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
71
101
|
- **update_queue**: Update queue settings including automation thresholds
|
|
72
102
|
- **update_schema**: Update schema with field-level automation thresholds
|
|
73
103
|
- **patch_schema**: Add, update, or remove individual schema nodes without replacing entire content
|
|
104
|
+
- **prune_schema_fields**: Efficiently remove multiple fields from schema at once (for organization setup)
|
|
105
|
+
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
<details>
|
|
109
|
+
<summary><strong>Workspace Management (3 tools)</strong></summary>
|
|
74
110
|
|
|
75
|
-
### Workspace Management
|
|
76
111
|
- **get_workspace**: Retrieve workspace details by ID
|
|
77
112
|
- **list_workspaces**: List all workspaces with optional filtering
|
|
78
113
|
- **create_workspace**: Create a new workspace
|
|
79
114
|
|
|
80
|
-
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><strong>User Management (3 tools)</strong></summary>
|
|
119
|
+
|
|
81
120
|
- **get_user**: Retrieve user details by ID
|
|
82
121
|
- **list_users**: List users with optional filtering by username, email, etc.
|
|
83
122
|
- **list_user_roles**: List all user roles (permission groups) in the organization
|
|
84
123
|
|
|
85
|
-
|
|
124
|
+
</details>
|
|
125
|
+
|
|
126
|
+
<details>
|
|
127
|
+
<summary><strong>Engine Management (6 tools)</strong></summary>
|
|
128
|
+
|
|
86
129
|
- **get_engine**: Retrieve engine details by ID
|
|
87
130
|
- **list_engines**: List all engines with optional filters
|
|
88
131
|
- **create_engine**: Create a new engine (extractor or splitter)
|
|
@@ -90,7 +133,11 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
90
133
|
- **create_engine_field**: Create engine fields and link them to schemas
|
|
91
134
|
- **get_engine_fields**: Retrieve engine fields for a specific engine or all engine fields
|
|
92
135
|
|
|
93
|
-
|
|
136
|
+
</details>
|
|
137
|
+
|
|
138
|
+
<details>
|
|
139
|
+
<summary><strong>Extensions & Rules (9 tools)</strong></summary>
|
|
140
|
+
|
|
94
141
|
- **get_hook**: Get hook/extension details
|
|
95
142
|
- **list_hooks**: List webhooks and serverless functions (extensions)
|
|
96
143
|
- **create_hook**: Create webhooks or serverless function hooks for custom logic
|
|
@@ -101,12 +148,34 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
101
148
|
- **get_rule**: Get business rule details
|
|
102
149
|
- **list_rules**: List business rules with trigger conditions and actions
|
|
103
150
|
|
|
104
|
-
|
|
151
|
+
</details>
|
|
152
|
+
|
|
153
|
+
<details>
|
|
154
|
+
<summary><strong>Email Templates (3 tools)</strong></summary>
|
|
155
|
+
|
|
156
|
+
- **get_email_template**: Retrieve email template details by ID
|
|
157
|
+
- **list_email_templates**: List email templates with optional filtering by queue, type, or name
|
|
158
|
+
- **create_email_template**: Create email templates for automated or manual email sending
|
|
159
|
+
|
|
160
|
+
</details>
|
|
161
|
+
|
|
162
|
+
<details>
|
|
163
|
+
<summary><strong>Relations Management (4 tools)</strong></summary>
|
|
164
|
+
|
|
105
165
|
- **get_relation**: Retrieve relation details by ID
|
|
106
166
|
- **list_relations**: List all relations between annotations (edit, attachment, duplicate)
|
|
107
167
|
- **get_document_relation**: Retrieve document relation details by ID
|
|
108
168
|
- **list_document_relations**: List all document relations (export, einvoice)
|
|
109
169
|
|
|
170
|
+
</details>
|
|
171
|
+
|
|
172
|
+
<details>
|
|
173
|
+
<summary><strong>Tool Discovery (1 tool)</strong></summary>
|
|
174
|
+
|
|
175
|
+
- **list_tool_categories**: List all available tool categories with descriptions, tool names, and keywords for dynamic tool loading
|
|
176
|
+
|
|
177
|
+
</details>
|
|
178
|
+
|
|
110
179
|
## Prerequisites
|
|
111
180
|
|
|
112
181
|
- Python 3.12 or higher
|
|
@@ -160,10 +229,11 @@ uv sync --extra tests # Testing only
|
|
|
160
229
|
|
|
161
230
|
When `ROSSUM_MCP_MODE` is set to `read-only`, only read operations are available:
|
|
162
231
|
- **Annotations:** `get_annotation`, `list_annotations`
|
|
163
|
-
- **Queues:** `get_queue`, `get_queue_schema`, `get_queue_engine`
|
|
164
|
-
- **Schemas:** `get_schema`
|
|
232
|
+
- **Queues:** `get_queue`, `list_queues`, `get_queue_schema`, `get_queue_engine`
|
|
233
|
+
- **Schemas:** `get_schema`, `list_schemas`
|
|
165
234
|
- **Engines:** `get_engine`, `list_engines`, `get_engine_fields`
|
|
166
235
|
- **Hooks:** `get_hook`, `list_hooks`, `list_hook_templates`, `list_hook_logs`
|
|
236
|
+
- **Email Templates:** `get_email_template`, `list_email_templates`
|
|
167
237
|
- **Users:** `get_user`, `list_users`, `list_user_roles`
|
|
168
238
|
- **Rules:** `get_rule`, `list_rules`
|
|
169
239
|
- **Relations:** `get_relation`, `list_relations`
|
|
@@ -373,6 +443,46 @@ Retrieves queue details including the schema_id.
|
|
|
373
443
|
**Parameters:**
|
|
374
444
|
- `queue_id` (integer, required): Rossum queue ID to retrieve
|
|
375
445
|
|
|
446
|
+
#### list_queues
|
|
447
|
+
|
|
448
|
+
Lists all queues with optional filtering by workspace or name.
|
|
449
|
+
|
|
450
|
+
**Parameters:**
|
|
451
|
+
- `workspace_id` (integer, optional): Filter by workspace ID
|
|
452
|
+
- `name` (string, optional): Filter by queue name
|
|
453
|
+
|
|
454
|
+
**Returns:**
|
|
455
|
+
```json
|
|
456
|
+
[
|
|
457
|
+
{
|
|
458
|
+
"id": 12345,
|
|
459
|
+
"name": "Invoice Processing",
|
|
460
|
+
"url": "https://elis.rossum.ai/api/v1/queues/12345",
|
|
461
|
+
"workspace": "https://elis.rossum.ai/api/v1/workspaces/100",
|
|
462
|
+
"schema": "https://elis.rossum.ai/api/v1/schemas/200",
|
|
463
|
+
"inbox": "https://elis.rossum.ai/api/v1/inboxes/300",
|
|
464
|
+
"status": "active",
|
|
465
|
+
"locale": "en_GB",
|
|
466
|
+
"automation_enabled": true
|
|
467
|
+
}
|
|
468
|
+
]
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
**Example usage:**
|
|
472
|
+
```python
|
|
473
|
+
# List all queues
|
|
474
|
+
all_queues = list_queues()
|
|
475
|
+
|
|
476
|
+
# List queues in a specific workspace
|
|
477
|
+
workspace_queues = list_queues(workspace_id=100)
|
|
478
|
+
|
|
479
|
+
# List queues by name
|
|
480
|
+
named_queues = list_queues(name="Invoice Processing")
|
|
481
|
+
|
|
482
|
+
# Combine filters
|
|
483
|
+
filtered_queues = list_queues(workspace_id=100, name="Invoice")
|
|
484
|
+
```
|
|
485
|
+
|
|
376
486
|
#### get_schema
|
|
377
487
|
|
|
378
488
|
Retrieves schema details including the schema content/structure.
|
|
@@ -380,6 +490,44 @@ Retrieves schema details including the schema content/structure.
|
|
|
380
490
|
**Parameters:**
|
|
381
491
|
- `schema_id` (integer, required): Rossum schema ID to retrieve
|
|
382
492
|
|
|
493
|
+
#### list_schemas
|
|
494
|
+
|
|
495
|
+
Lists all schemas with optional filtering by name or queue.
|
|
496
|
+
|
|
497
|
+
**Parameters:**
|
|
498
|
+
- `name` (string, optional): Filter by schema name
|
|
499
|
+
- `queue_id` (integer, optional): Filter by queue ID
|
|
500
|
+
|
|
501
|
+
**Returns:**
|
|
502
|
+
```json
|
|
503
|
+
[
|
|
504
|
+
{
|
|
505
|
+
"id": 12345,
|
|
506
|
+
"name": "Invoice Schema",
|
|
507
|
+
"url": "https://elis.rossum.ai/api/v1/schemas/12345",
|
|
508
|
+
"queues": ["https://elis.rossum.ai/api/v1/queues/100"],
|
|
509
|
+
"content": "<omitted>",
|
|
510
|
+
"metadata": {},
|
|
511
|
+
"modified_at": "2025-01-15T10:00:00Z"
|
|
512
|
+
}
|
|
513
|
+
]
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
**Example usage:**
|
|
517
|
+
```python
|
|
518
|
+
# List all schemas
|
|
519
|
+
all_schemas = list_schemas()
|
|
520
|
+
|
|
521
|
+
# List schemas by name
|
|
522
|
+
named_schemas = list_schemas(name="Invoice Schema")
|
|
523
|
+
|
|
524
|
+
# List schemas used by a specific queue
|
|
525
|
+
queue_schemas = list_schemas(queue_id=100)
|
|
526
|
+
|
|
527
|
+
# Combine filters
|
|
528
|
+
filtered_schemas = list_schemas(name="Invoice", queue_id=100)
|
|
529
|
+
```
|
|
530
|
+
|
|
383
531
|
#### get_queue_schema
|
|
384
532
|
|
|
385
533
|
Retrieves the complete schema for a queue in a single call. This is the recommended way to get a queue's schema.
|
|
@@ -1454,6 +1602,216 @@ annotation_doc_relations = list_document_relations(annotation=100)
|
|
|
1454
1602
|
document_relations = list_document_relations(documents=200)
|
|
1455
1603
|
```
|
|
1456
1604
|
|
|
1605
|
+
### Email Templates
|
|
1606
|
+
|
|
1607
|
+
#### get_email_template
|
|
1608
|
+
|
|
1609
|
+
Retrieves details of a specific email template by its ID.
|
|
1610
|
+
|
|
1611
|
+
**Parameters:**
|
|
1612
|
+
- `email_template_id` (integer, required): Email template ID
|
|
1613
|
+
|
|
1614
|
+
**Returns:**
|
|
1615
|
+
```json
|
|
1616
|
+
{
|
|
1617
|
+
"id": 1500,
|
|
1618
|
+
"name": "Rejection Email",
|
|
1619
|
+
"url": "https://elis.rossum.ai/api/v1/email_templates/1500",
|
|
1620
|
+
"queue": "https://elis.rossum.ai/api/v1/queues/8199",
|
|
1621
|
+
"organization": "https://elis.rossum.ai/api/v1/organizations/1",
|
|
1622
|
+
"subject": "Document Rejected",
|
|
1623
|
+
"message": "<p>Your document has been rejected.</p>",
|
|
1624
|
+
"type": "rejection",
|
|
1625
|
+
"enabled": true,
|
|
1626
|
+
"automate": false,
|
|
1627
|
+
"triggers": [],
|
|
1628
|
+
"to": [{"type": "annotator", "value": ""}],
|
|
1629
|
+
"cc": [],
|
|
1630
|
+
"bcc": []
|
|
1631
|
+
}
|
|
1632
|
+
```
|
|
1633
|
+
|
|
1634
|
+
**Example usage:**
|
|
1635
|
+
```python
|
|
1636
|
+
# Get email template details
|
|
1637
|
+
template = get_email_template(email_template_id=1500)
|
|
1638
|
+
```
|
|
1639
|
+
|
|
1640
|
+
#### list_email_templates
|
|
1641
|
+
|
|
1642
|
+
Lists all email templates with optional filters. Email templates define automated or manual email responses sent from Rossum queues.
|
|
1643
|
+
|
|
1644
|
+
**Parameters:**
|
|
1645
|
+
- `queue_id` (integer, optional): Filter by queue ID
|
|
1646
|
+
- `type` (string, optional): Filter by template type ('rejection', 'rejection_default', 'email_with_no_processable_attachments', 'custom')
|
|
1647
|
+
- `name` (string, optional): Filter by template name
|
|
1648
|
+
- `first_n` (integer, optional): Limit results to first N templates
|
|
1649
|
+
|
|
1650
|
+
**Returns:**
|
|
1651
|
+
```json
|
|
1652
|
+
{
|
|
1653
|
+
"count": 2,
|
|
1654
|
+
"results": [
|
|
1655
|
+
{
|
|
1656
|
+
"id": 1500,
|
|
1657
|
+
"name": "Rejection Email",
|
|
1658
|
+
"type": "rejection",
|
|
1659
|
+
"queue": "https://elis.rossum.ai/api/v1/queues/8199",
|
|
1660
|
+
"automate": false
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
"id": 1501,
|
|
1664
|
+
"name": "No Attachments Notification",
|
|
1665
|
+
"type": "email_with_no_processable_attachments",
|
|
1666
|
+
"queue": "https://elis.rossum.ai/api/v1/queues/8199",
|
|
1667
|
+
"automate": true
|
|
1668
|
+
}
|
|
1669
|
+
]
|
|
1670
|
+
}
|
|
1671
|
+
```
|
|
1672
|
+
|
|
1673
|
+
**Example usage:**
|
|
1674
|
+
```python
|
|
1675
|
+
# List all email templates
|
|
1676
|
+
all_templates = list_email_templates()
|
|
1677
|
+
|
|
1678
|
+
# List email templates for a specific queue
|
|
1679
|
+
queue_templates = list_email_templates(queue_id=8199)
|
|
1680
|
+
|
|
1681
|
+
# List rejection templates
|
|
1682
|
+
rejection_templates = list_email_templates(type="rejection")
|
|
1683
|
+
|
|
1684
|
+
# List first 5 templates
|
|
1685
|
+
first_templates = list_email_templates(first_n=5)
|
|
1686
|
+
```
|
|
1687
|
+
|
|
1688
|
+
#### create_email_template
|
|
1689
|
+
|
|
1690
|
+
Creates a new email template. Templates can be automated to send emails automatically on specific triggers, or manual for user-initiated sending.
|
|
1691
|
+
|
|
1692
|
+
**Parameters:**
|
|
1693
|
+
- `name` (string, required): Name of the email template
|
|
1694
|
+
- `queue` (string, required): URL of the queue to associate with
|
|
1695
|
+
- `subject` (string, required): Email subject line
|
|
1696
|
+
- `message` (string, required): Email body (HTML supported)
|
|
1697
|
+
- `type` (string, optional): Template type - 'rejection', 'rejection_default', 'email_with_no_processable_attachments', 'custom' (default: 'custom')
|
|
1698
|
+
- `automate` (boolean, optional): If true, email is sent automatically on trigger (default: false)
|
|
1699
|
+
- `to` (array, optional): List of recipient objects with 'type' and 'value' keys
|
|
1700
|
+
- `cc` (array, optional): List of CC recipient objects
|
|
1701
|
+
- `bcc` (array, optional): List of BCC recipient objects
|
|
1702
|
+
- `triggers` (array, optional): List of trigger URLs
|
|
1703
|
+
|
|
1704
|
+
**Recipient object types:**
|
|
1705
|
+
- `{"type": "annotator", "value": ""}` - Send to the document annotator
|
|
1706
|
+
- `{"type": "constant", "value": "email@example.com"}` - Send to a fixed email address
|
|
1707
|
+
- `{"type": "datapoint", "value": "email_field_id"}` - Send to email from a datapoint field
|
|
1708
|
+
|
|
1709
|
+
**Returns:**
|
|
1710
|
+
```json
|
|
1711
|
+
{
|
|
1712
|
+
"id": 1502,
|
|
1713
|
+
"name": "Custom Notification",
|
|
1714
|
+
"url": "https://elis.rossum.ai/api/v1/email_templates/1502",
|
|
1715
|
+
"queue": "https://elis.rossum.ai/api/v1/queues/8199",
|
|
1716
|
+
"subject": "Document Processed",
|
|
1717
|
+
"message": "<p>Your document has been processed.</p>",
|
|
1718
|
+
"type": "custom",
|
|
1719
|
+
"automate": true,
|
|
1720
|
+
"to": [{"type": "constant", "value": "notifications@example.com"}]
|
|
1721
|
+
}
|
|
1722
|
+
```
|
|
1723
|
+
|
|
1724
|
+
**Example usage:**
|
|
1725
|
+
```python
|
|
1726
|
+
# Create a simple custom email template
|
|
1727
|
+
template = create_email_template(
|
|
1728
|
+
name="Processing Complete",
|
|
1729
|
+
queue="https://elis.rossum.ai/api/v1/queues/8199",
|
|
1730
|
+
subject="Document Processing Complete",
|
|
1731
|
+
message="<p>Your document has been successfully processed.</p>"
|
|
1732
|
+
)
|
|
1733
|
+
|
|
1734
|
+
# Create an automated rejection template
|
|
1735
|
+
template = create_email_template(
|
|
1736
|
+
name="Auto Rejection",
|
|
1737
|
+
queue="https://elis.rossum.ai/api/v1/queues/8199",
|
|
1738
|
+
subject="Document Rejected",
|
|
1739
|
+
message="<p>Your document could not be processed.</p>",
|
|
1740
|
+
type="rejection",
|
|
1741
|
+
automate=True,
|
|
1742
|
+
to=[{"type": "annotator", "value": ""}]
|
|
1743
|
+
)
|
|
1744
|
+
|
|
1745
|
+
# Create template with multiple recipients
|
|
1746
|
+
template = create_email_template(
|
|
1747
|
+
name="Team Notification",
|
|
1748
|
+
queue="https://elis.rossum.ai/api/v1/queues/8199",
|
|
1749
|
+
subject="New Document",
|
|
1750
|
+
message="<p>A new document has arrived.</p>",
|
|
1751
|
+
to=[{"type": "constant", "value": "team@example.com"}],
|
|
1752
|
+
cc=[{"type": "datapoint", "value": "sender_email"}]
|
|
1753
|
+
)
|
|
1754
|
+
```
|
|
1755
|
+
|
|
1756
|
+
### Tool Discovery
|
|
1757
|
+
|
|
1758
|
+
#### list_tool_categories
|
|
1759
|
+
|
|
1760
|
+
Lists all available tool categories with their descriptions, tool names, and keywords. This enables dynamic tool loading where agents can discover and load only the tools they need for a specific task.
|
|
1761
|
+
|
|
1762
|
+
**Parameters:**
|
|
1763
|
+
None
|
|
1764
|
+
|
|
1765
|
+
**Returns:**
|
|
1766
|
+
```json
|
|
1767
|
+
[
|
|
1768
|
+
{
|
|
1769
|
+
"name": "annotations",
|
|
1770
|
+
"description": "Document processing: upload, retrieve, update, and confirm annotations",
|
|
1771
|
+
"tool_count": 6,
|
|
1772
|
+
"tools": [
|
|
1773
|
+
{"name": "upload_document", "description": "Upload document to queue"},
|
|
1774
|
+
{"name": "get_annotation", "description": "Retrieve annotation with extracted data"}
|
|
1775
|
+
],
|
|
1776
|
+
"keywords": ["annotation", "document", "upload", "extract", "confirm", "review"]
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
"name": "queues",
|
|
1780
|
+
"description": "Queue management: create, configure, and list document processing queues",
|
|
1781
|
+
"tool_count": 8,
|
|
1782
|
+
"tools": [
|
|
1783
|
+
{"name": "get_queue", "description": "Retrieve queue details"},
|
|
1784
|
+
{"name": "list_queues", "description": "List all queues"}
|
|
1785
|
+
],
|
|
1786
|
+
"keywords": ["queue", "inbox", "connector"]
|
|
1787
|
+
}
|
|
1788
|
+
]
|
|
1789
|
+
```
|
|
1790
|
+
|
|
1791
|
+
**Available Categories:**
|
|
1792
|
+
- `annotations` - Document processing tools (6 tools)
|
|
1793
|
+
- `queues` - Queue management tools (8 tools)
|
|
1794
|
+
- `schemas` - Schema management tools (7 tools)
|
|
1795
|
+
- `engines` - AI engine management tools (6 tools)
|
|
1796
|
+
- `hooks` - Extensions/webhooks tools (7 tools)
|
|
1797
|
+
- `email_templates` - Email template tools (3 tools)
|
|
1798
|
+
- `document_relations` - Document relation tools (2 tools)
|
|
1799
|
+
- `relations` - Annotation relation tools (2 tools)
|
|
1800
|
+
- `rules` - Validation rule tools (2 tools)
|
|
1801
|
+
- `users` - User management tools (3 tools)
|
|
1802
|
+
- `workspaces` - Workspace management tools (3 tools)
|
|
1803
|
+
|
|
1804
|
+
**Example usage:**
|
|
1805
|
+
```python
|
|
1806
|
+
# Discover all tool categories
|
|
1807
|
+
categories = list_tool_categories()
|
|
1808
|
+
|
|
1809
|
+
# Find categories by keyword matching
|
|
1810
|
+
for category in categories:
|
|
1811
|
+
if "schema" in category["keywords"]:
|
|
1812
|
+
print(f"Found: {category['name']} with {category['tool_count']} tools")
|
|
1813
|
+
```
|
|
1814
|
+
|
|
1457
1815
|
## Annotation Status Workflow
|
|
1458
1816
|
|
|
1459
1817
|
When a document is uploaded, the annotation progresses through various states:
|