rossum-mcp 0.3.4__py3-none-any.whl → 0.3.5__py3-none-any.whl
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/__init__.py +1 -1
- rossum_mcp/server.py +2 -0
- rossum_mcp/tools/__init__.py +2 -0
- rossum_mcp/tools/annotations.py +123 -86
- rossum_mcp/tools/base.py +22 -0
- rossum_mcp/tools/document_relations.py +1 -3
- rossum_mcp/tools/email_templates.py +131 -0
- rossum_mcp/tools/engines.py +106 -77
- rossum_mcp/tools/hooks.py +228 -150
- rossum_mcp/tools/queues.py +251 -85
- rossum_mcp/tools/relations.py +3 -7
- rossum_mcp/tools/rules.py +28 -17
- rossum_mcp/tools/schemas.py +501 -104
- rossum_mcp/tools/users.py +51 -27
- rossum_mcp/tools/workspaces.py +50 -37
- {rossum_mcp-0.3.4.dist-info → rossum_mcp-0.3.5.dist-info}/METADATA +255 -5
- rossum_mcp-0.3.5.dist-info/RECORD +22 -0
- rossum_mcp-0.3.4.dist-info/RECORD +0 -21
- {rossum_mcp-0.3.4.dist-info → rossum_mcp-0.3.5.dist-info}/WHEEL +0 -0
- {rossum_mcp-0.3.4.dist-info → rossum_mcp-0.3.5.dist-info}/entry_points.txt +0 -0
- {rossum_mcp-0.3.4.dist-info → rossum_mcp-0.3.5.dist-info}/top_level.txt +0 -0
rossum_mcp/tools/users.py
CHANGED
|
@@ -5,8 +5,8 @@ from __future__ import annotations
|
|
|
5
5
|
import logging
|
|
6
6
|
from typing import TYPE_CHECKING
|
|
7
7
|
|
|
8
|
-
from rossum_api.models.group import Group
|
|
9
|
-
from rossum_api.models.user import User
|
|
8
|
+
from rossum_api.models.group import Group
|
|
9
|
+
from rossum_api.models.user import User
|
|
10
10
|
|
|
11
11
|
if TYPE_CHECKING:
|
|
12
12
|
from fastmcp import FastMCP
|
|
@@ -15,11 +15,54 @@ if TYPE_CHECKING:
|
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
async def _get_user(client: AsyncRossumAPIClient, user_id: int) -> User:
|
|
19
|
+
user: User = await client.retrieve_user(user_id)
|
|
20
|
+
return user
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
async def _list_users(
|
|
24
|
+
client: AsyncRossumAPIClient,
|
|
25
|
+
username: str | None = None,
|
|
26
|
+
email: str | None = None,
|
|
27
|
+
first_name: str | None = None,
|
|
28
|
+
last_name: str | None = None,
|
|
29
|
+
is_active: bool | None = None,
|
|
30
|
+
is_organization_group_admin: bool | None = None,
|
|
31
|
+
) -> list[User]:
|
|
32
|
+
filter_mapping: dict = {
|
|
33
|
+
"username": username,
|
|
34
|
+
"email": email,
|
|
35
|
+
"first_name": first_name,
|
|
36
|
+
"last_name": last_name,
|
|
37
|
+
"is_active": is_active,
|
|
38
|
+
}
|
|
39
|
+
filters = {k: v for k, v in filter_mapping.items() if v is not None}
|
|
40
|
+
|
|
41
|
+
users_list: list[User] = [user async for user in client.list_users(**filters)]
|
|
42
|
+
|
|
43
|
+
if is_organization_group_admin is not None:
|
|
44
|
+
org_admin_role_urls: set[str] = {
|
|
45
|
+
group.url async for group in client.list_user_roles() if group.name == "organization_group_admin"
|
|
46
|
+
}
|
|
47
|
+
if is_organization_group_admin:
|
|
48
|
+
users_list = [user for user in users_list if set(user.groups) & org_admin_role_urls]
|
|
49
|
+
else:
|
|
50
|
+
users_list = [user for user in users_list if not (set(user.groups) & org_admin_role_urls)]
|
|
51
|
+
|
|
52
|
+
return users_list
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
async def _list_user_roles(client: AsyncRossumAPIClient) -> list[Group]:
|
|
56
|
+
groups_list: list[Group] = [group async for group in client.list_user_roles()]
|
|
57
|
+
return groups_list
|
|
58
|
+
|
|
59
|
+
|
|
18
60
|
def register_user_tools(mcp: FastMCP, client: AsyncRossumAPIClient) -> None:
|
|
61
|
+
"""Register user-related tools with the FastMCP server."""
|
|
62
|
+
|
|
19
63
|
@mcp.tool(description="Retrieve a single user by ID. Use list_users first to find users by username/email.")
|
|
20
64
|
async def get_user(user_id: int) -> User:
|
|
21
|
-
|
|
22
|
-
return user
|
|
65
|
+
return await _get_user(client, user_id)
|
|
23
66
|
|
|
24
67
|
@mcp.tool(
|
|
25
68
|
description="List users. Filter by username/email to find specific users. Beware that users with 'organization_group_admin' role are special, e.g. cannot be used as token owners; you can filter them out with `is_organization_group_admin=False`."
|
|
@@ -32,29 +75,10 @@ def register_user_tools(mcp: FastMCP, client: AsyncRossumAPIClient) -> None:
|
|
|
32
75
|
is_active: bool | None = None,
|
|
33
76
|
is_organization_group_admin: bool | None = None,
|
|
34
77
|
) -> list[User]:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"first_name": first_name,
|
|
39
|
-
"last_name": last_name,
|
|
40
|
-
"is_active": is_active,
|
|
41
|
-
}
|
|
42
|
-
filters = {k: v for k, v in filter_mapping.items() if v is not None}
|
|
43
|
-
|
|
44
|
-
users_list: list[User] = [user async for user in client.list_users(**filters)]
|
|
45
|
-
|
|
46
|
-
if is_organization_group_admin is not None:
|
|
47
|
-
org_admin_role_urls: set[str] = {
|
|
48
|
-
group.url async for group in client.list_user_roles() if group.name == "organization_group_admin"
|
|
49
|
-
}
|
|
50
|
-
if is_organization_group_admin:
|
|
51
|
-
users_list = [user for user in users_list if set(user.groups) & org_admin_role_urls]
|
|
52
|
-
else:
|
|
53
|
-
users_list = [user for user in users_list if not (set(user.groups) & org_admin_role_urls)]
|
|
54
|
-
|
|
55
|
-
return users_list
|
|
78
|
+
return await _list_users(
|
|
79
|
+
client, username, email, first_name, last_name, is_active, is_organization_group_admin
|
|
80
|
+
)
|
|
56
81
|
|
|
57
82
|
@mcp.tool(description="List all user roles (groups of permissions) in the organization.")
|
|
58
83
|
async def list_user_roles() -> list[Group]:
|
|
59
|
-
|
|
60
|
-
return groups_list
|
|
84
|
+
return await _list_user_roles(client)
|
rossum_mcp/tools/workspaces.py
CHANGED
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import logging
|
|
6
6
|
from typing import TYPE_CHECKING
|
|
7
7
|
|
|
8
|
-
from rossum_api.models.workspace import Workspace
|
|
8
|
+
from rossum_api.models.workspace import Workspace
|
|
9
9
|
|
|
10
10
|
from rossum_mcp.tools.base import build_resource_url, is_read_write_mode
|
|
11
11
|
|
|
@@ -16,50 +16,63 @@ if TYPE_CHECKING:
|
|
|
16
16
|
logger = logging.getLogger(__name__)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
async def _get_workspace(client: AsyncRossumAPIClient, workspace_id: int) -> Workspace:
|
|
20
|
+
logger.debug(f"Retrieving workspace: workspace_id={workspace_id}")
|
|
21
|
+
workspace: Workspace = await client.retrieve_workspace(workspace_id)
|
|
22
|
+
return workspace
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
async def _list_workspaces(
|
|
26
|
+
client: AsyncRossumAPIClient, organization_id: int | None = None, name: str | None = None
|
|
27
|
+
) -> list[Workspace]:
|
|
28
|
+
logger.debug(f"Listing workspaces: organization_id={organization_id}, name={name}")
|
|
29
|
+
filters: dict[str, int | str] = {}
|
|
30
|
+
if organization_id is not None:
|
|
31
|
+
filters["organization"] = organization_id
|
|
32
|
+
if name is not None:
|
|
33
|
+
filters["name"] = name
|
|
34
|
+
|
|
35
|
+
return [
|
|
36
|
+
workspace
|
|
37
|
+
async for workspace in client.list_workspaces(**filters) # type: ignore[arg-type]
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
async def _create_workspace(
|
|
42
|
+
client: AsyncRossumAPIClient, name: str, organization_id: int, metadata: dict | None = None
|
|
43
|
+
) -> Workspace | dict:
|
|
44
|
+
if not is_read_write_mode():
|
|
45
|
+
return {"error": "create_workspace is not available in read-only mode"}
|
|
46
|
+
|
|
47
|
+
organization_url = build_resource_url("organizations", organization_id)
|
|
48
|
+
logger.info(
|
|
49
|
+
f"Creating workspace: name={name}, organization_id={organization_id}, "
|
|
50
|
+
f"organization_url={organization_url}, metadata={metadata}"
|
|
51
|
+
)
|
|
52
|
+
workspace_data: dict = {
|
|
53
|
+
"name": name,
|
|
54
|
+
"organization": organization_url,
|
|
55
|
+
}
|
|
56
|
+
if metadata is not None:
|
|
57
|
+
workspace_data["metadata"] = metadata
|
|
58
|
+
|
|
59
|
+
logger.debug(f"Workspace creation payload: {workspace_data}")
|
|
60
|
+
workspace: Workspace = await client.create_new_workspace(workspace_data)
|
|
61
|
+
logger.info(f"Successfully created workspace: id={workspace.id}, name={workspace.name}")
|
|
62
|
+
return workspace
|
|
63
|
+
|
|
64
|
+
|
|
19
65
|
def register_workspace_tools(mcp: FastMCP, client: AsyncRossumAPIClient) -> None:
|
|
20
66
|
"""Register workspace-related tools with the FastMCP server."""
|
|
21
67
|
|
|
22
68
|
@mcp.tool(description="Retrieve workspace details.")
|
|
23
69
|
async def get_workspace(workspace_id: int) -> Workspace:
|
|
24
|
-
|
|
25
|
-
logger.debug(f"Retrieving workspace: workspace_id={workspace_id}")
|
|
26
|
-
workspace: Workspace = await client.retrieve_workspace(workspace_id)
|
|
27
|
-
return workspace
|
|
70
|
+
return await _get_workspace(client, workspace_id)
|
|
28
71
|
|
|
29
72
|
@mcp.tool(description="List all workspaces with optional filters.")
|
|
30
73
|
async def list_workspaces(organization_id: int | None = None, name: str | None = None) -> list[Workspace]:
|
|
31
|
-
|
|
32
|
-
logger.debug(f"Listing workspaces: organization_id={organization_id}, name={name}")
|
|
33
|
-
filters: dict[str, int | str] = {}
|
|
34
|
-
if organization_id is not None:
|
|
35
|
-
filters["organization"] = organization_id
|
|
36
|
-
if name is not None:
|
|
37
|
-
filters["name"] = name
|
|
38
|
-
|
|
39
|
-
return [
|
|
40
|
-
workspace
|
|
41
|
-
async for workspace in client.list_workspaces(**filters) # type: ignore[arg-type]
|
|
42
|
-
]
|
|
74
|
+
return await _list_workspaces(client, organization_id, name)
|
|
43
75
|
|
|
44
76
|
@mcp.tool(description="Create a new workspace.")
|
|
45
77
|
async def create_workspace(name: str, organization_id: int, metadata: dict | None = None) -> Workspace | dict:
|
|
46
|
-
|
|
47
|
-
if not is_read_write_mode():
|
|
48
|
-
return {"error": "create_workspace is not available in read-only mode"}
|
|
49
|
-
|
|
50
|
-
organization_url = build_resource_url("organizations", organization_id)
|
|
51
|
-
logger.info(
|
|
52
|
-
f"Creating workspace: name={name}, organization_id={organization_id}, "
|
|
53
|
-
f"organization_url={organization_url}, metadata={metadata}"
|
|
54
|
-
)
|
|
55
|
-
workspace_data: dict = {
|
|
56
|
-
"name": name,
|
|
57
|
-
"organization": organization_url,
|
|
58
|
-
}
|
|
59
|
-
if metadata is not None:
|
|
60
|
-
workspace_data["metadata"] = metadata
|
|
61
|
-
|
|
62
|
-
logger.debug(f"Workspace creation payload: {workspace_data}")
|
|
63
|
-
workspace: Workspace = await client.create_new_workspace(workspace_data)
|
|
64
|
-
logger.info(f"Successfully created workspace: id={workspace.id}, name={workspace.name}")
|
|
65
|
-
return workspace
|
|
78
|
+
return await _create_workspace(client, name, organization_id, metadata)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rossum-mcp
|
|
3
|
-
Version: 0.3.
|
|
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
|
[](https://stancld.github.io/rossum-mcp/)
|
|
44
44
|
[](https://www.python.org/downloads/)
|
|
45
45
|
[](https://opensource.org/licenses/MIT)
|
|
46
|
-
[](https://pypi.org/project/rossum-mcp/)
|
|
47
|
+
[](https://codecov.io/gh/stancld/rossum-mcp)
|
|
48
|
+
[](#available-tools)
|
|
49
|
+
|
|
48
50
|
[](https://github.com/rossumai/rossum-api)
|
|
51
|
+
[](https://modelcontextprotocol.io/)
|
|
52
|
+
[](https://github.com/astral-sh/ruff)
|
|
53
|
+
[](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:
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
rossum_mcp/__init__.py,sha256=kNJJh9t1YHiVg1EvqMnUPQZRlAWqWbOFVNxUjRJYf3w,58
|
|
2
|
+
rossum_mcp/logging_config.py,sha256=OH5G6K4wH_g-m55FdRO1BYXIDtOop-lD9Ps_mTMQ8eY,4792
|
|
3
|
+
rossum_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
rossum_mcp/server.py,sha256=KHBsXpBgzPmh8Wm0w1soFQs_c49FhPI3HQRzgbE36gQ,1899
|
|
5
|
+
rossum_mcp/tools/__init__.py,sha256=bbgO7KdO8o2qnznZ5u3CVA9hrxpMgurCfWdL6SRrpZI,1133
|
|
6
|
+
rossum_mcp/tools/annotations.py,sha256=UtBWM33nUsdB9Ro-aBKPhM1mNT_XLWNwZcdqaywVq5k,7049
|
|
7
|
+
rossum_mcp/tools/base.py,sha256=_18YZA6HQXi2Oa7MBMrI3gxyFZDGeKjgrzWvyYsLoAE,1113
|
|
8
|
+
rossum_mcp/tools/document_relations.py,sha256=7-mdRyRXXZRtRsL_ntZpfpWbMVYS5NUKW6yya4AzmNQ,2169
|
|
9
|
+
rossum_mcp/tools/email_templates.py,sha256=vDq9xGq3M4IPEodWMpTFu5n29N3HXFES9wt5MqrL6Cw,4784
|
|
10
|
+
rossum_mcp/tools/engines.py,sha256=6Q_gmATzb4eOwSjCmbsZAGm9unsogAfi2b-GyZ9Zyhc,6617
|
|
11
|
+
rossum_mcp/tools/hooks.py,sha256=gimlDvxrT3g4mjbDS0ZWPOUbE0ytf0Sz_7qcySE-63w,12523
|
|
12
|
+
rossum_mcp/tools/queues.py,sha256=2jsM8zuE7pfJoHicBygMevc1mZNOIe1YVG0ynqhEM-Y,10906
|
|
13
|
+
rossum_mcp/tools/relations.py,sha256=ko1_v6meM2zCEmnhaDQt-T4uX_XJcRV4-X-Pxsu_prQ,2016
|
|
14
|
+
rossum_mcp/tools/rules.py,sha256=6wFsyY9cVxlVAjyFXn0vCt5IvY8ZdXufG7ubP94tANs,1708
|
|
15
|
+
rossum_mcp/tools/schemas.py,sha256=7Jn4fh2hxRxcOjcvAU_oavgzyB2PjMtN7Kh-5LvIVlo,29495
|
|
16
|
+
rossum_mcp/tools/users.py,sha256=uVojYtUQs4KorQxgmmPRNJtExS4GbzyckZ1W4Y_0Qrk,3047
|
|
17
|
+
rossum_mcp/tools/workspaces.py,sha256=bquN2Jh0OzX69R-LAe8PksZSp71x5qEZfpp_zGhaW-A,2965
|
|
18
|
+
rossum_mcp-0.3.5.dist-info/METADATA,sha256=GRHOwWUkePewTgwuj2VyCUp2PsAYZE-ne_EesMqRVbI,55705
|
|
19
|
+
rossum_mcp-0.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
20
|
+
rossum_mcp-0.3.5.dist-info/entry_points.txt,sha256=eth2XELk0QGw9-_H3QL8PQ0OE-RDfzipbSvRy0EUc2c,54
|
|
21
|
+
rossum_mcp-0.3.5.dist-info/top_level.txt,sha256=cziqyWFE89hFhCfsq60Fk6JcwslNtgP01WHIJ5plMEM,11
|
|
22
|
+
rossum_mcp-0.3.5.dist-info/RECORD,,
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
rossum_mcp/__init__.py,sha256=FkhnC0139DgVP8EcaVbXfKopELa-jSHEwtVQL65n45Q,58
|
|
2
|
-
rossum_mcp/logging_config.py,sha256=OH5G6K4wH_g-m55FdRO1BYXIDtOop-lD9Ps_mTMQ8eY,4792
|
|
3
|
-
rossum_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
rossum_mcp/server.py,sha256=jvDTEDfg4Ir8l9BeXCvadqmC0tQH-CGpkCTAMDOSgMg,1821
|
|
5
|
-
rossum_mcp/tools/__init__.py,sha256=nMs3X_4JoUYm7L1uz_Ko_L5xgvRR_OwJtTIzGVfZvak,1021
|
|
6
|
-
rossum_mcp/tools/annotations.py,sha256=9MQpwfMwitcM7OLkFga-_TmtKaCSEZUNGKKcUa6gGXA,6222
|
|
7
|
-
rossum_mcp/tools/base.py,sha256=A_W__ESpUzIBXm-q6ivSRaCTSizhr6K3-NXgKBADlTQ,516
|
|
8
|
-
rossum_mcp/tools/document_relations.py,sha256=CzreOLnH5axE1nSlYR6xRsmp19CKGqFsWekzKfo9aeY,2225
|
|
9
|
-
rossum_mcp/tools/engines.py,sha256=SBrF6G-VOCXmLQzxBrwULWB5m-6JTdctQUpwXmFHwEw,5963
|
|
10
|
-
rossum_mcp/tools/hooks.py,sha256=i8OtYnHoOSkkew4Fn2oxzn0qS7eoXSFKMSwf22X5CW4,10984
|
|
11
|
-
rossum_mcp/tools/queues.py,sha256=5NKQzWu7VvAEg65gOBqGCQsMuit0IgScY_s7Pf4_KnY,5526
|
|
12
|
-
rossum_mcp/tools/relations.py,sha256=JrvjIF15gsOjhvfAaKM7AlLyRXtik9bL6pMFGhYBsyU,2145
|
|
13
|
-
rossum_mcp/tools/rules.py,sha256=eJ6Fep3NnG_4bDvLS2B0iJxY2RQuyY9wLxGwsxpRdN0,1555
|
|
14
|
-
rossum_mcp/tools/schemas.py,sha256=xObVUfG6f7qNJs3q0Mmpba95-LcDpm1SbsUar4duNpI,14472
|
|
15
|
-
rossum_mcp/tools/users.py,sha256=mw8P4wXymqRa6zBtMeF92ls0h8yIzALnPflfcjQJX9I,2482
|
|
16
|
-
rossum_mcp/tools/workspaces.py,sha256=bO4VVZ6O94_-Zgzz9Ld9TMsveiXEuTIznz9IOHZnZdI,2676
|
|
17
|
-
rossum_mcp-0.3.4.dist-info/METADATA,sha256=M2mB1fMdH4GD0Xigjf8Nnb1r0e5JW1s_raIImcoxGE4,47657
|
|
18
|
-
rossum_mcp-0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
-
rossum_mcp-0.3.4.dist-info/entry_points.txt,sha256=eth2XELk0QGw9-_H3QL8PQ0OE-RDfzipbSvRy0EUc2c,54
|
|
20
|
-
rossum_mcp-0.3.4.dist-info/top_level.txt,sha256=cziqyWFE89hFhCfsq60Fk6JcwslNtgP01WHIJ5plMEM,11
|
|
21
|
-
rossum_mcp-0.3.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|