@chrischall/microsoft-teams-mcp 0.13.0 → 0.13.1
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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +12 -2
- package/dist/bundle.js +38 -7
- package/dist/tools/send.js +70 -10
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "MCP server for Microsoft Teams — read any chat or channel, your unread messages, and their attachments, and send messages and reactions (each confirmed first)",
|
|
10
|
-
"version": "0.13.
|
|
10
|
+
"version": "0.13.1"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "Microsoft Teams",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "MCP server for Microsoft Teams — read any chat or channel, your unread messages, and their attachments, and send messages and reactions (each confirmed first), via your signed-in browser session",
|
|
18
|
-
"version": "0.13.
|
|
18
|
+
"version": "0.13.1",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microsoft-teams-mcp",
|
|
3
3
|
"displayName": "Microsoft Teams",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"description": "Microsoft Teams for Claude — read any chat or channel, your unread messages, and their attachments, and send messages and reactions (each confirmed first), using your signed-in browser session",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Chris Hall",
|
package/README.md
CHANGED
|
@@ -686,8 +686,18 @@ Everything is optional — by default the token is captured from your browser.
|
|
|
686
686
|
emoji and mentions work as in plain text. Anything else — raw HTML,
|
|
687
687
|
headings, quotes, images — is escaped and shown as written. The preview's
|
|
688
688
|
`willSend.content` is the exact HTML that will be posted.
|
|
689
|
-
`reply_to` posts into a channel post's
|
|
690
|
-
|
|
689
|
+
Nothing is quoted by default. `reply_to` posts into a channel post's
|
|
690
|
+
thread — it must be a root post in that channel, not a reply. In a chat,
|
|
691
|
+
`reply_to` and `quote` are the same thing: both quote-reply that message.
|
|
692
|
+
`quote` quote-replies a message anywhere. Pass either only when the user
|
|
693
|
+
asked for a reply or a quote; when that is ambiguous (a message's
|
|
694
|
+
timestamp, or "reply" in a chat), ask. The preview says what is quoted in
|
|
695
|
+
plain words — `quoting: "Bea Example", 2026-11-12 12:31 UTC: "…"` (the
|
|
696
|
+
time in `TEAMS_TIME_ZONE` when set) or `quoting: "none"` — and its summary
|
|
697
|
+
ends `, quoting "<sender>"` or `, no quote`. Setting `reply_to` adds a
|
|
698
|
+
`warning` saying what it does (a thread reply in a channel, a quote in a
|
|
699
|
+
chat). The fenced details of the quoted message are in `quoted_message`.
|
|
700
|
+
`mentions`
|
|
691
701
|
@-mentions people by MRI or by a display name matched among the
|
|
692
702
|
conversation's recent senders (an ambiguous name is refused with the
|
|
693
703
|
candidates). The result says whether the post was found again by reading
|
package/dist/bundle.js
CHANGED
|
@@ -38524,7 +38524,7 @@ var init_version = __esm({
|
|
|
38524
38524
|
"src/version.ts"() {
|
|
38525
38525
|
"use strict";
|
|
38526
38526
|
PACKAGE_NAME = "microsoft-teams-mcp";
|
|
38527
|
-
VERSION = "0.13.
|
|
38527
|
+
VERSION = "0.13.1";
|
|
38528
38528
|
}
|
|
38529
38529
|
});
|
|
38530
38530
|
|
|
@@ -198146,6 +198146,7 @@ var TOOL2 = "teams_send_message";
|
|
|
198146
198146
|
var READBACK_MESSAGES = 50;
|
|
198147
198147
|
var MAX_CANDIDATES3 = 10;
|
|
198148
198148
|
var PREVIEW_CHARS3 = 200;
|
|
198149
|
+
var QUOTING_LINE_CHARS = 80;
|
|
198149
198150
|
var formatParam = external_exports.enum(MESSAGE_FORMATS).optional().describe(
|
|
198150
198151
|
'How text is written (default "text"). text: plain text, escaped. markdown: **bold**, *italic*, ~~strike~~, `code`, fenced code blocks, - and 1. lists (nested by indenting), [text](https://\u2026) links; nothing else is markup.'
|
|
198151
198152
|
);
|
|
@@ -198196,7 +198197,31 @@ async function quoted(chatsvc, conversationId, id) {
|
|
|
198196
198197
|
});
|
|
198197
198198
|
}
|
|
198198
198199
|
const mri = senderMri(m2.from) ?? "";
|
|
198199
|
-
|
|
198200
|
+
const time3 = m2.originalarrivaltime ?? m2.composetime;
|
|
198201
|
+
return {
|
|
198202
|
+
id: m2.id,
|
|
198203
|
+
senderMri: mri,
|
|
198204
|
+
senderName: m2.imdisplayname?.trim() || mri,
|
|
198205
|
+
text: htmlToText2(m2.content ?? ""),
|
|
198206
|
+
...time3 ? { time: time3 } : {}
|
|
198207
|
+
};
|
|
198208
|
+
}
|
|
198209
|
+
function quotedWhen(iso) {
|
|
198210
|
+
if (iso === void 0 || Number.isNaN(Date.parse(iso))) return void 0;
|
|
198211
|
+
let zone;
|
|
198212
|
+
try {
|
|
198213
|
+
zone = resolveTimeZone(void 0);
|
|
198214
|
+
} catch {
|
|
198215
|
+
zone = void 0;
|
|
198216
|
+
}
|
|
198217
|
+
const local = zone !== void 0 ? localIsoTime(iso, zone) : void 0;
|
|
198218
|
+
if (zone !== void 0 && local !== void 0) return `${local.slice(0, 16).replace("T", " ")} ${zone}`;
|
|
198219
|
+
return `${new Date(iso).toISOString().slice(0, 16).replace("T", " ")} UTC`;
|
|
198220
|
+
}
|
|
198221
|
+
function quotingLine(q2) {
|
|
198222
|
+
if (q2 === void 0) return "none";
|
|
198223
|
+
const when2 = quotedWhen(q2.time);
|
|
198224
|
+
return `${JSON.stringify(q2.senderName)}${when2 ? `, ${when2}` : ""}: ${JSON.stringify(clipText(q2.text, QUOTING_LINE_CHARS, "\u2026"))}`;
|
|
198200
198225
|
}
|
|
198201
198226
|
async function threadRoot(chatsvc, channelId, id, me2) {
|
|
198202
198227
|
const m2 = await chatsvc.getMessage(channelId, id);
|
|
@@ -198224,7 +198249,7 @@ function registerSendTools(server, { chatsvc }) {
|
|
|
198224
198249
|
TOOL2,
|
|
198225
198250
|
{
|
|
198226
198251
|
title: "Send a Teams message",
|
|
198227
|
-
description: `Post a message as the signed-in user to any chat or channel, by id (from teams_list_conversations / teams_list_channels) or by name. text is plain text by default: it is escaped, newlines are kept, and :key: shortcodes become emoji: Teams' animated ones for like, heart, laugh, surprised, sad, angry, smile, wink, cool, hearteyes, fire and party; the plain character for common names (:rocket:, :tada:, :thumbsup:, :eyes:, :white_check_mark:, \u2026) and unicode-style keys (:1f680_rocket:). format "markdown" reads text as Markdown instead: **bold**, *italic*, ~~strike~~, \`inline code\`, \`\`\` code blocks \`\`\`, bulleted (- item) and numbered (1. item) lists, [link text](https://\u2026), blank-line paragraphs and line breaks; raw HTML, headings, quotes and images are escaped and shown as written. reply_to in a channel posts into that root post's thread; in a chat
|
|
198252
|
+
description: `Post a message as the signed-in user to any chat or channel, by id (from teams_list_conversations / teams_list_channels) or by name. text is plain text by default: it is escaped, newlines are kept, and :key: shortcodes become emoji: Teams' animated ones for like, heart, laugh, surprised, sad, angry, smile, wink, cool, hearteyes, fire and party; the plain character for common names (:rocket:, :tada:, :thumbsup:, :eyes:, :white_check_mark:, \u2026) and unicode-style keys (:1f680_rocket:). format "markdown" reads text as Markdown instead: **bold**, *italic*, ~~strike~~, \`inline code\`, \`\`\` code blocks \`\`\`, bulleted (- item) and numbered (1. item) lists, [link text](https://\u2026), blank-line paragraphs and line breaks; raw HTML, headings, quotes and images are escaped and shown as written. By default nothing is quoted. reply_to in a channel posts into that root post's thread (a thread reply, no quote); in a chat, reply_to and quote are the same thing: both quote-reply that message, so the post opens with a quote of it. quote quote-replies a message in any conversation. Pass reply_to or quote only when the user asked for a reply or a quote; when the request is ambiguous (they mention a message's timestamp, or say "reply" in a chat), ask them whether they want it quoted rather than guessing. mentions @-mention people: name_in_text must appear in text, and person is an MRI or a display name matched among recent senders (ambiguous names are refused with the candidates). conversation "${SELF_CHAT}" (or "notes" / "self") is the user's own notes self-chat \u2014 use it to try this tool without anyone else seeing; other 48: system conversations are refused. Everyone in the conversation sees the post. The result says whether the post was found again by reading the conversation back (verified); status "unknown" means Teams did not confirm it \u2014 check the conversation before retrying. ` + CONFIRM_FLOW_SENTENCE + ' The preview shows the conversation and exactly what would be posted, says in plain words what is quoted (quoting: the sender, time and text, or "none"), and warns when reply_to is set. ' + CONFIRM_INJECTION_RULE + UNTRUSTED_DESCRIPTION_SUFFIX2,
|
|
198228
198253
|
annotations: toolAnnotations({ readOnly: false, destructive: true, idempotent: false, openWorld: true }),
|
|
198229
198254
|
_meta: workMeta("send", { aliases: ["message", "send a message", "reply", "tell", "post", "chat"] }),
|
|
198230
198255
|
inputSchema: {
|
|
@@ -198233,8 +198258,10 @@ function registerSendTools(server, { chatsvc }) {
|
|
|
198233
198258
|
),
|
|
198234
198259
|
text: external_exports.string().min(1).describe('The message: plain text (newlines kept, :key: shortcodes become emoji), or Markdown with format "markdown".'),
|
|
198235
198260
|
format: formatParam,
|
|
198236
|
-
reply_to: external_exports.string().min(1).optional().describe(
|
|
198237
|
-
|
|
198261
|
+
reply_to: external_exports.string().min(1).optional().describe(
|
|
198262
|
+
"A message id. Channel: the root post to reply under (threaded, no quote). Chat: the message to quote-reply \u2014 the same as quote. Only when the user asked for a reply or quote."
|
|
198263
|
+
),
|
|
198264
|
+
quote: external_exports.string().min(1).optional().describe("A message id to quote-reply, in any conversation. Only when the user asked for a quote."),
|
|
198238
198265
|
mentions: external_exports.array(mentionArg).max(20).optional().describe("People to @-mention in text."),
|
|
198239
198266
|
confirmToken: confirmTokenParam
|
|
198240
198267
|
}
|
|
@@ -198263,6 +198290,8 @@ function registerSendTools(server, { chatsvc }) {
|
|
|
198263
198290
|
format
|
|
198264
198291
|
);
|
|
198265
198292
|
const content = (q2 ? quoteHtml(q2) : "") + rendered.html;
|
|
198293
|
+
const quoting = quotingLine(q2);
|
|
198294
|
+
const replyWarning = reply_to === void 0 ? void 0 : inChannel ? `reply_to is set: this posts into the thread under root post ${reply_to}, not as a new post in the channel. Drop reply_to unless the user asked to reply in that thread.` : `reply_to is set: in a chat it quote-replies message ${reply_to}, so the post opens with a quote of it (see quoting). Drop reply_to unless the user asked for a quote.`;
|
|
198266
198295
|
const properties = {
|
|
198267
198296
|
...rendered.mentions.length > 0 ? { mentions: mentionsProperty(rendered.mentions) } : {},
|
|
198268
198297
|
...q2 ? { qtdMsgs: qtdMsgsProperty(q2) } : {}
|
|
@@ -198275,7 +198304,7 @@ function registerSendTools(server, { chatsvc }) {
|
|
|
198275
198304
|
action: "chat.send_message",
|
|
198276
198305
|
message: "Review and confirm this Teams message before it is posted:",
|
|
198277
198306
|
// The title is someone else's text: JSON-quoted so it cannot break out of its quotes.
|
|
198278
|
-
summary: `Post a message to ${target.kind} ${JSON.stringify(target.title)}`,
|
|
198307
|
+
summary: `Post a message to ${target.kind} ${JSON.stringify(target.title)}` + (q2 ? `, quoting ${JSON.stringify(q2.senderName)}` : ", no quote") + (inChannel && reply_to !== void 0 ? `, in the thread under ${reply_to}` : ""),
|
|
198279
198308
|
// The signed-in user, so an approval minted under one account never posts as another.
|
|
198280
198309
|
account: me2,
|
|
198281
198310
|
target: postTo,
|
|
@@ -198285,6 +198314,8 @@ function registerSendTools(server, { chatsvc }) {
|
|
|
198285
198314
|
// result is; `text` is the caller's own.
|
|
198286
198315
|
preview: {
|
|
198287
198316
|
conversation: untrustedField(target),
|
|
198317
|
+
quoting,
|
|
198318
|
+
...replyWarning ? { warning: replyWarning } : {},
|
|
198288
198319
|
text,
|
|
198289
198320
|
format,
|
|
198290
198321
|
...inChannel && reply_to !== void 0 ? { thread_root: reply_to } : {},
|
|
@@ -198297,7 +198328,7 @@ function registerSendTools(server, { chatsvc }) {
|
|
|
198297
198328
|
}))
|
|
198298
198329
|
)
|
|
198299
198330
|
} : {},
|
|
198300
|
-
...q2 ? {
|
|
198331
|
+
...q2 ? { quoted_message: untrustedField({ id: q2.id, sender: q2.senderName, preview: clipText(q2.text, PREVIEW_CHARS3) }) } : {},
|
|
198301
198332
|
note: "clientmessageid and the timestamps are filled in when the message is posted."
|
|
198302
198333
|
},
|
|
198303
198334
|
confirmToken
|
package/dist/tools/send.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { CONFIRM_FLOW_SENTENCE, CONFIRM_INJECTION_RULE, confirmTokenParam, confirmWrite, McpToolError, toolAnnotations, unknownOutcomeReason, writeOrUnknown, } from '@chrischall/mcp-utils';
|
|
3
3
|
import { buildSendBody, clipText, MESSAGE_FORMATS, mentionsProperty, newClientMessageId, qtdMsgsProperty, quoteHtml, renderMessageHtml, } from '../compose.js';
|
|
4
|
-
import { htmlToText, normaliseMessage, SELF_CHAT, senderMri } from '../model.js';
|
|
4
|
+
import { htmlToText, localIsoTime, normaliseMessage, SELF_CHAT, senderMri } from '../model.js';
|
|
5
5
|
import { resolveListed } from './conversation.js';
|
|
6
6
|
import { wrapApiError } from './errors.js';
|
|
7
7
|
import { MRI, recentSenders } from './people.js';
|
|
8
8
|
import { THIRD_PARTY_NAMES_NOTE, untrustedField, untrustedResult, UNTRUSTED_DESCRIPTION_SUFFIX, } from './untrusted.js';
|
|
9
9
|
import { workMeta } from './hints.js';
|
|
10
|
+
import { resolveTimeZone } from './timezone.js';
|
|
10
11
|
const TOOL = 'teams_send_message';
|
|
11
12
|
/**
|
|
12
13
|
* The user's own notes chat — the one `48:*` system conversation that takes
|
|
@@ -20,6 +21,8 @@ const READBACK_MESSAGES = 50;
|
|
|
20
21
|
const MAX_CANDIDATES = 10;
|
|
21
22
|
/** Previewed text of a quoted message. */
|
|
22
23
|
const PREVIEW_CHARS = 200;
|
|
24
|
+
/** Quoted text carried in the preview's one-line `quoting`. */
|
|
25
|
+
const QUOTING_LINE_CHARS = 80;
|
|
23
26
|
/** How `text` is read: shared by `teams_send_message` and `teams_edit_message`. */
|
|
24
27
|
export const formatParam = z
|
|
25
28
|
.enum(MESSAGE_FORMATS)
|
|
@@ -102,7 +105,45 @@ async function quoted(chatsvc, conversationId, id) {
|
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
107
|
const mri = senderMri(m.from) ?? '';
|
|
105
|
-
|
|
108
|
+
const time = m.originalarrivaltime ?? m.composetime;
|
|
109
|
+
return {
|
|
110
|
+
id: m.id,
|
|
111
|
+
senderMri: mri,
|
|
112
|
+
senderName: m.imdisplayname?.trim() || mri,
|
|
113
|
+
text: htmlToText(m.content ?? ''),
|
|
114
|
+
...(time ? { time } : {}),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* When a quoted message was sent, to the minute: in TEAMS_TIME_ZONE when one is
|
|
119
|
+
* set ("2026-11-12 12:31 America/New_York"), else UTC. A bad TEAMS_TIME_ZONE
|
|
120
|
+
* falls back to UTC here — it must not stop a preview.
|
|
121
|
+
*/
|
|
122
|
+
function quotedWhen(iso) {
|
|
123
|
+
if (iso === undefined || Number.isNaN(Date.parse(iso)))
|
|
124
|
+
return undefined;
|
|
125
|
+
let zone;
|
|
126
|
+
try {
|
|
127
|
+
zone = resolveTimeZone(undefined);
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
zone = undefined;
|
|
131
|
+
}
|
|
132
|
+
const local = zone !== undefined ? localIsoTime(iso, zone) : undefined;
|
|
133
|
+
if (zone !== undefined && local !== undefined)
|
|
134
|
+
return `${local.slice(0, 16).replace('T', ' ')} ${zone}`;
|
|
135
|
+
return `${new Date(iso).toISOString().slice(0, 16).replace('T', ' ')} UTC`;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The preview's plain-words `quoting` line: `none`, or the quoted sender, when
|
|
139
|
+
* and the start of what they wrote. Sender and text are other people's, so each
|
|
140
|
+
* is JSON-quoted (on one line, its own quotes escaped) as the title is in the summary.
|
|
141
|
+
*/
|
|
142
|
+
function quotingLine(q) {
|
|
143
|
+
if (q === undefined)
|
|
144
|
+
return 'none';
|
|
145
|
+
const when = quotedWhen(q.time);
|
|
146
|
+
return `${JSON.stringify(q.senderName)}${when ? `, ${when}` : ''}: ${JSON.stringify(clipText(q.text, QUOTING_LINE_CHARS, '…'))}`;
|
|
106
147
|
}
|
|
107
148
|
/**
|
|
108
149
|
* The channel root post a threaded reply goes under, read to prove it is one:
|
|
@@ -147,9 +188,13 @@ export function registerSendTools(server, { chatsvc }) {
|
|
|
147
188
|
':eyes:, :white_check_mark:, …) and unicode-style keys (:1f680_rocket:). format "markdown" ' +
|
|
148
189
|
'reads text as Markdown instead: **bold**, *italic*, ~~strike~~, `inline code`, ``` code blocks ```, ' +
|
|
149
190
|
'bulleted (- item) and numbered (1. item) lists, [link text](https://…), blank-line paragraphs and ' +
|
|
150
|
-
'line breaks; raw HTML, headings, quotes and images are escaped and shown as written.
|
|
151
|
-
'channel posts into that root post\'s thread
|
|
152
|
-
'quote
|
|
191
|
+
'line breaks; raw HTML, headings, quotes and images are escaped and shown as written. By default ' +
|
|
192
|
+
'nothing is quoted. reply_to in a channel posts into that root post\'s thread (a thread reply, no ' +
|
|
193
|
+
'quote); in a chat, reply_to and quote are the same thing: both quote-reply that message, so the ' +
|
|
194
|
+
'post opens with a quote of it. quote quote-replies a message in any conversation. Pass reply_to ' +
|
|
195
|
+
'or quote only when the user asked for a reply or a quote; when the request is ambiguous (they ' +
|
|
196
|
+
'mention a message\'s timestamp, or say "reply" in a chat), ask them whether they want it quoted ' +
|
|
197
|
+
'rather than guessing. mentions @-mention people: name_in_text must appear ' +
|
|
153
198
|
'in text, and person is an MRI or a display name matched among recent senders (ambiguous names ' +
|
|
154
199
|
`are refused with the candidates). conversation "${SELF_CHAT}" (or "notes" / "self") is the user's own notes self-chat — ` +
|
|
155
200
|
'use it to try this tool without anyone else seeing; other 48: system conversations are refused. ' +
|
|
@@ -157,7 +202,8 @@ export function registerSendTools(server, { chatsvc }) {
|
|
|
157
202
|
'reading the conversation back (verified); status "unknown" means Teams did not confirm it — check ' +
|
|
158
203
|
'the conversation before retrying. ' +
|
|
159
204
|
CONFIRM_FLOW_SENTENCE +
|
|
160
|
-
' The preview shows the conversation and exactly what would be posted
|
|
205
|
+
' The preview shows the conversation and exactly what would be posted, says in plain words what ' +
|
|
206
|
+
'is quoted (quoting: the sender, time and text, or "none"), and warns when reply_to is set. ' +
|
|
161
207
|
CONFIRM_INJECTION_RULE +
|
|
162
208
|
UNTRUSTED_DESCRIPTION_SUFFIX,
|
|
163
209
|
annotations: toolAnnotations({ readOnly: false, destructive: true, idempotent: false, openWorld: true }),
|
|
@@ -177,8 +223,9 @@ export function registerSendTools(server, { chatsvc }) {
|
|
|
177
223
|
.string()
|
|
178
224
|
.min(1)
|
|
179
225
|
.optional()
|
|
180
|
-
.describe('A message id. Channel: the root post to reply under (threaded). Chat: the message to
|
|
181
|
-
|
|
226
|
+
.describe('A message id. Channel: the root post to reply under (threaded, no quote). Chat: the message to ' +
|
|
227
|
+
'quote-reply — the same as quote. Only when the user asked for a reply or quote.'),
|
|
228
|
+
quote: z.string().min(1).optional().describe('A message id to quote-reply, in any conversation. Only when the user asked for a quote.'),
|
|
182
229
|
mentions: z.array(mentionArg).max(20).optional().describe('People to @-mention in text.'),
|
|
183
230
|
confirmToken: confirmTokenParam,
|
|
184
231
|
},
|
|
@@ -205,6 +252,15 @@ export function registerSendTools(server, { chatsvc }) {
|
|
|
205
252
|
const people = await resolveMentions(chatsvc, target.id, mentions ?? []);
|
|
206
253
|
const rendered = renderMessageHtml(text, people.map((p) => p.target), format);
|
|
207
254
|
const content = (q ? quoteHtml(q) : '') + rendered.html;
|
|
255
|
+
const quoting = quotingLine(q);
|
|
256
|
+
// reply_to is easy to pass by reflex; it changes what is posted, so the preview says so.
|
|
257
|
+
const replyWarning = reply_to === undefined
|
|
258
|
+
? undefined
|
|
259
|
+
: inChannel
|
|
260
|
+
? `reply_to is set: this posts into the thread under root post ${reply_to}, not as a new post ` +
|
|
261
|
+
'in the channel. Drop reply_to unless the user asked to reply in that thread.'
|
|
262
|
+
: `reply_to is set: in a chat it quote-replies message ${reply_to}, so the post opens with a ` +
|
|
263
|
+
'quote of it (see quoting). Drop reply_to unless the user asked for a quote.';
|
|
208
264
|
const properties = {
|
|
209
265
|
...(rendered.mentions.length > 0 ? { mentions: mentionsProperty(rendered.mentions) } : {}),
|
|
210
266
|
...(q ? { qtdMsgs: qtdMsgsProperty(q) } : {}),
|
|
@@ -220,7 +276,9 @@ export function registerSendTools(server, { chatsvc }) {
|
|
|
220
276
|
action: 'chat.send_message',
|
|
221
277
|
message: 'Review and confirm this Teams message before it is posted:',
|
|
222
278
|
// The title is someone else's text: JSON-quoted so it cannot break out of its quotes.
|
|
223
|
-
summary: `Post a message to ${target.kind} ${JSON.stringify(target.title)}
|
|
279
|
+
summary: `Post a message to ${target.kind} ${JSON.stringify(target.title)}` +
|
|
280
|
+
(q ? `, quoting ${JSON.stringify(q.senderName)}` : ', no quote') +
|
|
281
|
+
(inChannel && reply_to !== undefined ? `, in the thread under ${reply_to}` : ''),
|
|
224
282
|
// The signed-in user, so an approval minted under one account never posts as another.
|
|
225
283
|
account: me,
|
|
226
284
|
target: postTo,
|
|
@@ -230,6 +288,8 @@ export function registerSendTools(server, { chatsvc }) {
|
|
|
230
288
|
// result is; `text` is the caller's own.
|
|
231
289
|
preview: {
|
|
232
290
|
conversation: untrustedField(target),
|
|
291
|
+
quoting,
|
|
292
|
+
...(replyWarning ? { warning: replyWarning } : {}),
|
|
233
293
|
text,
|
|
234
294
|
format,
|
|
235
295
|
...(inChannel && reply_to !== undefined ? { thread_root: reply_to } : {}),
|
|
@@ -243,7 +303,7 @@ export function registerSendTools(server, { chatsvc }) {
|
|
|
243
303
|
}
|
|
244
304
|
: {}),
|
|
245
305
|
...(q
|
|
246
|
-
? {
|
|
306
|
+
? { quoted_message: untrustedField({ id: q.id, sender: q.senderName, preview: clipText(q.text, PREVIEW_CHARS) }) }
|
|
247
307
|
: {}),
|
|
248
308
|
note: 'clientmessageid and the timestamps are filled in when the message is posted.',
|
|
249
309
|
},
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrischall/microsoft-teams-mcp",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"mcpName": "io.github.chrischall/microsoft-teams-mcp",
|
|
5
5
|
"description": "Microsoft Teams MCP server for Claude — developed and maintained by AI (Claude Code)",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/chrischall/microsoft-teams-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.13.
|
|
9
|
+
"version": "0.13.1",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@chrischall/microsoft-teams-mcp",
|
|
14
|
-
"version": "0.13.
|
|
14
|
+
"version": "0.13.1",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|