@hasna/conversations 0.1.19 → 0.1.20
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/bin/index.js +87 -15
- package/bin/mcp.js +87 -15
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -3503,7 +3503,7 @@ var init_poll = __esm(() => {
|
|
|
3503
3503
|
var require_package = __commonJS((exports, module) => {
|
|
3504
3504
|
module.exports = {
|
|
3505
3505
|
name: "@hasna/conversations",
|
|
3506
|
-
version: "0.1.
|
|
3506
|
+
version: "0.1.20",
|
|
3507
3507
|
description: "Real-time CLI messaging for AI agents",
|
|
3508
3508
|
type: "module",
|
|
3509
3509
|
bin: {
|
|
@@ -32519,7 +32519,7 @@ var init_mcp2 = __esm(() => {
|
|
|
32519
32519
|
});
|
|
32520
32520
|
server.registerTool("read_messages", {
|
|
32521
32521
|
title: "Read Messages",
|
|
32522
|
-
description: "Read messages with
|
|
32522
|
+
description: "Read messages with filters, newest first.",
|
|
32523
32523
|
inputSchema: {
|
|
32524
32524
|
session_id: exports_external.string().optional().describe("Filter by session ID"),
|
|
32525
32525
|
from: exports_external.string().optional().describe("Filter by sender"),
|
|
@@ -32537,7 +32537,7 @@ var init_mcp2 = __esm(() => {
|
|
|
32537
32537
|
});
|
|
32538
32538
|
server.registerTool("list_sessions", {
|
|
32539
32539
|
title: "List Sessions",
|
|
32540
|
-
description: "List
|
|
32540
|
+
description: "List sessions, optionally filtered by agent.",
|
|
32541
32541
|
inputSchema: {
|
|
32542
32542
|
agent: exports_external.string().optional().describe("Filter sessions involving this agent")
|
|
32543
32543
|
}
|
|
@@ -32549,7 +32549,7 @@ var init_mcp2 = __esm(() => {
|
|
|
32549
32549
|
});
|
|
32550
32550
|
server.registerTool("reply", {
|
|
32551
32551
|
title: "Reply to Message",
|
|
32552
|
-
description: "Reply to a message
|
|
32552
|
+
description: "Reply to a message (same session, original sender).",
|
|
32553
32553
|
inputSchema: {
|
|
32554
32554
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
32555
32555
|
message_id: exports_external.number().describe("ID of the message to reply to"),
|
|
@@ -32639,7 +32639,7 @@ var init_mcp2 = __esm(() => {
|
|
|
32639
32639
|
});
|
|
32640
32640
|
server.registerTool("create_space", {
|
|
32641
32641
|
title: "Create Space",
|
|
32642
|
-
description: "Create a
|
|
32642
|
+
description: "Create a space. Auto-joined. Supports nesting and projects.",
|
|
32643
32643
|
inputSchema: {
|
|
32644
32644
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
32645
32645
|
name: exports_external.string().describe("Space name"),
|
|
@@ -32669,7 +32669,7 @@ var init_mcp2 = __esm(() => {
|
|
|
32669
32669
|
});
|
|
32670
32670
|
server.registerTool("list_spaces", {
|
|
32671
32671
|
title: "List Spaces",
|
|
32672
|
-
description: "List spaces with member/message counts.
|
|
32672
|
+
description: "List spaces with member/message counts.",
|
|
32673
32673
|
inputSchema: {
|
|
32674
32674
|
project_id: exports_external.string().optional().describe("Filter by project ID"),
|
|
32675
32675
|
parent_id: exports_external.string().optional().describe("Filter by parent space. Use 'null' for top-level only."),
|
|
@@ -32840,7 +32840,7 @@ var init_mcp2 = __esm(() => {
|
|
|
32840
32840
|
});
|
|
32841
32841
|
server.registerTool("create_project", {
|
|
32842
32842
|
title: "Create Project",
|
|
32843
|
-
description: "Create a
|
|
32843
|
+
description: "Create a project for spaces and agent collaboration.",
|
|
32844
32844
|
inputSchema: {
|
|
32845
32845
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
32846
32846
|
name: exports_external.string().describe("Project name (unique)"),
|
|
@@ -33041,7 +33041,7 @@ var init_mcp2 = __esm(() => {
|
|
|
33041
33041
|
});
|
|
33042
33042
|
server.registerTool("delete_message", {
|
|
33043
33043
|
title: "Delete Message",
|
|
33044
|
-
description: "Delete a message.
|
|
33044
|
+
description: "Delete a message. Sender only.",
|
|
33045
33045
|
inputSchema: {
|
|
33046
33046
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
33047
33047
|
id: exports_external.number().describe("Message ID to delete")
|
|
@@ -33061,7 +33061,7 @@ var init_mcp2 = __esm(() => {
|
|
|
33061
33061
|
});
|
|
33062
33062
|
server.registerTool("edit_message", {
|
|
33063
33063
|
title: "Edit Message",
|
|
33064
|
-
description: "Edit a message's content.
|
|
33064
|
+
description: "Edit a message's content. Sender only.",
|
|
33065
33065
|
inputSchema: {
|
|
33066
33066
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
33067
33067
|
id: exports_external.number().describe("Message ID to edit"),
|
|
@@ -33082,7 +33082,7 @@ var init_mcp2 = __esm(() => {
|
|
|
33082
33082
|
});
|
|
33083
33083
|
server.registerTool("pin_message", {
|
|
33084
33084
|
title: "Pin Message",
|
|
33085
|
-
description: "Pin a message
|
|
33085
|
+
description: "Pin a message in a space or session.",
|
|
33086
33086
|
inputSchema: {
|
|
33087
33087
|
id: exports_external.number().describe("Message ID to pin")
|
|
33088
33088
|
}
|
|
@@ -33118,7 +33118,7 @@ var init_mcp2 = __esm(() => {
|
|
|
33118
33118
|
});
|
|
33119
33119
|
server.registerTool("get_pinned_messages", {
|
|
33120
33120
|
title: "Get Pinned Messages",
|
|
33121
|
-
description: "
|
|
33121
|
+
description: "Get pinned messages, filtered by space or session.",
|
|
33122
33122
|
inputSchema: {
|
|
33123
33123
|
space: exports_external.string().optional().describe("Filter by space"),
|
|
33124
33124
|
session_id: exports_external.string().optional().describe("Filter by session ID"),
|
|
@@ -33132,7 +33132,7 @@ var init_mcp2 = __esm(() => {
|
|
|
33132
33132
|
});
|
|
33133
33133
|
server.registerTool("heartbeat", {
|
|
33134
33134
|
title: "Heartbeat",
|
|
33135
|
-
description: "Send
|
|
33135
|
+
description: "Send heartbeat. Optionally set agent status.",
|
|
33136
33136
|
inputSchema: {
|
|
33137
33137
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
33138
33138
|
status: exports_external.string().optional().describe("Agent status (e.g. 'online', 'busy', 'idle'). Defaults to 'online'.")
|
|
@@ -33146,7 +33146,7 @@ var init_mcp2 = __esm(() => {
|
|
|
33146
33146
|
});
|
|
33147
33147
|
server.registerTool("list_agents", {
|
|
33148
33148
|
title: "List Agents",
|
|
33149
|
-
description: "List agents with presence status
|
|
33149
|
+
description: "List agents with presence status.",
|
|
33150
33150
|
inputSchema: {
|
|
33151
33151
|
online_only: exports_external.boolean().optional().describe("Only return agents online within last 60s")
|
|
33152
33152
|
}
|
|
@@ -33158,7 +33158,7 @@ var init_mcp2 = __esm(() => {
|
|
|
33158
33158
|
});
|
|
33159
33159
|
server.registerTool("get_blockers", {
|
|
33160
33160
|
title: "Get Blockers",
|
|
33161
|
-
description: "Check for unread blocking messages
|
|
33161
|
+
description: "Check for unread blocking messages. Must acknowledge.",
|
|
33162
33162
|
inputSchema: {
|
|
33163
33163
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var.")
|
|
33164
33164
|
}
|
|
@@ -33192,7 +33192,7 @@ var init_mcp2 = __esm(() => {
|
|
|
33192
33192
|
});
|
|
33193
33193
|
server.registerTool("rename_agent", {
|
|
33194
33194
|
title: "Rename Agent",
|
|
33195
|
-
description: "Rename an agent in the presence list.
|
|
33195
|
+
description: "Rename an agent in the presence list.",
|
|
33196
33196
|
inputSchema: {
|
|
33197
33197
|
from: exports_external.string().optional().describe("Your current agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
33198
33198
|
new_name: exports_external.string().describe("The new name for the agent")
|
|
@@ -33224,6 +33224,78 @@ var init_mcp2 = __esm(() => {
|
|
|
33224
33224
|
};
|
|
33225
33225
|
}
|
|
33226
33226
|
});
|
|
33227
|
+
server.registerTool("search_tools", {
|
|
33228
|
+
title: "Search Tools",
|
|
33229
|
+
description: "List tool names, optionally filtered by keyword.",
|
|
33230
|
+
inputSchema: {
|
|
33231
|
+
query: exports_external.string().optional().describe("Keyword filter")
|
|
33232
|
+
}
|
|
33233
|
+
}, async ({ query }) => {
|
|
33234
|
+
const all = [
|
|
33235
|
+
"send_message",
|
|
33236
|
+
"read_messages",
|
|
33237
|
+
"list_sessions",
|
|
33238
|
+
"reply",
|
|
33239
|
+
"mark_read",
|
|
33240
|
+
"search_messages",
|
|
33241
|
+
"export_messages",
|
|
33242
|
+
"create_space",
|
|
33243
|
+
"list_spaces",
|
|
33244
|
+
"send_to_space",
|
|
33245
|
+
"read_space",
|
|
33246
|
+
"join_space",
|
|
33247
|
+
"leave_space",
|
|
33248
|
+
"update_space",
|
|
33249
|
+
"archive_space",
|
|
33250
|
+
"unarchive_space",
|
|
33251
|
+
"create_project",
|
|
33252
|
+
"list_projects",
|
|
33253
|
+
"get_project",
|
|
33254
|
+
"update_project",
|
|
33255
|
+
"delete_project",
|
|
33256
|
+
"delete_message",
|
|
33257
|
+
"edit_message",
|
|
33258
|
+
"pin_message",
|
|
33259
|
+
"unpin_message",
|
|
33260
|
+
"get_pinned_messages",
|
|
33261
|
+
"heartbeat",
|
|
33262
|
+
"list_agents",
|
|
33263
|
+
"get_blockers",
|
|
33264
|
+
"remove_agent",
|
|
33265
|
+
"rename_agent",
|
|
33266
|
+
"search_tools",
|
|
33267
|
+
"describe_tools"
|
|
33268
|
+
];
|
|
33269
|
+
const q = query?.toLowerCase();
|
|
33270
|
+
const matches = q ? all.filter((n) => n.includes(q)) : all;
|
|
33271
|
+
return { content: [{ type: "text", text: matches.join(", ") }] };
|
|
33272
|
+
});
|
|
33273
|
+
server.registerTool("describe_tools", {
|
|
33274
|
+
title: "Describe Tools",
|
|
33275
|
+
description: "Get descriptions for specific tools by name.",
|
|
33276
|
+
inputSchema: {
|
|
33277
|
+
names: exports_external.array(exports_external.string()).describe("Tool names from search_tools")
|
|
33278
|
+
}
|
|
33279
|
+
}, async ({ names }) => {
|
|
33280
|
+
const descriptions = {
|
|
33281
|
+
send_message: "Send DM to agent. Params: to, content, from?, priority?",
|
|
33282
|
+
read_messages: "Read messages. Params: space?, from?, to?, unread_only?, limit?",
|
|
33283
|
+
list_sessions: "List sessions. Params: agent?",
|
|
33284
|
+
reply: "Reply to message. Params: id, content, from?",
|
|
33285
|
+
send_to_space: "Send message to space. Params: space, content, from?",
|
|
33286
|
+
read_space: "Read space messages. Params: space, limit?, since?",
|
|
33287
|
+
join_space: "Join a space. Params: space, from?",
|
|
33288
|
+
create_space: "Create space. Params: name, description?, parent_id?",
|
|
33289
|
+
list_spaces: "List spaces with counts. No required params.",
|
|
33290
|
+
heartbeat: "Send heartbeat. Params: from?, status?",
|
|
33291
|
+
list_agents: "List agents with presence. No required params.",
|
|
33292
|
+
get_blockers: "Check for blocking messages. Params: name?",
|
|
33293
|
+
search_messages: "Search messages. Params: query, space?, limit?"
|
|
33294
|
+
};
|
|
33295
|
+
const result = names.map((n) => `${n}: ${descriptions[n] || "See tool schema"}`).join(`
|
|
33296
|
+
`);
|
|
33297
|
+
return { content: [{ type: "text", text: result }] };
|
|
33298
|
+
});
|
|
33227
33299
|
isDirectRun = import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith("mcp.js") || process.argv[1]?.endsWith("mcp.ts");
|
|
33228
33300
|
if (isDirectRun) {
|
|
33229
33301
|
startMcpServer().catch((error48) => {
|
package/bin/mcp.js
CHANGED
|
@@ -29777,7 +29777,7 @@ function renameAgent(oldName, newName) {
|
|
|
29777
29777
|
// package.json
|
|
29778
29778
|
var package_default = {
|
|
29779
29779
|
name: "@hasna/conversations",
|
|
29780
|
-
version: "0.1.
|
|
29780
|
+
version: "0.1.20",
|
|
29781
29781
|
description: "Real-time CLI messaging for AI agents",
|
|
29782
29782
|
type: "module",
|
|
29783
29783
|
bin: {
|
|
@@ -29905,7 +29905,7 @@ server.registerTool("send_message", {
|
|
|
29905
29905
|
});
|
|
29906
29906
|
server.registerTool("read_messages", {
|
|
29907
29907
|
title: "Read Messages",
|
|
29908
|
-
description: "Read messages with
|
|
29908
|
+
description: "Read messages with filters, newest first.",
|
|
29909
29909
|
inputSchema: {
|
|
29910
29910
|
session_id: exports_external.string().optional().describe("Filter by session ID"),
|
|
29911
29911
|
from: exports_external.string().optional().describe("Filter by sender"),
|
|
@@ -29923,7 +29923,7 @@ server.registerTool("read_messages", {
|
|
|
29923
29923
|
});
|
|
29924
29924
|
server.registerTool("list_sessions", {
|
|
29925
29925
|
title: "List Sessions",
|
|
29926
|
-
description: "List
|
|
29926
|
+
description: "List sessions, optionally filtered by agent.",
|
|
29927
29927
|
inputSchema: {
|
|
29928
29928
|
agent: exports_external.string().optional().describe("Filter sessions involving this agent")
|
|
29929
29929
|
}
|
|
@@ -29935,7 +29935,7 @@ server.registerTool("list_sessions", {
|
|
|
29935
29935
|
});
|
|
29936
29936
|
server.registerTool("reply", {
|
|
29937
29937
|
title: "Reply to Message",
|
|
29938
|
-
description: "Reply to a message
|
|
29938
|
+
description: "Reply to a message (same session, original sender).",
|
|
29939
29939
|
inputSchema: {
|
|
29940
29940
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
29941
29941
|
message_id: exports_external.number().describe("ID of the message to reply to"),
|
|
@@ -30025,7 +30025,7 @@ server.registerTool("export_messages", {
|
|
|
30025
30025
|
});
|
|
30026
30026
|
server.registerTool("create_space", {
|
|
30027
30027
|
title: "Create Space",
|
|
30028
|
-
description: "Create a
|
|
30028
|
+
description: "Create a space. Auto-joined. Supports nesting and projects.",
|
|
30029
30029
|
inputSchema: {
|
|
30030
30030
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
30031
30031
|
name: exports_external.string().describe("Space name"),
|
|
@@ -30055,7 +30055,7 @@ server.registerTool("create_space", {
|
|
|
30055
30055
|
});
|
|
30056
30056
|
server.registerTool("list_spaces", {
|
|
30057
30057
|
title: "List Spaces",
|
|
30058
|
-
description: "List spaces with member/message counts.
|
|
30058
|
+
description: "List spaces with member/message counts.",
|
|
30059
30059
|
inputSchema: {
|
|
30060
30060
|
project_id: exports_external.string().optional().describe("Filter by project ID"),
|
|
30061
30061
|
parent_id: exports_external.string().optional().describe("Filter by parent space. Use 'null' for top-level only."),
|
|
@@ -30226,7 +30226,7 @@ server.registerTool("unarchive_space", {
|
|
|
30226
30226
|
});
|
|
30227
30227
|
server.registerTool("create_project", {
|
|
30228
30228
|
title: "Create Project",
|
|
30229
|
-
description: "Create a
|
|
30229
|
+
description: "Create a project for spaces and agent collaboration.",
|
|
30230
30230
|
inputSchema: {
|
|
30231
30231
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
30232
30232
|
name: exports_external.string().describe("Project name (unique)"),
|
|
@@ -30427,7 +30427,7 @@ server.registerTool("delete_project", {
|
|
|
30427
30427
|
});
|
|
30428
30428
|
server.registerTool("delete_message", {
|
|
30429
30429
|
title: "Delete Message",
|
|
30430
|
-
description: "Delete a message.
|
|
30430
|
+
description: "Delete a message. Sender only.",
|
|
30431
30431
|
inputSchema: {
|
|
30432
30432
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
30433
30433
|
id: exports_external.number().describe("Message ID to delete")
|
|
@@ -30447,7 +30447,7 @@ server.registerTool("delete_message", {
|
|
|
30447
30447
|
});
|
|
30448
30448
|
server.registerTool("edit_message", {
|
|
30449
30449
|
title: "Edit Message",
|
|
30450
|
-
description: "Edit a message's content.
|
|
30450
|
+
description: "Edit a message's content. Sender only.",
|
|
30451
30451
|
inputSchema: {
|
|
30452
30452
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
30453
30453
|
id: exports_external.number().describe("Message ID to edit"),
|
|
@@ -30468,7 +30468,7 @@ server.registerTool("edit_message", {
|
|
|
30468
30468
|
});
|
|
30469
30469
|
server.registerTool("pin_message", {
|
|
30470
30470
|
title: "Pin Message",
|
|
30471
|
-
description: "Pin a message
|
|
30471
|
+
description: "Pin a message in a space or session.",
|
|
30472
30472
|
inputSchema: {
|
|
30473
30473
|
id: exports_external.number().describe("Message ID to pin")
|
|
30474
30474
|
}
|
|
@@ -30504,7 +30504,7 @@ server.registerTool("unpin_message", {
|
|
|
30504
30504
|
});
|
|
30505
30505
|
server.registerTool("get_pinned_messages", {
|
|
30506
30506
|
title: "Get Pinned Messages",
|
|
30507
|
-
description: "
|
|
30507
|
+
description: "Get pinned messages, filtered by space or session.",
|
|
30508
30508
|
inputSchema: {
|
|
30509
30509
|
space: exports_external.string().optional().describe("Filter by space"),
|
|
30510
30510
|
session_id: exports_external.string().optional().describe("Filter by session ID"),
|
|
@@ -30518,7 +30518,7 @@ server.registerTool("get_pinned_messages", {
|
|
|
30518
30518
|
});
|
|
30519
30519
|
server.registerTool("heartbeat", {
|
|
30520
30520
|
title: "Heartbeat",
|
|
30521
|
-
description: "Send
|
|
30521
|
+
description: "Send heartbeat. Optionally set agent status.",
|
|
30522
30522
|
inputSchema: {
|
|
30523
30523
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
30524
30524
|
status: exports_external.string().optional().describe("Agent status (e.g. 'online', 'busy', 'idle'). Defaults to 'online'.")
|
|
@@ -30532,7 +30532,7 @@ server.registerTool("heartbeat", {
|
|
|
30532
30532
|
});
|
|
30533
30533
|
server.registerTool("list_agents", {
|
|
30534
30534
|
title: "List Agents",
|
|
30535
|
-
description: "List agents with presence status
|
|
30535
|
+
description: "List agents with presence status.",
|
|
30536
30536
|
inputSchema: {
|
|
30537
30537
|
online_only: exports_external.boolean().optional().describe("Only return agents online within last 60s")
|
|
30538
30538
|
}
|
|
@@ -30544,7 +30544,7 @@ server.registerTool("list_agents", {
|
|
|
30544
30544
|
});
|
|
30545
30545
|
server.registerTool("get_blockers", {
|
|
30546
30546
|
title: "Get Blockers",
|
|
30547
|
-
description: "Check for unread blocking messages
|
|
30547
|
+
description: "Check for unread blocking messages. Must acknowledge.",
|
|
30548
30548
|
inputSchema: {
|
|
30549
30549
|
from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var.")
|
|
30550
30550
|
}
|
|
@@ -30578,7 +30578,7 @@ server.registerTool("remove_agent", {
|
|
|
30578
30578
|
});
|
|
30579
30579
|
server.registerTool("rename_agent", {
|
|
30580
30580
|
title: "Rename Agent",
|
|
30581
|
-
description: "Rename an agent in the presence list.
|
|
30581
|
+
description: "Rename an agent in the presence list.",
|
|
30582
30582
|
inputSchema: {
|
|
30583
30583
|
from: exports_external.string().optional().describe("Your current agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
|
|
30584
30584
|
new_name: exports_external.string().describe("The new name for the agent")
|
|
@@ -30610,6 +30610,78 @@ server.registerTool("rename_agent", {
|
|
|
30610
30610
|
};
|
|
30611
30611
|
}
|
|
30612
30612
|
});
|
|
30613
|
+
server.registerTool("search_tools", {
|
|
30614
|
+
title: "Search Tools",
|
|
30615
|
+
description: "List tool names, optionally filtered by keyword.",
|
|
30616
|
+
inputSchema: {
|
|
30617
|
+
query: exports_external.string().optional().describe("Keyword filter")
|
|
30618
|
+
}
|
|
30619
|
+
}, async ({ query }) => {
|
|
30620
|
+
const all = [
|
|
30621
|
+
"send_message",
|
|
30622
|
+
"read_messages",
|
|
30623
|
+
"list_sessions",
|
|
30624
|
+
"reply",
|
|
30625
|
+
"mark_read",
|
|
30626
|
+
"search_messages",
|
|
30627
|
+
"export_messages",
|
|
30628
|
+
"create_space",
|
|
30629
|
+
"list_spaces",
|
|
30630
|
+
"send_to_space",
|
|
30631
|
+
"read_space",
|
|
30632
|
+
"join_space",
|
|
30633
|
+
"leave_space",
|
|
30634
|
+
"update_space",
|
|
30635
|
+
"archive_space",
|
|
30636
|
+
"unarchive_space",
|
|
30637
|
+
"create_project",
|
|
30638
|
+
"list_projects",
|
|
30639
|
+
"get_project",
|
|
30640
|
+
"update_project",
|
|
30641
|
+
"delete_project",
|
|
30642
|
+
"delete_message",
|
|
30643
|
+
"edit_message",
|
|
30644
|
+
"pin_message",
|
|
30645
|
+
"unpin_message",
|
|
30646
|
+
"get_pinned_messages",
|
|
30647
|
+
"heartbeat",
|
|
30648
|
+
"list_agents",
|
|
30649
|
+
"get_blockers",
|
|
30650
|
+
"remove_agent",
|
|
30651
|
+
"rename_agent",
|
|
30652
|
+
"search_tools",
|
|
30653
|
+
"describe_tools"
|
|
30654
|
+
];
|
|
30655
|
+
const q = query?.toLowerCase();
|
|
30656
|
+
const matches = q ? all.filter((n) => n.includes(q)) : all;
|
|
30657
|
+
return { content: [{ type: "text", text: matches.join(", ") }] };
|
|
30658
|
+
});
|
|
30659
|
+
server.registerTool("describe_tools", {
|
|
30660
|
+
title: "Describe Tools",
|
|
30661
|
+
description: "Get descriptions for specific tools by name.",
|
|
30662
|
+
inputSchema: {
|
|
30663
|
+
names: exports_external.array(exports_external.string()).describe("Tool names from search_tools")
|
|
30664
|
+
}
|
|
30665
|
+
}, async ({ names }) => {
|
|
30666
|
+
const descriptions = {
|
|
30667
|
+
send_message: "Send DM to agent. Params: to, content, from?, priority?",
|
|
30668
|
+
read_messages: "Read messages. Params: space?, from?, to?, unread_only?, limit?",
|
|
30669
|
+
list_sessions: "List sessions. Params: agent?",
|
|
30670
|
+
reply: "Reply to message. Params: id, content, from?",
|
|
30671
|
+
send_to_space: "Send message to space. Params: space, content, from?",
|
|
30672
|
+
read_space: "Read space messages. Params: space, limit?, since?",
|
|
30673
|
+
join_space: "Join a space. Params: space, from?",
|
|
30674
|
+
create_space: "Create space. Params: name, description?, parent_id?",
|
|
30675
|
+
list_spaces: "List spaces with counts. No required params.",
|
|
30676
|
+
heartbeat: "Send heartbeat. Params: from?, status?",
|
|
30677
|
+
list_agents: "List agents with presence. No required params.",
|
|
30678
|
+
get_blockers: "Check for blocking messages. Params: name?",
|
|
30679
|
+
search_messages: "Search messages. Params: query, space?, limit?"
|
|
30680
|
+
};
|
|
30681
|
+
const result = names.map((n) => `${n}: ${descriptions[n] || "See tool schema"}`).join(`
|
|
30682
|
+
`);
|
|
30683
|
+
return { content: [{ type: "text", text: result }] };
|
|
30684
|
+
});
|
|
30613
30685
|
async function startMcpServer() {
|
|
30614
30686
|
const transport = new StdioServerTransport;
|
|
30615
30687
|
await server.connect(transport);
|