Skip to content

Commit bcc2937

Browse files
committed
refactor(code): remove unused get_message_quota tool
1 parent 65dcfee commit bcc2937

File tree

4 files changed

+14
-158
lines changed

4 files changed

+14
-158
lines changed

README.ja.md

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ LINE公式アカウントとAI Agentを接続するために、LINE Messaging AP
4141
- LINE公式アカウントのメッセージ容量と消費量を取得します。月間メッセージ制限と現在の使用量が表示されます。
4242
- **入力:**
4343
- なし
44-
- **Inputs:**
45-
- `user_id` (string?): プロフィールを取得したいユーザーのユーザーID。デフォルトはDESTINATION_USER_ID。
4644
7. **get_follower_ids**
4745
- LINE公式アカウントを友だち追加したユーザーのユーザーID一覧を取得します。
4846
- **入力:**
@@ -62,34 +60,10 @@ LINE公式アカウントとAI Agentを接続するために、LINE Messaging AP
6260

6361
- Node.js v20 以上
6462

65-
このリポジトリをクローンします:
66-
67-
```bash
68-
git clone [email protected]:line/line-bot-mcp-server.git
69-
```
70-
71-
Node.jsを利用する場合は、必要な依存関係をインストールし、line-bot-mcp-serverをビルドします。Dockerを利用する場合は不要です:
72-
73-
```bash
74-
cd line-bot-mcp-server && npm install && npm run build
75-
```
76-
7763
### Step 1: LINE公式アカウントを作成
7864

7965
このMCP ServerはLINE公式アカウントを利用しています。公式アカウントをお持ちでない場合は、[こちらの手順](https://developers.line.biz/ja/docs/messaging-api/getting-started/#create-oa)に従って作成してください。
8066

81-
このリポジトリをクローンします:
82-
83-
```
84-
git clone [email protected]:line/line-bot-mcp-server.git
85-
```
86-
87-
Node.jsを利用する場合は、必要な依存関係をインストールし、line-bot-mcp-serverをビルドします。Dockerを利用する場合は不要です。:
88-
89-
```
90-
cd line-bot-mcp-server && npm install && npm run build
91-
```
92-
9367
### Step 2: AI Agentを設定
9468

9569
Claude DesktopやClaudeなどのAI Agentに次の設定を追加してください。
@@ -120,16 +94,6 @@ Claude DesktopやClaudeなどのAI Agentに次の設定を追加してくださ
12094

12195
### Step 1: LINE公式アカウントを作成
12296

123-
<<<<<<< HEAD
124-
<<<<<<< HEAD
125-
=======
126-
127-
<<<<<<< HEAD
128-
=======
129-
>>>>>>>
130-
>>>>>>> f993e43 (✨ Add get_follower_ids tool to retrieve user IDs of followers for LINE Official Account)
131-
=======
132-
>>>>>>> 55dfde6 (📝 Update README.ja.md to remove redundant information and clarify get_follower_ids tool details.)
13397
このMCP ServerはLINE公式アカウントを利用しています。公式アカウントをお持ちでない場合は、[こちらの手順](https://developers.line.biz/ja/docs/messaging-api/getting-started/#create-oa)に従って作成してください。
13498

13599
LINE公式アカウントをお持ちであれば、[こちらの手順](https://developers.line.biz/ja/docs/messaging-api/getting-started/#using-oa-manager)に従ってMessaging APIを有効にしてください。
@@ -138,35 +102,12 @@ LINE公式アカウントをお持ちであれば、[こちらの手順](https:/
138102

139103
このリポジトリをクローンします:
140104

141-
<<<<<<< HEAD
142-
143105
```
144106
git clone [email protected]:line/line-bot-mcp-server.git
145107
```
146108

147-
Dockerイメージをビルドします
148-
=======
149-
150-
まずDockerイメージをビルドします:
151-
152-
=======
153-
154-
```bash
155-
git clone [email protected]:line/line-bot-mcp-server.git
156-
```
157-
158109
Dockerイメージをビルドします:
159110

160-
<<<<<<< HEAD
161-
```bash
162-
docker build -t line/line-bot-mcp-server .
163-
```
164-
165-
>>>>>>> 49f51e6 (✨ Add get_follower_ids tool to retrieve user IDs of followers for LINE Official Account)
166-
>>>>>>> f993e43 (✨ Add get_follower_ids tool to retrieve user IDs of followers for LINE Official Account)
167-
168-
=======
169-
>>>>>>> 55dfde6 (📝 Update README.ja.md to remove redundant information and clarify get_follower_ids tool details.)
170111
```
171112
docker build -t line/line-bot-mcp-server .
172113
```

README.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,12 @@
5656
- Only available for verified or premium accounts.
5757
- Some user IDs may not be included due to privacy or user actions (see [documents](https://developers.line.biz/en/reference/messaging-api/#get-follower-ids-obtainable-ids) for details).
5858

59-
## Installation
60-
61-
### Step 1: Install line-bot-mcp-server
59+
## Installation (Using npx)
6260

6361
requirements:
6462

6563
- Node.js v20 or later
6664

67-
Clone this repository:
68-
69-
```bash
70-
git clone [email protected]:line/line-bot-mcp-server.git
71-
```
72-
73-
If you're using Node.js, install required dependencies and build line-bot-mcp-server. Skip this step if using Docker:
74-
75-
```bash
76-
cd line-bot-mcp-server && npm install && npm run build
77-
```
78-
7965
### Step 1: Create LINE Official Account
8066

8167
This MCP server utilizes a LINE Official Account. If you do not have one, please create it by following [this instructions](https://developers.line.biz/en/docs/messaging-api/getting-started/#create-oa).
@@ -124,7 +110,7 @@ Clone this repository:
124110
git clone [email protected]:line/line-bot-mcp-server.git
125111
```
126112

127-
Build the Docker image first:
113+
Build the Docker image:
128114

129115
```
130116
docker build -t line/line-bot-mcp-server .

package-lock.json

Lines changed: 6 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 6 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ const flexMessageSchema = z.object({
9696
.passthrough()
9797
.describe(
9898
"Flexible container structure following LINE Flex Message format. For 'bubble' type, can include header, " +
99-
"hero, body, footer, and styles sections. For 'carousel' type, includes an array of bubble containers in " +
100-
"the 'contents' property.",
99+
"hero, body, footer, and styles sections. For 'carousel' type, includes an array of bubble containers in " +
100+
"the 'contents' property.",
101101
),
102102
});
103103

@@ -128,7 +128,7 @@ server.tool(
128128
server.tool(
129129
"push_flex_message",
130130
"Push a highly customizable flex message to a user via LINE. Supports both bubble (single container) and carousel " +
131-
"(multiple swipeable bubbles) layouts.",
131+
"(multiple swipeable bubbles) layouts.",
132132
{
133133
userId: userIdSchema,
134134
message: flexMessageSchema,
@@ -155,7 +155,7 @@ server.tool(
155155
server.tool(
156156
"broadcast_text_message",
157157
"Broadcast a simple text message via LINE to all users who have followed your LINE Official Account. Use this for sending " +
158-
"plain text messages without formatting. Please be aware that this message will be sent to all users.",
158+
"plain text messages without formatting. Please be aware that this message will be sent to all users.",
159159
{
160160
message: textMessageSchema,
161161
},
@@ -176,8 +176,8 @@ server.tool(
176176
server.tool(
177177
"broadcast_flex_message",
178178
"Broadcast a highly customizable flex message via LINE to all users who have added your LINE Official Account. " +
179-
"Supports both bubble (single container) and carousel (multiple swipeable bubbles) layouts. Please be aware that " +
180-
"this message will be sent to all users.",
179+
"Supports both bubble (single container) and carousel (multiple swipeable bubbles) layouts. Please be aware that " +
180+
"this message will be sent to all users.",
181181
{
182182
message: flexMessageSchema,
183183
},
@@ -228,67 +228,6 @@ server.tool(
228228
totalUsage: messageQuotaConsumptionResponse.totalUsage,
229229
};
230230
return createSuccessResponse(response);
231-
}
232-
);
233-
234-
server.tool(
235-
"get_follower_ids",
236-
"Gets the list of User IDs of users who have added your LINE Official Account as a friend.",
237-
{
238-
start: z
239-
.string()
240-
.optional()
241-
.describe(
242-
"Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs. If omitted, fetches from the beginning.",
243-
),
244-
limit: z
245-
.int()
246-
.min(1)
247-
.max(1000)
248-
.default(300)
249-
.describe(
250-
"Maximum number of user IDs to retrieve (1-1000). Default is 300.",
251-
),
252-
},
253-
async ({ start, limit }) => {
254-
try {
255-
const params = new URLSearchParams();
256-
if (limit) params.append("limit", limit.toString());
257-
if (start) params.append("start", start);
258-
const res = await axios.get("https://api.line.me/v2/bot/followers/ids", {
259-
params,
260-
headers: {
261-
Authorization: `Bearer ${channelAccessToken}`,
262-
},
263-
});
264-
return createSuccessResponse(res.data);
265-
} catch (error) {
266-
return createErrorResponse(
267-
`Failed to get follower ids: ${error.message}`,
268-
);
269-
}
270-
},
271-
);
272-
273-
server.tool(
274-
"get_message_quota",
275-
"Get the message quota and consumption of the LINE Official Account. This shows the monthly message limit and current usage.",
276-
{},
277-
async () => {
278-
try {
279-
const messageQuotaResponse = await messagingApiClient.getMessageQuota();
280-
const messageQuotaConsumptionResponse =
281-
await messagingApiClient.getMessageQuotaConsumption();
282-
const response = {
283-
limited: messageQuotaResponse.value,
284-
totalUsage: messageQuotaConsumptionResponse.totalUsage,
285-
};
286-
return createSuccessResponse(response);
287-
} catch (error) {
288-
return createErrorResponse(
289-
`Failed to get message quota: ${error.message}`,
290-
);
291-
}
292231
},
293232
);
294233

0 commit comments

Comments
 (0)