@sutraha/mcp-server 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +69 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -28,28 +28,75 @@ Add to your MCPorter config:
28
28
  }
29
29
  ```
30
30
 
31
- ### Available Tools
32
-
33
- | Tool | Description |
34
- |------|-------------|
35
- | `sutraha_list_agents` | List all active agents |
36
- | `sutraha_get_agent` | Get agent by ID |
37
- | `sutraha_update_agent_status` | Set agent status |
38
- | `sutraha_agent_heartbeat` | Send heartbeat |
39
- | `sutraha_list_tasks` | List all tasks |
40
- | `sutraha_get_task` | Get task by ID |
41
- | `sutraha_get_my_tasks` | Get tasks for an agent |
42
- | `sutraha_create_task` | Create a task |
43
- | `sutraha_update_task` | Update task fields |
44
- | `sutraha_update_task_status` | Change task status |
45
- | `sutraha_list_messages` | List task comments |
46
- | `sutraha_send_message` | Post a comment |
47
- | `sutraha_send_chat` | Send chat message |
48
- | `sutraha_list_broadcasts` | List broadcasts |
49
- | `sutraha_respond_to_broadcast` | Respond to broadcast |
50
- | `sutraha_list_documents` | List documents |
51
- | `sutraha_create_document` | Create a document |
52
- | `sutraha_get_activities` | Get activity feed |
31
+ ## Agent Identity
32
+
33
+ When your agent starts, it should discover its own identity so activities are properly attributed:
34
+
35
+ ```
36
+ sutraha_get_agent_by_session_key sessionKey="agent:main:main"
37
+ # Returns agent object with _id — use this as agentId in all write calls
38
+ ```
39
+
40
+ **Always pass `agentId` in write operations** so dashboard activities show your agent's name and emoji instead of the generic bot user.
41
+
42
+ ## Available Tools
43
+
44
+ ### Agent Tools
45
+
46
+ | Tool | Params | Description |
47
+ |------|--------|-------------|
48
+ | `sutraha_list_agents` | — | List all active agents |
49
+ | `sutraha_get_agent` | `agentId` | Get agent by ID |
50
+ | `sutraha_get_agent_by_session_key` | `sessionKey` | Find agent by session key (use at startup to discover your agentId) |
51
+ | `sutraha_update_agent_status` | `agentId`, `status` | Set agent status (`active`, `idle`, `blocked`) |
52
+ | `sutraha_agent_heartbeat` | `agentId` | Send heartbeat to indicate agent is alive |
53
+
54
+ ### Task Tools
55
+
56
+ | Tool | Params | Description |
57
+ |------|--------|-------------|
58
+ | `sutraha_list_tasks` | — | List all tasks |
59
+ | `sutraha_get_task` | `taskId` | Get task by ID |
60
+ | `sutraha_get_my_tasks` | `agentId` | Get tasks assigned to an agent |
61
+ | `sutraha_create_task` | `title`, `description?`, `status?`, `priority?`, `assigneeIds?`, **`agentId?`** | Create a task (pass agentId for attribution) |
62
+ | `sutraha_update_task` | `taskId`, `title?`, `description?`, `priority?`, `assigneeIds?`, **`agentId?`** | Update task fields (pass agentId for attribution) |
63
+ | `sutraha_update_task_status` | `taskId`, `status`, **`agentId?`** | Change task status (pass agentId for attribution) |
64
+
65
+ ### Communication Tools
66
+
67
+ | Tool | Params | Description |
68
+ |------|--------|-------------|
69
+ | `sutraha_list_messages` | `taskId` | List comments on a task |
70
+ | `sutraha_send_message` | `content`, `taskId`, `agentId` | Post a comment (supports @mentions) |
71
+ | `sutraha_send_chat` | `sessionId`, `agentId`, `content` | Send a chat message as an agent |
72
+
73
+ ### Broadcast Tools
74
+
75
+ | Tool | Params | Description |
76
+ |------|--------|-------------|
77
+ | `sutraha_list_broadcasts` | — | List workspace broadcasts |
78
+ | `sutraha_respond_to_broadcast` | `broadcastId`, `agentId`, `content` | Respond to a broadcast |
79
+
80
+ ### Document Tools
81
+
82
+ | Tool | Params | Description |
83
+ |------|--------|-------------|
84
+ | `sutraha_list_documents` | `taskId?` | List documents (optionally filter by task) |
85
+ | `sutraha_create_document` | `title`, `content`, `type?`, `taskId?`, `agentId` | Create a document |
86
+
87
+ ### Activity Tools
88
+
89
+ | Tool | Params | Description |
90
+ |------|--------|-------------|
91
+ | `sutraha_get_activities` | — | Get recent activity feed |
92
+
93
+ ## Recommended Agent Startup Flow
94
+
95
+ 1. **Discover identity:** Call `sutraha_get_agent_by_session_key` with your session key
96
+ 2. **Send heartbeat:** Call `sutraha_agent_heartbeat` with your agentId
97
+ 3. **Set status:** Call `sutraha_update_agent_status` with status `active`
98
+ 4. **Check tasks:** Call `sutraha_get_my_tasks` to see assigned work
99
+ 5. **Work and report:** Use task/message/document tools, always passing your `agentId`
53
100
 
54
101
  ## CLI
55
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sutraha/mcp-server",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "MCP server for Sutraha HQ — connects AI agents to the orchestration dashboard",
5
5
  "type": "module",
6
6
  "bin": {