matimo-microsoft 0.1.2__tar.gz → 0.2.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.
Files changed (28) hide show
  1. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/.gitignore +3 -1
  2. matimo_microsoft-0.2.0/LICENSE +21 -0
  3. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/PKG-INFO +35 -29
  4. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/README.md +31 -26
  5. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/pyproject.toml +2 -2
  6. matimo_microsoft-0.2.0/src/matimo_microsoft/skills/microsoft/SKILL.md +150 -0
  7. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/__init__.py +0 -0
  8. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/graph_client.py +0 -0
  9. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_create_calendar_event/definition.yaml +0 -0
  10. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_create_calendar_event/ms_create_calendar_event.py +0 -0
  11. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_create_document/definition.yaml +0 -0
  12. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_create_document/ms_create_document.py +0 -0
  13. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_get_email/definition.yaml +0 -0
  14. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_get_email/ms_get_email.py +0 -0
  15. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_list_files/definition.yaml +0 -0
  16. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_list_files/ms_list_files.py +0 -0
  17. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_publish_to_sharepoint/definition.yaml +0 -0
  18. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_publish_to_sharepoint/ms_publish_to_sharepoint.py +0 -0
  19. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_read_file/definition.yaml +0 -0
  20. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_read_file/ms_read_file.py +0 -0
  21. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_search_knowledge/definition.yaml +0 -0
  22. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_search_knowledge/ms_search_knowledge.py +0 -0
  23. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_send_email/definition.yaml +0 -0
  24. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_send_email/ms_send_email.py +0 -0
  25. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_send_teams_message/definition.yaml +0 -0
  26. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/src/matimo_microsoft/tools/ms_send_teams_message/ms_send_teams_message.py +0 -0
  27. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/tests/unit/test_graph_client.py +0 -0
  28. {matimo_microsoft-0.1.2 → matimo_microsoft-0.2.0}/tests/unit/test_microsoft_tools.py +0 -0
@@ -58,7 +58,6 @@ temp/
58
58
 
59
59
  # Personal scratch notes / working docs — not part of the shipped repo
60
60
  .local-notes/
61
- typescript/examples/mcp/matimo-tools/.matimo-approvals.json
62
61
  typescript/examples/mcp/matimo-tools/fetch-weather/definition.yaml
63
62
  typescript/examples/mcp/matimo-tools/npm_downloads/definition.yaml
64
63
  typescript/examples/mcp/matimo-tools/skills/ecosystem-health/SKILL.md
@@ -68,3 +67,6 @@ typescript/packages/cli/.matimo/certs/server.crt
68
67
  typescript/packages/cli/.matimo/certs/server.key
69
68
  typescript/examples/mcp/.matimo/certs/server.crt
70
69
  typescript/examples/mcp/.matimo/certs/server.key
70
+
71
+ # HITL approval manifests are per-machine state (HMAC-signed approvals); never commit one
72
+ **/.matimo-approvals.json
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ROAIQ TECHNOLOGIES PRIVATE LIMITED
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,24 +1,25 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: matimo-microsoft
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: Matimo provider — Microsoft Graph tools (mail, calendar, Teams, files, SharePoint)
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Keywords: agents,ai,graph,matimo,microsoft,outlook,sharepoint,teams,tools
7
8
  Classifier: Development Status :: 4 - Beta
8
9
  Classifier: Intended Audience :: Developers
9
10
  Classifier: License :: OSI Approved :: MIT License
10
11
  Classifier: Programming Language :: Python :: 3.11
11
12
  Requires-Python: >=3.11
12
- Requires-Dist: matimo-core<0.2.0,>=0.1.0
13
+ Requires-Dist: matimo-core<0.3.0,>=0.2.0
13
14
  Description-Content-Type: text/markdown
14
15
 
15
16
  # matimo-microsoft
16
17
 
17
- > Microsoft Graph tools for [Matimo](https://matimo.dev) — search, OneDrive/SharePoint
18
+ > Microsoft Graph tools for [Matimo](https://matimo.dev) - search, OneDrive/SharePoint
18
19
  > files, Outlook mail, Microsoft Teams, calendar, and SharePoint publishing.
19
20
 
20
21
  [![PyPI](https://img.shields.io/pypi/v/matimo-microsoft)](https://pypi.org/project/matimo-microsoft/)
21
- [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://matimo.dev/docs)
22
+ [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://docs.matimo.dev)
22
23
 
23
24
  ---
24
25
 
@@ -32,26 +33,26 @@ pip install matimo matimo-microsoft
32
33
 
33
34
  ## Available Tools (9 Total)
34
35
 
35
- | Tool | Description | Risk | Graph endpoint |
36
+ | Tool | Description | Approval | Graph endpoint |
36
37
  |------|-------------|------|----------------|
37
- | `ms_search_knowledge` | Search SharePoint sites, OneDrive/SharePoint files, and list items | low | `POST /search/query` |
38
- | `ms_read_file` | Read a OneDrive/SharePoint file's contents (plain-text formats only) | low | `GET /drives/{id}/items/{id}/content` |
39
- | `ms_list_files` | List the children of a OneDrive/SharePoint folder | low | `GET /drives/{id}/items/{id}/children` |
40
- | `ms_get_email` | List messages in the signed-in user's mailbox | low | `GET /me/messages` |
41
- | `ms_send_email` | Send an email as the signed-in user | **high** (approval) | `POST /me/messages` + `/send` |
42
- | `ms_send_teams_message` | Post (or reply to) a message in a Teams channel | medium | `POST /teams/{id}/channels/{id}/messages` |
43
- | `ms_create_document` | Upload a small file to OneDrive/SharePoint (≤4 MB) | medium | `PUT /drives/{id}/items/{id}:/{name}:/content` |
44
- | `ms_create_calendar_event` | Create a calendar event, optionally as a Teams meeting | medium | `POST /me/events` |
45
- | `ms_publish_to_sharepoint` | Create and publish a SharePoint site page | **high** (approval) | `POST /sites/{id}/pages` + `/publish` |
38
+ | `ms_search_knowledge` | Search SharePoint sites, OneDrive/SharePoint files, and list items | - | `POST /search/query` |
39
+ | `ms_read_file` | Read a OneDrive/SharePoint file's contents (plain-text formats only) | - | `GET /drives/{id}/items/{id}/content` |
40
+ | `ms_list_files` | List the children of a OneDrive/SharePoint folder | - | `GET /drives/{id}/items/{id}/children` |
41
+ | `ms_get_email` | List messages in the signed-in user's mailbox | - | `GET /me/messages` |
42
+ | `ms_send_email` | Send an email as the signed-in user | **required** | `POST /me/messages` + `/send` |
43
+ | `ms_send_teams_message` | Post (or reply to) a message in a Teams channel | - | `POST /teams/{id}/channels/{id}/messages` |
44
+ | `ms_create_document` | Upload a small file to OneDrive/SharePoint (≤4 MB) | - | `PUT /drives/{id}/items/{id}:/{name}:/content` |
45
+ | `ms_create_calendar_event` | Create a calendar event, optionally as a Teams meeting | - | `POST /me/events` |
46
+ | `ms_publish_to_sharepoint` | Create and publish a SharePoint site page | **required** | `POST /sites/{id}/pages` + `/publish` |
46
47
 
47
48
  ---
48
49
 
49
50
  ## Quick Start
50
51
 
51
52
  ```python
52
- from matimo import MatimoInstance
53
+ from matimo import Matimo
53
54
 
54
- matimo = await MatimoInstance.init(auto_discover=True)
55
+ matimo = await Matimo.init(auto_discover=True)
55
56
 
56
57
  # Search across SharePoint and OneDrive
57
58
  search = await matimo.execute("ms_search_knowledge", {"query": "Q3 budget filetype:xlsx", "top": 5})
@@ -59,7 +60,7 @@ search = await matimo.execute("ms_search_knowledge", {"query": "Q3 budget filety
59
60
  # List messages in the signed-in user's mailbox
60
61
  inbox = await matimo.execute("ms_get_email", {"top": 5, "filter": "isRead eq false"})
61
62
 
62
- # Send an email (requires_approval: true — routed through HITL)
63
+ # Send an email (requires_approval: true - routed through HITL)
63
64
  await matimo.execute(
64
65
  "ms_send_email",
65
66
  {"to": ["alice@contoso.com"], "subject": "Weekly status update", "body": "Here is the summary..."},
@@ -71,7 +72,7 @@ await matimo.execute(
71
72
  ## Authentication
72
73
 
73
74
  Microsoft Graph tools use delegated OAuth2 access tokens. Matimo never performs the
74
- OAuth code exchange itself — connect Microsoft through your Matimo deployment (Nova),
75
+ OAuth code exchange itself - connect Microsoft through your Matimo deployment (Nova),
75
76
  then provide the resulting token at execution time:
76
77
 
77
78
  ```bash
@@ -92,12 +93,17 @@ await matimo.execute(
92
93
 
93
94
  ## Risk & Approval
94
95
 
95
- `ms_send_email` and `ms_publish_to_sharepoint` are marked `risk: high` and
96
- `requires_approval: true` — Matimo routes them through the human-in-the-loop approval
97
- flow before they execute, since they send mail and publish content visible to others
98
- on the user's behalf. `ms_send_teams_message`, `ms_create_document`, and
99
- `ms_create_calendar_event` are `risk: medium` (external writes, narrower blast radius).
100
- The remaining read-only tools are `risk: low`.
96
+ `ms_send_email` and `ms_publish_to_sharepoint` are marked `requires_approval: true` -
97
+ Matimo routes them through the human-in-the-loop approval flow before they execute,
98
+ since they send mail and publish content visible to others on the user's behalf. The
99
+ other 7 tools have no `requires_approval` flag and execute immediately.
100
+
101
+ None of the 9 tools declare an explicit `risk:` field in their YAML. If you enable
102
+ HITL quarantine (`enableHITL=True` with a `quarantineRiskLevels` policy config), be
103
+ aware that every tool in this package uses `execution.type: function`, and Matimo's
104
+ automatic risk classifier assigns `type: function` tools `risk: critical` by default
105
+ regardless of what they actually do - so all 9 tools, including the read-only ones,
106
+ will classify as `critical` if `critical` is in your `quarantineRiskLevels`.
101
107
 
102
108
  ---
103
109
 
@@ -105,9 +111,9 @@ The remaining read-only tools are `risk: low`.
105
111
 
106
112
  - [Microsoft Graph API overview](https://learn.microsoft.com/en-us/graph/overview)
107
113
  - [Graph Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer)
108
- - [Python Examples — Direct SDK](https://github.com/tallclub/matimo/tree/main/python/examples/native/microsoft)
109
- - [Python Examples — LangChain agent](https://github.com/tallclub/matimo/tree/main/python/examples/langchain/microsoft)
110
- - [Python Examples — CrewAI crew](https://github.com/tallclub/matimo/tree/main/python/examples/crewai/microsoft)
114
+ - [Python Examples - Direct SDK](https://github.com/tallclub/matimo/tree/main/python/examples/native/microsoft)
115
+ - [Python Examples - LangChain agent](https://github.com/tallclub/matimo/tree/main/python/examples/langchain/microsoft)
116
+ - [Python Examples - CrewAI crew](https://github.com/tallclub/matimo/tree/main/python/examples/crewai/microsoft)
111
117
 
112
118
  ---
113
119
 
@@ -116,4 +122,4 @@ The remaining read-only tools are `risk: low`.
116
122
  - **PyPI:** https://pypi.org/project/matimo-microsoft/
117
123
  - **GitHub:** https://github.com/tallclub/matimo
118
124
  - **Microsoft Graph API Docs:** https://learn.microsoft.com/en-us/graph/overview
119
- - **Matimo documentation:** https://matimo.dev/docs
125
+ - **Matimo documentation:** https://docs.matimo.dev/
@@ -1,10 +1,10 @@
1
1
  # matimo-microsoft
2
2
 
3
- > Microsoft Graph tools for [Matimo](https://matimo.dev) — search, OneDrive/SharePoint
3
+ > Microsoft Graph tools for [Matimo](https://matimo.dev) - search, OneDrive/SharePoint
4
4
  > files, Outlook mail, Microsoft Teams, calendar, and SharePoint publishing.
5
5
 
6
6
  [![PyPI](https://img.shields.io/pypi/v/matimo-microsoft)](https://pypi.org/project/matimo-microsoft/)
7
- [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://matimo.dev/docs)
7
+ [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://docs.matimo.dev)
8
8
 
9
9
  ---
10
10
 
@@ -18,26 +18,26 @@ pip install matimo matimo-microsoft
18
18
 
19
19
  ## Available Tools (9 Total)
20
20
 
21
- | Tool | Description | Risk | Graph endpoint |
21
+ | Tool | Description | Approval | Graph endpoint |
22
22
  |------|-------------|------|----------------|
23
- | `ms_search_knowledge` | Search SharePoint sites, OneDrive/SharePoint files, and list items | low | `POST /search/query` |
24
- | `ms_read_file` | Read a OneDrive/SharePoint file's contents (plain-text formats only) | low | `GET /drives/{id}/items/{id}/content` |
25
- | `ms_list_files` | List the children of a OneDrive/SharePoint folder | low | `GET /drives/{id}/items/{id}/children` |
26
- | `ms_get_email` | List messages in the signed-in user's mailbox | low | `GET /me/messages` |
27
- | `ms_send_email` | Send an email as the signed-in user | **high** (approval) | `POST /me/messages` + `/send` |
28
- | `ms_send_teams_message` | Post (or reply to) a message in a Teams channel | medium | `POST /teams/{id}/channels/{id}/messages` |
29
- | `ms_create_document` | Upload a small file to OneDrive/SharePoint (≤4 MB) | medium | `PUT /drives/{id}/items/{id}:/{name}:/content` |
30
- | `ms_create_calendar_event` | Create a calendar event, optionally as a Teams meeting | medium | `POST /me/events` |
31
- | `ms_publish_to_sharepoint` | Create and publish a SharePoint site page | **high** (approval) | `POST /sites/{id}/pages` + `/publish` |
23
+ | `ms_search_knowledge` | Search SharePoint sites, OneDrive/SharePoint files, and list items | - | `POST /search/query` |
24
+ | `ms_read_file` | Read a OneDrive/SharePoint file's contents (plain-text formats only) | - | `GET /drives/{id}/items/{id}/content` |
25
+ | `ms_list_files` | List the children of a OneDrive/SharePoint folder | - | `GET /drives/{id}/items/{id}/children` |
26
+ | `ms_get_email` | List messages in the signed-in user's mailbox | - | `GET /me/messages` |
27
+ | `ms_send_email` | Send an email as the signed-in user | **required** | `POST /me/messages` + `/send` |
28
+ | `ms_send_teams_message` | Post (or reply to) a message in a Teams channel | - | `POST /teams/{id}/channels/{id}/messages` |
29
+ | `ms_create_document` | Upload a small file to OneDrive/SharePoint (≤4 MB) | - | `PUT /drives/{id}/items/{id}:/{name}:/content` |
30
+ | `ms_create_calendar_event` | Create a calendar event, optionally as a Teams meeting | - | `POST /me/events` |
31
+ | `ms_publish_to_sharepoint` | Create and publish a SharePoint site page | **required** | `POST /sites/{id}/pages` + `/publish` |
32
32
 
33
33
  ---
34
34
 
35
35
  ## Quick Start
36
36
 
37
37
  ```python
38
- from matimo import MatimoInstance
38
+ from matimo import Matimo
39
39
 
40
- matimo = await MatimoInstance.init(auto_discover=True)
40
+ matimo = await Matimo.init(auto_discover=True)
41
41
 
42
42
  # Search across SharePoint and OneDrive
43
43
  search = await matimo.execute("ms_search_knowledge", {"query": "Q3 budget filetype:xlsx", "top": 5})
@@ -45,7 +45,7 @@ search = await matimo.execute("ms_search_knowledge", {"query": "Q3 budget filety
45
45
  # List messages in the signed-in user's mailbox
46
46
  inbox = await matimo.execute("ms_get_email", {"top": 5, "filter": "isRead eq false"})
47
47
 
48
- # Send an email (requires_approval: true — routed through HITL)
48
+ # Send an email (requires_approval: true - routed through HITL)
49
49
  await matimo.execute(
50
50
  "ms_send_email",
51
51
  {"to": ["alice@contoso.com"], "subject": "Weekly status update", "body": "Here is the summary..."},
@@ -57,7 +57,7 @@ await matimo.execute(
57
57
  ## Authentication
58
58
 
59
59
  Microsoft Graph tools use delegated OAuth2 access tokens. Matimo never performs the
60
- OAuth code exchange itself — connect Microsoft through your Matimo deployment (Nova),
60
+ OAuth code exchange itself - connect Microsoft through your Matimo deployment (Nova),
61
61
  then provide the resulting token at execution time:
62
62
 
63
63
  ```bash
@@ -78,12 +78,17 @@ await matimo.execute(
78
78
 
79
79
  ## Risk & Approval
80
80
 
81
- `ms_send_email` and `ms_publish_to_sharepoint` are marked `risk: high` and
82
- `requires_approval: true` — Matimo routes them through the human-in-the-loop approval
83
- flow before they execute, since they send mail and publish content visible to others
84
- on the user's behalf. `ms_send_teams_message`, `ms_create_document`, and
85
- `ms_create_calendar_event` are `risk: medium` (external writes, narrower blast radius).
86
- The remaining read-only tools are `risk: low`.
81
+ `ms_send_email` and `ms_publish_to_sharepoint` are marked `requires_approval: true` -
82
+ Matimo routes them through the human-in-the-loop approval flow before they execute,
83
+ since they send mail and publish content visible to others on the user's behalf. The
84
+ other 7 tools have no `requires_approval` flag and execute immediately.
85
+
86
+ None of the 9 tools declare an explicit `risk:` field in their YAML. If you enable
87
+ HITL quarantine (`enableHITL=True` with a `quarantineRiskLevels` policy config), be
88
+ aware that every tool in this package uses `execution.type: function`, and Matimo's
89
+ automatic risk classifier assigns `type: function` tools `risk: critical` by default
90
+ regardless of what they actually do - so all 9 tools, including the read-only ones,
91
+ will classify as `critical` if `critical` is in your `quarantineRiskLevels`.
87
92
 
88
93
  ---
89
94
 
@@ -91,9 +96,9 @@ The remaining read-only tools are `risk: low`.
91
96
 
92
97
  - [Microsoft Graph API overview](https://learn.microsoft.com/en-us/graph/overview)
93
98
  - [Graph Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer)
94
- - [Python Examples — Direct SDK](https://github.com/tallclub/matimo/tree/main/python/examples/native/microsoft)
95
- - [Python Examples — LangChain agent](https://github.com/tallclub/matimo/tree/main/python/examples/langchain/microsoft)
96
- - [Python Examples — CrewAI crew](https://github.com/tallclub/matimo/tree/main/python/examples/crewai/microsoft)
99
+ - [Python Examples - Direct SDK](https://github.com/tallclub/matimo/tree/main/python/examples/native/microsoft)
100
+ - [Python Examples - LangChain agent](https://github.com/tallclub/matimo/tree/main/python/examples/langchain/microsoft)
101
+ - [Python Examples - CrewAI crew](https://github.com/tallclub/matimo/tree/main/python/examples/crewai/microsoft)
97
102
 
98
103
  ---
99
104
 
@@ -102,4 +107,4 @@ The remaining read-only tools are `risk: low`.
102
107
  - **PyPI:** https://pypi.org/project/matimo-microsoft/
103
108
  - **GitHub:** https://github.com/tallclub/matimo
104
109
  - **Microsoft Graph API Docs:** https://learn.microsoft.com/en-us/graph/overview
105
- - **Matimo documentation:** https://matimo.dev/docs
110
+ - **Matimo documentation:** https://docs.matimo.dev/
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "matimo-microsoft"
7
- version = "0.1.2"
7
+ version = "0.2.0"
8
8
  description = "Matimo provider — Microsoft Graph tools (mail, calendar, Teams, files, SharePoint)"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -17,7 +17,7 @@ classifiers = [
17
17
  "Programming Language :: Python :: 3.11",
18
18
  ]
19
19
  dependencies = [
20
- "matimo-core>=0.1.0,<0.2.0",
20
+ "matimo-core>=0.2.0,<0.3.0",
21
21
  ]
22
22
 
23
23
  [project.entry-points."matimo.providers"]
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: microsoft
3
+ description: "Complete guide to all Microsoft Graph tools — search, OneDrive/SharePoint files, Outlook mail, Teams, calendar, and SharePoint publishing."
4
+ version: "1.0.0"
5
+ license: "MIT"
6
+ metadata:
7
+ category: "Productivity"
8
+ difficulty: "intermediate"
9
+ apply-to: "ms_search_knowledge ms_read_file ms_list_files ms_get_email ms_send_email ms_send_teams_message ms_create_document ms_create_calendar_event ms_publish_to_sharepoint"
10
+ author: "Matimo"
11
+ tags: "microsoft,graph,office365,sharepoint,onedrive,outlook,teams,calendar"
12
+ ---
13
+
14
+ # Microsoft Graph
15
+
16
+ Complete guide to using Matimo's Microsoft Graph tools for searching organizational
17
+ knowledge, reading and writing OneDrive/SharePoint files, managing Outlook mail and
18
+ calendar events, posting to Microsoft Teams, and publishing SharePoint pages.
19
+
20
+ ## All Available Tools
21
+
22
+ | Tool | Purpose | Risk |
23
+ |------|---------|------|
24
+ | `ms_search_knowledge` | Search SharePoint sites, OneDrive/SharePoint files, and list items | low |
25
+ | `ms_read_file` | Read a file's contents from OneDrive/SharePoint | low |
26
+ | `ms_list_files` | List the children of a OneDrive/SharePoint folder | low |
27
+ | `ms_get_email` | List messages in the signed-in user's mailbox | low |
28
+ | `ms_send_email` | Send an email as the signed-in user | **high** — requires approval |
29
+ | `ms_send_teams_message` | Post or reply to a message in a Teams channel | medium |
30
+ | `ms_create_document` | Upload a small file (≤4 MB) to OneDrive/SharePoint | medium |
31
+ | `ms_create_calendar_event` | Create a calendar event, optionally a Teams meeting | medium |
32
+ | `ms_publish_to_sharepoint` | Create and publish a SharePoint site page | **high** — requires approval |
33
+
34
+ ## Authentication
35
+
36
+ Microsoft Graph tools use delegated OAuth2 access tokens via the `microsoft` provider
37
+ (see the package's `definition.yaml`). Matimo never performs the OAuth code exchange
38
+ itself — a valid Graph access token must already be available, supplied either as:
39
+
40
+ - `credentials.MICROSOFT_GRAPH_ACCESS_TOKEN` on the execution context, or
41
+ - the `MICROSOFT_GRAPH_ACCESS_TOKEN` environment variable
42
+
43
+ Common delegated scopes: `Sites.Read.All`, `Files.Read.All`, `Files.ReadWrite`,
44
+ `Mail.Read`, `Mail.Send`, `ChannelMessage.Send`, `Calendars.ReadWrite`,
45
+ `Sites.Manage.All`. Each tool's YAML lists the narrower scopes it actually needs.
46
+
47
+ ---
48
+
49
+ ## Searching Organizational Knowledge
50
+
51
+ Use `ms_search_knowledge` with:
52
+ - `query` (required) — KQL-style search string, e.g. `"Q3 budget filetype:xlsx"`
53
+ - `entity_types` — which content types to search (`driveItem`, `listItem`, `site`, `list`, `drive`); defaults to `[driveItem, listItem, site]`
54
+ - `top` — max results, 1-25 (default 10)
55
+ - `site_id` / `drive_id` — **best-effort scoping hints**, folded into the query string. Microsoft Search has no dedicated server-side filter for sites/drives on these entity types, so don't expect a hard filter — narrow the `query` text itself for reliable scoping.
56
+
57
+ ---
58
+
59
+ ## Reading & Listing Files
60
+
61
+ `ms_list_files` lists the children of a folder (`item_id` defaults to `"root"`),
62
+ returning `{id, name, type: "file"|"folder", size_bytes, last_modified, mime_type, web_url}`.
63
+
64
+ `ms_read_file` downloads and decodes a file's content. **Plain-text formats only**
65
+ (`text/*`, `application/json`, `application/xml`) are returned as UTF-8 text. Rich
66
+ document formats — PDF, Word, Excel, PowerPoint — and other binaries return
67
+ `content: ""` plus a `warning` explaining why (this tool deliberately does not bundle
68
+ unverified parsing libraries like `pdf-parse`/`mammoth`/`xlsx`). When you see a
69
+ `warning`, share the file's `web_url` instead of trying to summarize its content.
70
+
71
+ ---
72
+
73
+ ## Outlook Mail
74
+
75
+ `ms_get_email` lists messages with optional `filter` (OData, e.g. `"isRead eq false"`),
76
+ `search` (free text), and `folder_id` (e.g. `"inbox"`, `"sentitems"`, or a folder ID).
77
+
78
+ `ms_send_email` sends mail **(risk: high, requires_approval: true — routed through
79
+ Matimo's human-in-the-loop approval flow)**. It creates a draft first and then sends
80
+ it, so it can return a real `message_id` — Graph's `/me/sendMail` endpoint returns no
81
+ identifier on its own. Required: `to[]`, `subject`, `body`. Optional: `cc[]`, `bcc[]`,
82
+ `body_type` (`text` default, or `html`).
83
+
84
+ **Best practices:**
85
+ - Always confirm recipient lists before sending — this tool requires HITL approval for exactly this reason
86
+ - Use `body_type: html` for formatted announcements; keep plain text for quick notes
87
+
88
+ ---
89
+
90
+ ## Microsoft Teams
91
+
92
+ `ms_send_teams_message` posts to a channel (`team_id`, `channel_id`, `text`
93
+ required). Pass `reply_to_message_id` to thread a reply instead of starting a new
94
+ top-level message. `content_type` is `text` (default) or `html`.
95
+
96
+ ---
97
+
98
+ ## Calendar
99
+
100
+ `ms_create_calendar_event` creates an event on the user's default calendar. Required:
101
+ `subject`, `start`, `end` (e.g. `"2026-06-15T09:00:00"`). The single `timezone`
102
+ parameter (default `UTC`) applies to both `start` and `end`. Set
103
+ `is_online_meeting: true` to have Teams generate a meeting — the response then
104
+ includes a `join_url`.
105
+
106
+ ---
107
+
108
+ ## Files & SharePoint Writes
109
+
110
+ `ms_create_document` uploads small text-based files (≤4 MB — Graph's simple-upload
111
+ limit; larger files need a resumable upload session, not implemented here). Provide
112
+ `content` as plain text or, with `content_encoding: base64`, as base64. `filename`
113
+ and `drive_id` are required; `parent_item_id` defaults to the drive root.
114
+ `conflict_behaviour` (`replace`/`rename`/`fail`) is passed as a best-effort hint.
115
+
116
+ `ms_publish_to_sharepoint` creates a site page with a single text web part and
117
+ publishes it by default **(risk: high, requires_approval: true)**. Plain-text
118
+ `content_type: text` is HTML-escaped and wrapped in a paragraph before being placed
119
+ in the page (SharePoint always stores web part bodies as HTML). Set `publish: false`
120
+ to leave the page as an unpublished draft for review.
121
+
122
+ ---
123
+
124
+ ## Common Workflows
125
+
126
+ ### Answer a question from organizational knowledge
127
+ 1. `ms_search_knowledge` with a focused query
128
+ 2. `ms_read_file` on the most relevant `driveItem` hit's `id`/drive — check for a `warning` before trusting `content`
129
+ 3. Summarize, citing the hit's `web_url`
130
+
131
+ ### Triage the inbox and follow up in Teams
132
+ 1. `ms_get_email` with `filter: "isRead eq false"` to find unread mail
133
+ 2. `ms_send_teams_message` to notify a channel about anything urgent
134
+ 3. `ms_send_email` to reply (will require approval)
135
+
136
+ ### Schedule and announce a meeting
137
+ 1. `ms_create_calendar_event` with `is_online_meeting: true` to get a `join_url`
138
+ 2. `ms_send_teams_message` or `ms_send_email` to share the `join_url` and `web_link`
139
+
140
+ ---
141
+
142
+ ## Common Errors
143
+
144
+ | Error code | Cause | Fix |
145
+ |------------|-------|-----|
146
+ | `AUTH_FAILED` | Missing/expired/insufficient-scope access token (Graph 401/403) | Reconnect Microsoft in Nova; verify the token has the scope the tool's YAML lists |
147
+ | `FILE_NOT_FOUND` | Graph returned 404 for the given drive/item/site/team/channel ID | Double-check the ID — Graph IDs are case-sensitive and tenant-specific |
148
+ | `RATE_LIMIT_EXCEEDED` | Graph returned 429 | Respect `details.retryAfterSeconds`; the tool already retries transient 429/5xx with backoff |
149
+ | `VALIDATION_FAILED` | A required parameter is missing or an enum/range value is invalid | Check the tool's `parameters` block — validation runs before any network call |
150
+ | `EXECUTION_FAILED` | Graph returned 5xx, or an unexpected/empty response shape | Usually transient — retry; if persistent, check Graph service health |