Skip to content

Commit 157f1f0

Browse files
Jie Tongcraft-agents-bot
authored andcommitted
docs: sync SKILL.md — hide list-chat-messages, promote list-chat-messages-all
Co-Authored-By: Eureka <agents-noreply@craft.do>
1 parent 2fb2386 commit 157f1f0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

skills/m365-cli/SKILL.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ m365 <service> <action> [key=value ...] [--json]
1616

1717
**Always use `--json` for programmatic access.** Parse the JSON output to extract data.
1818

19-
Use `m365 <service> <action> --help` for detailed parameter info on any action.
19+
Use `m365 <service> <action> --help` for detailed parameter info on any listed action.
2020

2121
## Services & Actions
2222

23-
### teams — Microsoft Teams (24 actions)
23+
### teams — Microsoft Teams (23 listed actions + 1 hidden compatibility action)
2424
| Action | Parameters | Description |
2525
|--------|-----------|-------------|
2626
| `list-teams` | **userId** (GUID, required) | List Teams the user belongs to |
@@ -41,13 +41,15 @@ Use `m365 <service> <action> --help` for detailed parameter info on any action.
4141
| `update-chat` | **chatId** (required), topic | Update chat properties |
4242
| `list-chat-members` | **chatId** (required) | List members of a chat |
4343
| `add-chat-member` | **chatId**, **userId** (required) | Add a member to a chat |
44-
| `list-chat-messages` | **chatId** (required), top, filter, orderby | List messages in a chat |
44+
| `list-chat-messages-all` | **chatId**, **range** (required, e.g. 2h/7d/30m) | Fetch all messages in a chat within a time range (handles pagination automatically) |
4545
| `get-chat-message` | **chatId**, **messageId** (required) | Get a specific chat message |
4646
| `post-message` | **chatId**, **content** (required) | Send a message to a chat |
4747
| `update-chat-message` | **chatId**, **messageId**, **content** (required) | Update a chat message |
4848
| `send-message-to-self` | **content** (required), contentType | Send a message to yourself |
4949
| `search-teams-messages` | **message** (required), conversationId | Natural language search across Teams messages |
5050

51+
`list-chat-messages` remains functional for compatibility but is intentionally hidden from help/docs. Prefer `list-chat-messages-all`.
52+
5153
### mail — Outlook Mail (21 actions)
5254
| Action | Parameters | Description |
5355
|--------|-----------|-------------|
@@ -160,7 +162,7 @@ m365 teams post-message chatId="<chat_id-from-fav>" content="Hey!" --json
160162
```bash
161163
m365 fav get project-alpha --json
162164
# → Returns chat_id, then:
163-
m365 teams list-chat-messages chatId="<chat_id>" top=20 --json
165+
m365 teams list-chat-messages-all chatId="<chat_id>" range=2h --json
164166
```
165167

166168
#### Post to a favorite channel
@@ -193,9 +195,8 @@ Summarize messages from a specific chat/person or across all favorites.
193195
# 1. Get the chat_id from favorites
194196
m365 fav get <alias> --json
195197

196-
# 2. Fetch messages with time-window filter (chat supports OData $filter)
197-
m365 teams list-chat-messages chatId="<chat_id>" top=50 \
198-
filter="lastModifiedDateTime gt 2026-03-21T00:00:00Z" --json
198+
# 2. Fetch all messages within a time range (handles pagination automatically)
199+
m365 teams list-chat-messages-all chatId="<chat_id>" range=2h --json
199200

200201
# 3. Summarize the returned messages
201202
```
@@ -206,9 +207,8 @@ m365 teams list-chat-messages chatId="<chat_id>" top=50 \
206207
m365 fav list --json
207208
# Filter for type=chat and type=channel entries
208209

209-
# 2. For each favorite CHAT — use filter for time window
210-
m365 teams list-chat-messages chatId="<chat_id>" top=50 \
211-
filter="lastModifiedDateTime gt <start-time>Z" --json
210+
# 2. For each favorite CHAT — fetch all messages in time range
211+
m365 teams list-chat-messages-all chatId="<chat_id>" range=2h --json
212212

213213
# 3. For each favorite CHANNEL — fetch messages then filter locally
214214
# NOTE: Channel messages do NOT support $filter. Fetch with top= and
@@ -306,8 +306,8 @@ m365 mail send-email-with-attachments to='["user@contoso.com"]' \
306306
- **Stdin support**: pipe JSON via `--stdin` for complex payloads
307307
- **Parameter names are camelCase** — match exactly as shown (e.g. `userUpns`, `chatId`, `startDateTime`)
308308
- If a command fails with "Not logged in", run `m365 login` first
309-
- Use `m365 <service> <action> --help` to see detailed parameters for any action
310-
- Use `m365 <service> --help` to see all available actions for a service
309+
- Use `m365 <service> <action> --help` to see detailed parameters for any listed action
310+
- Use `m365 <service> --help` to see the visible actions for a service
311311

312312
## Error Handling
313313

0 commit comments

Comments
 (0)