@line-harness/mcp-server 0.7.1 → 0.7.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 +5 -2
- package/package.json +2 -2
- package/src/tools/list-friends.ts +8 -2
package/dist/index.js
CHANGED
|
@@ -798,20 +798,23 @@ import { z as z9 } from "zod";
|
|
|
798
798
|
function registerListFriends(server2) {
|
|
799
799
|
server2.tool(
|
|
800
800
|
"list_friends",
|
|
801
|
-
"List friends with optional filtering by tag or
|
|
801
|
+
"List friends with optional filtering by tag, name search, or metadata values. Returns paginated results with friend details.",
|
|
802
802
|
{
|
|
803
803
|
search: z9.string().optional().describe("Search friends by display name (partial match)"),
|
|
804
804
|
tagId: z9.string().optional().describe("Filter by tag ID"),
|
|
805
|
+
metadataFilter: z9.string().optional().describe(`JSON string of metadata filters. e.g. '{"monthly_cost": "\u301C100\u4E07\u5186", "business_type": "EC\u30FB\u7269\u8CA9"}'`),
|
|
805
806
|
limit: z9.number().default(20).describe("Number of friends to return (max 100)"),
|
|
806
807
|
offset: z9.number().default(0).describe("Offset for pagination"),
|
|
807
808
|
accountId: z9.string().optional().describe("LINE account ID (uses default if omitted)")
|
|
808
809
|
},
|
|
809
|
-
async ({ search, tagId, limit, offset, accountId }) => {
|
|
810
|
+
async ({ search, tagId, metadataFilter, limit, offset, accountId }) => {
|
|
810
811
|
try {
|
|
811
812
|
const client = getClient();
|
|
813
|
+
const metadata = metadataFilter ? JSON.parse(metadataFilter) : void 0;
|
|
812
814
|
const result = await client.friends.list({
|
|
813
815
|
search,
|
|
814
816
|
tagId,
|
|
817
|
+
metadata,
|
|
815
818
|
limit,
|
|
816
819
|
offset,
|
|
817
820
|
accountId
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@line-harness/mcp-server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"line-harness-mcp": "./dist/index.js"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
11
11
|
"zod": "^3.24.4",
|
|
12
|
-
"@line-harness/sdk": "0.2.
|
|
12
|
+
"@line-harness/sdk": "0.2.6"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"tsup": "^8.4.0",
|
|
@@ -5,10 +5,14 @@ import { getClient } from "../client.js";
|
|
|
5
5
|
export function registerListFriends(server: McpServer): void {
|
|
6
6
|
server.tool(
|
|
7
7
|
"list_friends",
|
|
8
|
-
"List friends with optional filtering by tag or
|
|
8
|
+
"List friends with optional filtering by tag, name search, or metadata values. Returns paginated results with friend details.",
|
|
9
9
|
{
|
|
10
10
|
search: z.string().optional().describe("Search friends by display name (partial match)"),
|
|
11
11
|
tagId: z.string().optional().describe("Filter by tag ID"),
|
|
12
|
+
metadataFilter: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe("JSON string of metadata filters. e.g. '{\"monthly_cost\": \"〜100万円\", \"business_type\": \"EC・物販\"}'"),
|
|
12
16
|
limit: z
|
|
13
17
|
.number()
|
|
14
18
|
.default(20)
|
|
@@ -19,12 +23,14 @@ export function registerListFriends(server: McpServer): void {
|
|
|
19
23
|
.optional()
|
|
20
24
|
.describe("LINE account ID (uses default if omitted)"),
|
|
21
25
|
},
|
|
22
|
-
async ({ search, tagId, limit, offset, accountId }) => {
|
|
26
|
+
async ({ search, tagId, metadataFilter, limit, offset, accountId }) => {
|
|
23
27
|
try {
|
|
24
28
|
const client = getClient();
|
|
29
|
+
const metadata = metadataFilter ? JSON.parse(metadataFilter) as Record<string, string> : undefined;
|
|
25
30
|
const result = await client.friends.list({
|
|
26
31
|
search,
|
|
27
32
|
tagId,
|
|
33
|
+
metadata,
|
|
28
34
|
limit,
|
|
29
35
|
offset,
|
|
30
36
|
accountId,
|