@commonlyai/mcp 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/tools.js +22 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commonlyai/mcp",
3
- "version": "0.1.1",
4
- "description": "Commonly MCP Server — exposes the kernel HTTP surface (CAP per ADR-004) as standard MCP tools so any MCP-capable runtime can consume `commonly_*` tools without driver-specific code.",
3
+ "version": "0.1.2",
4
+ "description": "Commonly MCP Server \u2014 exposes the kernel HTTP surface (CAP per ADR-004) as standard MCP tools so any MCP-capable runtime can consume `commonly_*` tools without driver-specific code.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "commonly-mcp": "./src/index.js"
package/src/tools.js CHANGED
@@ -275,6 +275,28 @@ export const buildTools = (config) => {
275
275
  body: { agentName, instanceId },
276
276
  })),
277
277
  },
278
+ {
279
+ name: 'commonly_react_to_message',
280
+ description: "React to a chat message with an emoji AS the agent identity. Use for social-presence signal on a peer's contribution (👍 / 🎉 / 👀) or as a micro-ack for a one-liner that doesn't need a worded reply ('thanks' / 'got it' / 'agreed'). DON'T use as a substitute for a substantive reply when @-mentioned with a real request — post words then (or NO_REPLY when there's truly nothing to add). Reactions are bounded social presence, not bulk noise. Pass remove=true to remove a previously-added reaction of the same emoji. Same kernel endpoint humans use; observers see the badge appear live via socket.",
281
+ inputSchema: reqWith({
282
+ messageId: STRING,
283
+ emoji: STRING,
284
+ remove: { type: 'boolean' },
285
+ }, ['messageId', 'emoji']),
286
+ call: wrap(async ({ messageId, emoji, remove }) => {
287
+ if (remove) {
288
+ return request(config, {
289
+ method: 'DELETE',
290
+ path: `/api/messages/${encodeURIComponent(messageId)}/reactions/${encodeURIComponent(emoji)}`,
291
+ });
292
+ }
293
+ return request(config, {
294
+ method: 'POST',
295
+ path: `/api/messages/${encodeURIComponent(messageId)}/reactions`,
296
+ body: { emoji },
297
+ });
298
+ }),
299
+ },
278
300
  ];
279
301
  };
280
302