@line-harness/mcp-server 0.6.0 → 0.6.2
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/dist/index.js +10 -2
- package/package.json +2 -2
- package/src/tools/broadcast.ts +7 -0
- package/src/tools/send-message.ts +8 -1
package/dist/index.js
CHANGED
|
@@ -119,9 +119,12 @@ function registerSendMessage(server2) {
|
|
|
119
119
|
),
|
|
120
120
|
messageType: z.enum(["text", "flex"]).default("text").describe(
|
|
121
121
|
"Message type: 'text' for plain text, 'flex' for Flex Message JSON"
|
|
122
|
+
),
|
|
123
|
+
altText: z.string().optional().describe(
|
|
124
|
+
"Custom notification preview text for Flex Messages (shown on lock screen). If omitted, auto-extracted from Flex content."
|
|
122
125
|
)
|
|
123
126
|
},
|
|
124
|
-
async ({ friendId, content, messageType }) => {
|
|
127
|
+
async ({ friendId, content, messageType, altText }) => {
|
|
125
128
|
try {
|
|
126
129
|
const client = getClient();
|
|
127
130
|
const { content: trackedContent } = await autoTrackUrls(
|
|
@@ -133,7 +136,8 @@ function registerSendMessage(server2) {
|
|
|
133
136
|
const result = await client.friends.sendMessage(
|
|
134
137
|
friendId,
|
|
135
138
|
trackedContent,
|
|
136
|
-
messageType
|
|
139
|
+
messageType,
|
|
140
|
+
altText
|
|
137
141
|
);
|
|
138
142
|
return {
|
|
139
143
|
content: [
|
|
@@ -186,6 +190,9 @@ function registerBroadcast(server2) {
|
|
|
186
190
|
"JSON string of segment conditions when targetType is 'segment'. Format: { operator: 'AND'|'OR', rules: [{ type: 'tag_exists'|'tag_not_exists'|'metadata_equals'|'metadata_not_equals'|'ref_code'|'is_following', value: string|boolean|{key,value} }] }"
|
|
187
191
|
),
|
|
188
192
|
scheduledAt: z2.string().optional().describe("ISO 8601 datetime to schedule. Omit to send immediately."),
|
|
193
|
+
altText: z2.string().optional().describe(
|
|
194
|
+
"Custom notification preview text for Flex Messages (shown on lock screen). If omitted, auto-extracted from Flex content."
|
|
195
|
+
),
|
|
189
196
|
accountId: z2.string().optional().describe("LINE account ID (uses default if omitted)")
|
|
190
197
|
},
|
|
191
198
|
async ({
|
|
@@ -196,6 +203,7 @@ function registerBroadcast(server2) {
|
|
|
196
203
|
targetTagId,
|
|
197
204
|
segmentConditions,
|
|
198
205
|
scheduledAt,
|
|
206
|
+
altText,
|
|
199
207
|
accountId
|
|
200
208
|
}) => {
|
|
201
209
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@line-harness/mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"line-harness-mcp": "./dist/index.js"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dev": "tsup --watch"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@line-harness/sdk": "^0.
|
|
14
|
+
"@line-harness/sdk": "^0.2.2",
|
|
15
15
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
16
16
|
"zod": "^3.24.4"
|
|
17
17
|
},
|
package/src/tools/broadcast.ts
CHANGED
|
@@ -37,6 +37,12 @@ export function registerBroadcast(server: McpServer): void {
|
|
|
37
37
|
.string()
|
|
38
38
|
.optional()
|
|
39
39
|
.describe("ISO 8601 datetime to schedule. Omit to send immediately."),
|
|
40
|
+
altText: z
|
|
41
|
+
.string()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe(
|
|
44
|
+
"Custom notification preview text for Flex Messages (shown on lock screen). If omitted, auto-extracted from Flex content.",
|
|
45
|
+
),
|
|
40
46
|
accountId: z
|
|
41
47
|
.string()
|
|
42
48
|
.optional()
|
|
@@ -50,6 +56,7 @@ export function registerBroadcast(server: McpServer): void {
|
|
|
50
56
|
targetTagId,
|
|
51
57
|
segmentConditions,
|
|
52
58
|
scheduledAt,
|
|
59
|
+
altText,
|
|
53
60
|
accountId,
|
|
54
61
|
}) => {
|
|
55
62
|
try {
|
|
@@ -20,8 +20,14 @@ export function registerSendMessage(server: McpServer): void {
|
|
|
20
20
|
.describe(
|
|
21
21
|
"Message type: 'text' for plain text, 'flex' for Flex Message JSON",
|
|
22
22
|
),
|
|
23
|
+
altText: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe(
|
|
27
|
+
"Custom notification preview text for Flex Messages (shown on lock screen). If omitted, auto-extracted from Flex content.",
|
|
28
|
+
),
|
|
23
29
|
},
|
|
24
|
-
async ({ friendId, content, messageType }) => {
|
|
30
|
+
async ({ friendId, content, messageType, altText }) => {
|
|
25
31
|
try {
|
|
26
32
|
const client = getClient();
|
|
27
33
|
|
|
@@ -37,6 +43,7 @@ export function registerSendMessage(server: McpServer): void {
|
|
|
37
43
|
friendId,
|
|
38
44
|
trackedContent,
|
|
39
45
|
messageType,
|
|
46
|
+
altText,
|
|
40
47
|
);
|
|
41
48
|
return {
|
|
42
49
|
content: [
|