rossum-mcp 0.3.5__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.5/rossum_mcp.egg-info → rossum_mcp-0.4.0}/PKG-INFO +118 -10
- rossum_mcp-0.3.5/PKG-INFO → rossum_mcp-0.4.0/README.md +108 -47
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/pyproject.toml +12 -1
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/__init__.py +1 -1
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/server.py +2 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/__init__.py +12 -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.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/queues.py +6 -13
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/schemas.py +4 -1
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/workspaces.py +1 -4
- rossum_mcp-0.3.5/README.md → rossum_mcp-0.4.0/rossum_mcp.egg-info/PKG-INFO +155 -9
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/SOURCES.txt +3 -0
- rossum_mcp-0.4.0/tests/test_catalog.py +134 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/tests/test_logging_config.py +41 -21
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/logging_config.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/py.typed +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/annotations.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/base.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/document_relations.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/email_templates.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/engines.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/hooks.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/relations.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/rules.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp/tools/users.py +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/dependency_links.txt +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/entry_points.txt +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/requires.txt +0 -0
- {rossum_mcp-0.3.5 → rossum_mcp-0.4.0}/rossum_mcp.egg-info/top_level.txt +0 -0
- {rossum_mcp-0.3.5 → 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
|
|
@@ -45,11 +54,12 @@ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "all"
|
|
|
45
54
|
[](https://opensource.org/licenses/MIT)
|
|
46
55
|
[](https://pypi.org/project/rossum-mcp/)
|
|
47
56
|
[](https://codecov.io/gh/stancld/rossum-mcp)
|
|
48
|
-
[](#available-tools)
|
|
49
58
|
|
|
50
59
|
[](https://github.com/rossumai/rossum-api)
|
|
51
60
|
[](https://modelcontextprotocol.io/)
|
|
52
61
|
[](https://github.com/astral-sh/ruff)
|
|
62
|
+
[](https://github.com/astral-sh/ty)
|
|
53
63
|
[](https://github.com/astral-sh/uv)
|
|
54
64
|
|
|
55
65
|
</div>
|
|
@@ -64,7 +74,9 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
64
74
|
|
|
65
75
|
## Features
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
<details>
|
|
78
|
+
<summary><strong>Document Processing (6 tools)</strong></summary>
|
|
79
|
+
|
|
68
80
|
- **upload_document**: Upload a document to Rossum for processing
|
|
69
81
|
- **get_annotation**: Retrieve annotation data for a previously uploaded document
|
|
70
82
|
- **list_annotations**: List all annotations for a queue with optional filtering
|
|
@@ -72,7 +84,11 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
72
84
|
- **bulk_update_annotation_fields**: Bulk update annotation field values using JSON Patch operations
|
|
73
85
|
- **confirm_annotation**: Confirm annotation to move it to 'confirmed' status
|
|
74
86
|
|
|
75
|
-
|
|
87
|
+
</details>
|
|
88
|
+
|
|
89
|
+
<details>
|
|
90
|
+
<summary><strong>Queue & Schema Management (13 tools)</strong></summary>
|
|
91
|
+
|
|
76
92
|
- **get_queue**: Retrieve queue details including schema_id
|
|
77
93
|
- **list_queues**: List all queues with optional filtering by workspace or name
|
|
78
94
|
- **get_schema**: Retrieve schema details and content
|
|
@@ -87,17 +103,29 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
87
103
|
- **patch_schema**: Add, update, or remove individual schema nodes without replacing entire content
|
|
88
104
|
- **prune_schema_fields**: Efficiently remove multiple fields from schema at once (for organization setup)
|
|
89
105
|
|
|
90
|
-
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
<details>
|
|
109
|
+
<summary><strong>Workspace Management (3 tools)</strong></summary>
|
|
110
|
+
|
|
91
111
|
- **get_workspace**: Retrieve workspace details by ID
|
|
92
112
|
- **list_workspaces**: List all workspaces with optional filtering
|
|
93
113
|
- **create_workspace**: Create a new workspace
|
|
94
114
|
|
|
95
|
-
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><strong>User Management (3 tools)</strong></summary>
|
|
119
|
+
|
|
96
120
|
- **get_user**: Retrieve user details by ID
|
|
97
121
|
- **list_users**: List users with optional filtering by username, email, etc.
|
|
98
122
|
- **list_user_roles**: List all user roles (permission groups) in the organization
|
|
99
123
|
|
|
100
|
-
|
|
124
|
+
</details>
|
|
125
|
+
|
|
126
|
+
<details>
|
|
127
|
+
<summary><strong>Engine Management (6 tools)</strong></summary>
|
|
128
|
+
|
|
101
129
|
- **get_engine**: Retrieve engine details by ID
|
|
102
130
|
- **list_engines**: List all engines with optional filters
|
|
103
131
|
- **create_engine**: Create a new engine (extractor or splitter)
|
|
@@ -105,7 +133,11 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
105
133
|
- **create_engine_field**: Create engine fields and link them to schemas
|
|
106
134
|
- **get_engine_fields**: Retrieve engine fields for a specific engine or all engine fields
|
|
107
135
|
|
|
108
|
-
|
|
136
|
+
</details>
|
|
137
|
+
|
|
138
|
+
<details>
|
|
139
|
+
<summary><strong>Extensions & Rules (9 tools)</strong></summary>
|
|
140
|
+
|
|
109
141
|
- **get_hook**: Get hook/extension details
|
|
110
142
|
- **list_hooks**: List webhooks and serverless functions (extensions)
|
|
111
143
|
- **create_hook**: Create webhooks or serverless function hooks for custom logic
|
|
@@ -116,17 +148,34 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
116
148
|
- **get_rule**: Get business rule details
|
|
117
149
|
- **list_rules**: List business rules with trigger conditions and actions
|
|
118
150
|
|
|
119
|
-
|
|
151
|
+
</details>
|
|
152
|
+
|
|
153
|
+
<details>
|
|
154
|
+
<summary><strong>Email Templates (3 tools)</strong></summary>
|
|
155
|
+
|
|
120
156
|
- **get_email_template**: Retrieve email template details by ID
|
|
121
157
|
- **list_email_templates**: List email templates with optional filtering by queue, type, or name
|
|
122
158
|
- **create_email_template**: Create email templates for automated or manual email sending
|
|
123
159
|
|
|
124
|
-
|
|
160
|
+
</details>
|
|
161
|
+
|
|
162
|
+
<details>
|
|
163
|
+
<summary><strong>Relations Management (4 tools)</strong></summary>
|
|
164
|
+
|
|
125
165
|
- **get_relation**: Retrieve relation details by ID
|
|
126
166
|
- **list_relations**: List all relations between annotations (edit, attachment, duplicate)
|
|
127
167
|
- **get_document_relation**: Retrieve document relation details by ID
|
|
128
168
|
- **list_document_relations**: List all document relations (export, einvoice)
|
|
129
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
|
+
|
|
130
179
|
## Prerequisites
|
|
131
180
|
|
|
132
181
|
- Python 3.12 or higher
|
|
@@ -1704,6 +1753,65 @@ template = create_email_template(
|
|
|
1704
1753
|
)
|
|
1705
1754
|
```
|
|
1706
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
|
+
|
|
1707
1815
|
## Annotation Status Workflow
|
|
1708
1816
|
|
|
1709
1817
|
When a document is uploaded, the annotation progresses through various states:
|
|
@@ -1,41 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: rossum-mcp
|
|
3
|
-
Version: 0.3.5
|
|
4
|
-
Summary: MCP server for AI-powered Rossum orchestration: document workflows, debug pipelines automatically, and configure intelligent document processing through natural language.
|
|
5
|
-
Author-email: "Dan Stancl (Rossum AI)" <daniel.stancl@gmail.com>
|
|
6
|
-
License: MIT
|
|
7
|
-
Keywords: mcp,rossum,document-processing
|
|
8
|
-
Requires-Python: >=3.12
|
|
9
|
-
Description-Content-Type: text/markdown
|
|
10
|
-
Requires-Dist: fastmcp>2.0.0
|
|
11
|
-
Requires-Dist: pydantic>2.0.0
|
|
12
|
-
Requires-Dist: rossum-api>=3.7.0
|
|
13
|
-
Provides-Extra: docs
|
|
14
|
-
Requires-Dist: myst-parser>=2.0.0; extra == "docs"
|
|
15
|
-
Requires-Dist: sphinx>=7.0.0; extra == "docs"
|
|
16
|
-
Requires-Dist: sphinx-autodoc-typehints>=1.25.0; extra == "docs"
|
|
17
|
-
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "docs"
|
|
18
|
-
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
|
|
19
|
-
Provides-Extra: tests
|
|
20
|
-
Requires-Dist: coverage>=7.0.0; extra == "tests"
|
|
21
|
-
Requires-Dist: pytest>=7.0.0; extra == "tests"
|
|
22
|
-
Requires-Dist: pytest-asyncio>=0.21.0; extra == "tests"
|
|
23
|
-
Requires-Dist: pytest-cov>=4.0.0; extra == "tests"
|
|
24
|
-
Requires-Dist: redis>=7.0.0; extra == "tests"
|
|
25
|
-
Provides-Extra: all
|
|
26
|
-
Requires-Dist: coverage>=7.0.0; extra == "all"
|
|
27
|
-
Requires-Dist: fastmcp>=1.0.0; extra == "all"
|
|
28
|
-
Requires-Dist: myst-parser>=2.0.0; extra == "all"
|
|
29
|
-
Requires-Dist: pydantic>2.0.0; extra == "all"
|
|
30
|
-
Requires-Dist: pytest>=7.0.0; extra == "all"
|
|
31
|
-
Requires-Dist: pytest-asyncio>=0.21.0; extra == "all"
|
|
32
|
-
Requires-Dist: redis>=7.0.0; extra == "all"
|
|
33
|
-
Requires-Dist: rossum-api>=3.7.0; extra == "all"
|
|
34
|
-
Requires-Dist: sphinx>=7.0.0; extra == "all"
|
|
35
|
-
Requires-Dist: sphinx-autodoc-typehints>=1.25.0; extra == "all"
|
|
36
|
-
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "all"
|
|
37
|
-
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "all"
|
|
38
|
-
|
|
39
1
|
# Rossum MCP Server
|
|
40
2
|
|
|
41
3
|
<div align="center">
|
|
@@ -45,11 +7,12 @@ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "all"
|
|
|
45
7
|
[](https://opensource.org/licenses/MIT)
|
|
46
8
|
[](https://pypi.org/project/rossum-mcp/)
|
|
47
9
|
[](https://codecov.io/gh/stancld/rossum-mcp)
|
|
48
|
-
[](#available-tools)
|
|
49
11
|
|
|
50
12
|
[](https://github.com/rossumai/rossum-api)
|
|
51
13
|
[](https://modelcontextprotocol.io/)
|
|
52
14
|
[](https://github.com/astral-sh/ruff)
|
|
15
|
+
[](https://github.com/astral-sh/ty)
|
|
53
16
|
[](https://github.com/astral-sh/uv)
|
|
54
17
|
|
|
55
18
|
</div>
|
|
@@ -64,7 +27,9 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
64
27
|
|
|
65
28
|
## Features
|
|
66
29
|
|
|
67
|
-
|
|
30
|
+
<details>
|
|
31
|
+
<summary><strong>Document Processing (6 tools)</strong></summary>
|
|
32
|
+
|
|
68
33
|
- **upload_document**: Upload a document to Rossum for processing
|
|
69
34
|
- **get_annotation**: Retrieve annotation data for a previously uploaded document
|
|
70
35
|
- **list_annotations**: List all annotations for a queue with optional filtering
|
|
@@ -72,7 +37,11 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
72
37
|
- **bulk_update_annotation_fields**: Bulk update annotation field values using JSON Patch operations
|
|
73
38
|
- **confirm_annotation**: Confirm annotation to move it to 'confirmed' status
|
|
74
39
|
|
|
75
|
-
|
|
40
|
+
</details>
|
|
41
|
+
|
|
42
|
+
<details>
|
|
43
|
+
<summary><strong>Queue & Schema Management (13 tools)</strong></summary>
|
|
44
|
+
|
|
76
45
|
- **get_queue**: Retrieve queue details including schema_id
|
|
77
46
|
- **list_queues**: List all queues with optional filtering by workspace or name
|
|
78
47
|
- **get_schema**: Retrieve schema details and content
|
|
@@ -87,17 +56,29 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
87
56
|
- **patch_schema**: Add, update, or remove individual schema nodes without replacing entire content
|
|
88
57
|
- **prune_schema_fields**: Efficiently remove multiple fields from schema at once (for organization setup)
|
|
89
58
|
|
|
90
|
-
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary><strong>Workspace Management (3 tools)</strong></summary>
|
|
63
|
+
|
|
91
64
|
- **get_workspace**: Retrieve workspace details by ID
|
|
92
65
|
- **list_workspaces**: List all workspaces with optional filtering
|
|
93
66
|
- **create_workspace**: Create a new workspace
|
|
94
67
|
|
|
95
|
-
|
|
68
|
+
</details>
|
|
69
|
+
|
|
70
|
+
<details>
|
|
71
|
+
<summary><strong>User Management (3 tools)</strong></summary>
|
|
72
|
+
|
|
96
73
|
- **get_user**: Retrieve user details by ID
|
|
97
74
|
- **list_users**: List users with optional filtering by username, email, etc.
|
|
98
75
|
- **list_user_roles**: List all user roles (permission groups) in the organization
|
|
99
76
|
|
|
100
|
-
|
|
77
|
+
</details>
|
|
78
|
+
|
|
79
|
+
<details>
|
|
80
|
+
<summary><strong>Engine Management (6 tools)</strong></summary>
|
|
81
|
+
|
|
101
82
|
- **get_engine**: Retrieve engine details by ID
|
|
102
83
|
- **list_engines**: List all engines with optional filters
|
|
103
84
|
- **create_engine**: Create a new engine (extractor or splitter)
|
|
@@ -105,7 +86,11 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
105
86
|
- **create_engine_field**: Create engine fields and link them to schemas
|
|
106
87
|
- **get_engine_fields**: Retrieve engine fields for a specific engine or all engine fields
|
|
107
88
|
|
|
108
|
-
|
|
89
|
+
</details>
|
|
90
|
+
|
|
91
|
+
<details>
|
|
92
|
+
<summary><strong>Extensions & Rules (9 tools)</strong></summary>
|
|
93
|
+
|
|
109
94
|
- **get_hook**: Get hook/extension details
|
|
110
95
|
- **list_hooks**: List webhooks and serverless functions (extensions)
|
|
111
96
|
- **create_hook**: Create webhooks or serverless function hooks for custom logic
|
|
@@ -116,17 +101,34 @@ A Model Context Protocol (MCP) server that provides tools for uploading document
|
|
|
116
101
|
- **get_rule**: Get business rule details
|
|
117
102
|
- **list_rules**: List business rules with trigger conditions and actions
|
|
118
103
|
|
|
119
|
-
|
|
104
|
+
</details>
|
|
105
|
+
|
|
106
|
+
<details>
|
|
107
|
+
<summary><strong>Email Templates (3 tools)</strong></summary>
|
|
108
|
+
|
|
120
109
|
- **get_email_template**: Retrieve email template details by ID
|
|
121
110
|
- **list_email_templates**: List email templates with optional filtering by queue, type, or name
|
|
122
111
|
- **create_email_template**: Create email templates for automated or manual email sending
|
|
123
112
|
|
|
124
|
-
|
|
113
|
+
</details>
|
|
114
|
+
|
|
115
|
+
<details>
|
|
116
|
+
<summary><strong>Relations Management (4 tools)</strong></summary>
|
|
117
|
+
|
|
125
118
|
- **get_relation**: Retrieve relation details by ID
|
|
126
119
|
- **list_relations**: List all relations between annotations (edit, attachment, duplicate)
|
|
127
120
|
- **get_document_relation**: Retrieve document relation details by ID
|
|
128
121
|
- **list_document_relations**: List all document relations (export, einvoice)
|
|
129
122
|
|
|
123
|
+
</details>
|
|
124
|
+
|
|
125
|
+
<details>
|
|
126
|
+
<summary><strong>Tool Discovery (1 tool)</strong></summary>
|
|
127
|
+
|
|
128
|
+
- **list_tool_categories**: List all available tool categories with descriptions, tool names, and keywords for dynamic tool loading
|
|
129
|
+
|
|
130
|
+
</details>
|
|
131
|
+
|
|
130
132
|
## Prerequisites
|
|
131
133
|
|
|
132
134
|
- Python 3.12 or higher
|
|
@@ -1704,6 +1706,65 @@ template = create_email_template(
|
|
|
1704
1706
|
)
|
|
1705
1707
|
```
|
|
1706
1708
|
|
|
1709
|
+
### Tool Discovery
|
|
1710
|
+
|
|
1711
|
+
#### list_tool_categories
|
|
1712
|
+
|
|
1713
|
+
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.
|
|
1714
|
+
|
|
1715
|
+
**Parameters:**
|
|
1716
|
+
None
|
|
1717
|
+
|
|
1718
|
+
**Returns:**
|
|
1719
|
+
```json
|
|
1720
|
+
[
|
|
1721
|
+
{
|
|
1722
|
+
"name": "annotations",
|
|
1723
|
+
"description": "Document processing: upload, retrieve, update, and confirm annotations",
|
|
1724
|
+
"tool_count": 6,
|
|
1725
|
+
"tools": [
|
|
1726
|
+
{"name": "upload_document", "description": "Upload document to queue"},
|
|
1727
|
+
{"name": "get_annotation", "description": "Retrieve annotation with extracted data"}
|
|
1728
|
+
],
|
|
1729
|
+
"keywords": ["annotation", "document", "upload", "extract", "confirm", "review"]
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
"name": "queues",
|
|
1733
|
+
"description": "Queue management: create, configure, and list document processing queues",
|
|
1734
|
+
"tool_count": 8,
|
|
1735
|
+
"tools": [
|
|
1736
|
+
{"name": "get_queue", "description": "Retrieve queue details"},
|
|
1737
|
+
{"name": "list_queues", "description": "List all queues"}
|
|
1738
|
+
],
|
|
1739
|
+
"keywords": ["queue", "inbox", "connector"]
|
|
1740
|
+
}
|
|
1741
|
+
]
|
|
1742
|
+
```
|
|
1743
|
+
|
|
1744
|
+
**Available Categories:**
|
|
1745
|
+
- `annotations` - Document processing tools (6 tools)
|
|
1746
|
+
- `queues` - Queue management tools (8 tools)
|
|
1747
|
+
- `schemas` - Schema management tools (7 tools)
|
|
1748
|
+
- `engines` - AI engine management tools (6 tools)
|
|
1749
|
+
- `hooks` - Extensions/webhooks tools (7 tools)
|
|
1750
|
+
- `email_templates` - Email template tools (3 tools)
|
|
1751
|
+
- `document_relations` - Document relation tools (2 tools)
|
|
1752
|
+
- `relations` - Annotation relation tools (2 tools)
|
|
1753
|
+
- `rules` - Validation rule tools (2 tools)
|
|
1754
|
+
- `users` - User management tools (3 tools)
|
|
1755
|
+
- `workspaces` - Workspace management tools (3 tools)
|
|
1756
|
+
|
|
1757
|
+
**Example usage:**
|
|
1758
|
+
```python
|
|
1759
|
+
# Discover all tool categories
|
|
1760
|
+
categories = list_tool_categories()
|
|
1761
|
+
|
|
1762
|
+
# Find categories by keyword matching
|
|
1763
|
+
for category in categories:
|
|
1764
|
+
if "schema" in category["keywords"]:
|
|
1765
|
+
print(f"Found: {category['name']} with {category['tool_count']} tools")
|
|
1766
|
+
```
|
|
1767
|
+
|
|
1707
1768
|
## Annotation Status Workflow
|
|
1708
1769
|
|
|
1709
1770
|
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.
|
|
7
|
+
version = "0.4.0"
|
|
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"
|
|
@@ -13,6 +13,17 @@ authors = [
|
|
|
13
13
|
{name = "Dan Stancl (Rossum AI)", email = "daniel.stancl@gmail.com"}
|
|
14
14
|
]
|
|
15
15
|
keywords = ["mcp", "rossum", "document-processing"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Programming Language :: Python :: 3.14",
|
|
23
|
+
"Intended Audience :: Developers",
|
|
24
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
25
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
26
|
+
]
|
|
16
27
|
dependencies = [
|
|
17
28
|
"fastmcp>2.0.0",
|
|
18
29
|
"pydantic>2.0.0",
|
|
@@ -17,6 +17,7 @@ from rossum_api.dtos import Token
|
|
|
17
17
|
from rossum_mcp.logging_config import setup_logging
|
|
18
18
|
from rossum_mcp.tools import (
|
|
19
19
|
register_annotation_tools,
|
|
20
|
+
register_discovery_tools,
|
|
20
21
|
register_document_relation_tools,
|
|
21
22
|
register_email_template_tools,
|
|
22
23
|
register_engine_tools,
|
|
@@ -45,6 +46,7 @@ logger.info(f"Rossum MCP Server starting in {MODE} mode")
|
|
|
45
46
|
mcp = FastMCP("rossum-mcp-server")
|
|
46
47
|
client = AsyncRossumAPIClient(base_url=BASE_URL, credentials=Token(token=API_TOKEN))
|
|
47
48
|
|
|
49
|
+
register_discovery_tools(mcp)
|
|
48
50
|
register_annotation_tools(mcp, client)
|
|
49
51
|
register_queue_tools(mcp, client)
|
|
50
52
|
register_schema_tools(mcp, client)
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from rossum_mcp.tools.annotations import register_annotation_tools
|
|
6
|
+
from rossum_mcp.tools.catalog import (
|
|
7
|
+
TOOL_CATALOG,
|
|
8
|
+
ToolCategory,
|
|
9
|
+
ToolInfo,
|
|
10
|
+
get_catalog_summary,
|
|
11
|
+
)
|
|
12
|
+
from rossum_mcp.tools.discovery import register_discovery_tools
|
|
6
13
|
from rossum_mcp.tools.document_relations import register_document_relation_tools
|
|
7
14
|
from rossum_mcp.tools.email_templates import register_email_template_tools
|
|
8
15
|
from rossum_mcp.tools.engines import register_engine_tools
|
|
@@ -15,7 +22,12 @@ from rossum_mcp.tools.users import register_user_tools
|
|
|
15
22
|
from rossum_mcp.tools.workspaces import register_workspace_tools
|
|
16
23
|
|
|
17
24
|
__all__ = [
|
|
25
|
+
"TOOL_CATALOG",
|
|
26
|
+
"ToolCategory",
|
|
27
|
+
"ToolInfo",
|
|
28
|
+
"get_catalog_summary",
|
|
18
29
|
"register_annotation_tools",
|
|
30
|
+
"register_discovery_tools",
|
|
19
31
|
"register_document_relation_tools",
|
|
20
32
|
"register_email_template_tools",
|
|
21
33
|
"register_engine_tools",
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"""Tool catalog for dynamic tool discovery.
|
|
2
|
+
|
|
3
|
+
Provides lightweight metadata for all MCP tools organized by category.
|
|
4
|
+
This is the single source of truth for tool categorization - the agent
|
|
5
|
+
fetches this catalog from MCP to avoid data duplication.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass
|
|
14
|
+
class ToolInfo:
|
|
15
|
+
"""Lightweight tool metadata for catalog."""
|
|
16
|
+
|
|
17
|
+
name: str
|
|
18
|
+
description: str
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass
|
|
22
|
+
class ToolCategory:
|
|
23
|
+
"""A category of related tools."""
|
|
24
|
+
|
|
25
|
+
name: str
|
|
26
|
+
description: str
|
|
27
|
+
tools: list[ToolInfo]
|
|
28
|
+
keywords: list[str]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Tool catalog organized by functional category
|
|
32
|
+
# Keywords enable automatic pre-loading based on user request text
|
|
33
|
+
TOOL_CATALOG: dict[str, ToolCategory] = {
|
|
34
|
+
"annotations": ToolCategory(
|
|
35
|
+
name="annotations",
|
|
36
|
+
description="Document processing: upload, retrieve, update, and confirm annotations",
|
|
37
|
+
tools=[
|
|
38
|
+
ToolInfo("upload_document", "Upload document to queue"),
|
|
39
|
+
ToolInfo("get_annotation", "Retrieve annotation with extracted data"),
|
|
40
|
+
ToolInfo("list_annotations", "List annotations for a queue"),
|
|
41
|
+
ToolInfo("start_annotation", "Start annotation (to_review -> reviewing)"),
|
|
42
|
+
ToolInfo("bulk_update_annotation_fields", "Bulk update annotation fields"),
|
|
43
|
+
ToolInfo("confirm_annotation", "Confirm annotation (-> confirmed)"),
|
|
44
|
+
],
|
|
45
|
+
keywords=["annotation", "document", "upload", "extract", "confirm", "review"],
|
|
46
|
+
),
|
|
47
|
+
"queues": ToolCategory(
|
|
48
|
+
name="queues",
|
|
49
|
+
description="Queue management: create, configure, and list document processing queues",
|
|
50
|
+
tools=[
|
|
51
|
+
ToolInfo("get_queue", "Retrieve queue details"),
|
|
52
|
+
ToolInfo("list_queues", "List all queues"),
|
|
53
|
+
ToolInfo("get_queue_schema", "Get queue's schema"),
|
|
54
|
+
ToolInfo("get_queue_engine", "Get queue's AI engine"),
|
|
55
|
+
ToolInfo("create_queue", "Create a queue"),
|
|
56
|
+
ToolInfo("update_queue", "Update queue settings"),
|
|
57
|
+
ToolInfo("get_queue_template_names", "List available queue templates"),
|
|
58
|
+
ToolInfo("create_queue_from_template", "Create queue from template"),
|
|
59
|
+
],
|
|
60
|
+
keywords=["queue", "inbox", "connector"],
|
|
61
|
+
),
|
|
62
|
+
"schemas": ToolCategory(
|
|
63
|
+
name="schemas",
|
|
64
|
+
description="Schema management: define and modify document field structures",
|
|
65
|
+
tools=[
|
|
66
|
+
ToolInfo("get_schema", "Retrieve schema details"),
|
|
67
|
+
ToolInfo("list_schemas", "List all schemas"),
|
|
68
|
+
ToolInfo("update_schema", "Update schema"),
|
|
69
|
+
ToolInfo("create_schema", "Create new schema"),
|
|
70
|
+
ToolInfo("patch_schema", "Add/update/remove schema fields"),
|
|
71
|
+
ToolInfo("get_schema_tree_structure", "Get lightweight schema tree"),
|
|
72
|
+
ToolInfo("prune_schema_fields", "Bulk remove schema fields"),
|
|
73
|
+
],
|
|
74
|
+
keywords=["schema", "field", "datapoint", "section", "multivalue", "tuple"],
|
|
75
|
+
),
|
|
76
|
+
"engines": ToolCategory(
|
|
77
|
+
name="engines",
|
|
78
|
+
description="AI engine management: create and configure extraction/splitting engines",
|
|
79
|
+
tools=[
|
|
80
|
+
ToolInfo("get_engine", "Retrieve engine details"),
|
|
81
|
+
ToolInfo("list_engines", "List all engines"),
|
|
82
|
+
ToolInfo("update_engine", "Update engine settings"),
|
|
83
|
+
ToolInfo("create_engine", "Create new engine"),
|
|
84
|
+
ToolInfo("create_engine_field", "Create engine field mapping"),
|
|
85
|
+
ToolInfo("get_engine_fields", "List engine fields"),
|
|
86
|
+
],
|
|
87
|
+
keywords=["engine", "ai", "extractor", "splitter", "training"],
|
|
88
|
+
),
|
|
89
|
+
"hooks": ToolCategory(
|
|
90
|
+
name="hooks",
|
|
91
|
+
description="Extensions/webhooks: create and manage automation hooks",
|
|
92
|
+
tools=[
|
|
93
|
+
ToolInfo("get_hook", "Retrieve hook details with code"),
|
|
94
|
+
ToolInfo("list_hooks", "List all hooks for a queue"),
|
|
95
|
+
ToolInfo("create_hook", "Create new hook"),
|
|
96
|
+
ToolInfo("update_hook", "Update hook configuration"),
|
|
97
|
+
ToolInfo("list_hook_logs", "View hook execution logs"),
|
|
98
|
+
ToolInfo("list_hook_templates", "List Rossum Store templates"),
|
|
99
|
+
ToolInfo("create_hook_from_template", "Create hook from template"),
|
|
100
|
+
],
|
|
101
|
+
keywords=["hook", "extension", "webhook", "automation", "function", "serverless"],
|
|
102
|
+
),
|
|
103
|
+
"email_templates": ToolCategory(
|
|
104
|
+
name="email_templates",
|
|
105
|
+
description="Email templates: configure automated email responses",
|
|
106
|
+
tools=[
|
|
107
|
+
ToolInfo("get_email_template", "Retrieve email template"),
|
|
108
|
+
ToolInfo("list_email_templates", "List email templates"),
|
|
109
|
+
ToolInfo("create_email_template", "Create email template"),
|
|
110
|
+
],
|
|
111
|
+
keywords=["email", "template", "notification", "rejection"],
|
|
112
|
+
),
|
|
113
|
+
"document_relations": ToolCategory(
|
|
114
|
+
name="document_relations",
|
|
115
|
+
description="Document relations: manage export/einvoice document links",
|
|
116
|
+
tools=[
|
|
117
|
+
ToolInfo("get_document_relation", "Retrieve document relation"),
|
|
118
|
+
ToolInfo("list_document_relations", "List document relations"),
|
|
119
|
+
],
|
|
120
|
+
keywords=["document relation", "export", "einvoice"],
|
|
121
|
+
),
|
|
122
|
+
"relations": ToolCategory(
|
|
123
|
+
name="relations",
|
|
124
|
+
description="Annotation relations: manage edit/attachment/duplicate links",
|
|
125
|
+
tools=[
|
|
126
|
+
ToolInfo("get_relation", "Retrieve relation details"),
|
|
127
|
+
ToolInfo("list_relations", "List annotation relations"),
|
|
128
|
+
],
|
|
129
|
+
keywords=["relation", "duplicate", "attachment", "edit"],
|
|
130
|
+
),
|
|
131
|
+
"rules": ToolCategory(
|
|
132
|
+
name="rules",
|
|
133
|
+
description="Validation rules: manage schema validation rules",
|
|
134
|
+
tools=[
|
|
135
|
+
ToolInfo("get_rule", "Retrieve rule details"),
|
|
136
|
+
ToolInfo("list_rules", "List validation rules"),
|
|
137
|
+
],
|
|
138
|
+
keywords=["rule", "validation", "constraint"],
|
|
139
|
+
),
|
|
140
|
+
"users": ToolCategory(
|
|
141
|
+
name="users",
|
|
142
|
+
description="User management: list users and roles",
|
|
143
|
+
tools=[
|
|
144
|
+
ToolInfo("get_user", "Retrieve user details"),
|
|
145
|
+
ToolInfo("list_users", "List users with filters"),
|
|
146
|
+
ToolInfo("list_user_roles", "List available user roles"),
|
|
147
|
+
],
|
|
148
|
+
keywords=["user", "role", "permission", "token_owner"],
|
|
149
|
+
),
|
|
150
|
+
"workspaces": ToolCategory(
|
|
151
|
+
name="workspaces",
|
|
152
|
+
description="Workspace management: organize queues into workspaces",
|
|
153
|
+
tools=[
|
|
154
|
+
ToolInfo("get_workspace", "Retrieve workspace details"),
|
|
155
|
+
ToolInfo("list_workspaces", "List all workspaces"),
|
|
156
|
+
ToolInfo("create_workspace", "Create new workspace"),
|
|
157
|
+
],
|
|
158
|
+
keywords=["workspace", "organization"],
|
|
159
|
+
),
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def get_catalog_summary() -> str:
|
|
164
|
+
"""Get a compact text summary of all tool categories for the system prompt."""
|
|
165
|
+
lines = ["Available MCP tool categories (use `list_tool_categories` for details):"]
|
|
166
|
+
for category in TOOL_CATALOG.values():
|
|
167
|
+
tool_names = ", ".join(t.name for t in category.tools)
|
|
168
|
+
lines.append(f"- **{category.name}**: {category.description} [{tool_names}]")
|
|
169
|
+
return "\n".join(lines)
|