carlyemail-toolkit 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -42,7 +42,7 @@ Plain ES modules with no build step; types ship with it. `ai` and
42
42
 
43
43
  ## What is in it
44
44
 
45
- The 25 tools the hosted [MCP server](https://docs.carlyemail.com/mcp) serves —
45
+ The 26 tools the hosted [MCP server](https://docs.carlyemail.com/mcp) serves —
46
46
  inboxes, threads, messages, drafts, attachments, labels, and account
47
47
  verification — with the same names, descriptions and parameter schemas, called
48
48
  over the REST API. Pass names to take only some:
package/core.js CHANGED
@@ -299,6 +299,11 @@ async function deleteDraft(client, a) {
299
299
  return { deleted: true, draft_id: a.draft_id };
300
300
  }
301
301
 
302
+ async function addNote(client, a) {
303
+ const inbox = await oneInbox(client, a.inbox_id);
304
+ return client.threads.addNote(inbox, a.thread_id, { text: a.text });
305
+ }
306
+
302
307
  async function authMe(client) {
303
308
  const out = { ...(await client.auth.whoami()) };
304
309
  // The first call a connected client makes, and so the earliest place a
@@ -315,6 +320,7 @@ async function verifyAccount(client, a) {
315
320
  }
316
321
 
317
322
  export const FUNCTIONS = {
323
+ add_note: addNote,
318
324
  auth_me: authMe,
319
325
  create_draft: createDraft,
320
326
  create_inbox: createInbox,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carlyemail-toolkit",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CarlyEmail's email tools for the Vercel AI SDK, LangChain, and any other agent framework.",
5
5
  "keywords": [
6
6
  "carlyemail",
@@ -54,7 +54,7 @@
54
54
  "node": ">=18"
55
55
  },
56
56
  "dependencies": {
57
- "carlyemail": "^0.6.0"
57
+ "carlyemail": "^0.6.6"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@langchain/core": ">=0.3",
package/tools.js CHANGED
@@ -3,6 +3,37 @@ export default {
3
3
  "source": "app/mcp/tools/, written by tools/gen_toolkit_tools.py",
4
4
  "first_inbox": "Ask the person what they want their email address to be \u2014 the part before the @ \u2014 then call create_inbox with it as `username`.",
5
5
  "tools": [
6
+ {
7
+ "name": "add_note",
8
+ "title": "Note on a conversation",
9
+ "description": "Leave a note on a conversation for the team. It is never sent to anyone outside the organization.",
10
+ "input_schema": {
11
+ "type": "object",
12
+ "properties": {
13
+ "thread_id": {
14
+ "type": "string",
15
+ "description": "Identifier of the conversation, as returned by list_threads."
16
+ },
17
+ "inbox_id": {
18
+ "type": "string",
19
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
20
+ },
21
+ "text": {
22
+ "type": "string",
23
+ "description": "The note."
24
+ }
25
+ },
26
+ "required": [
27
+ "thread_id",
28
+ "text"
29
+ ],
30
+ "additionalProperties": false
31
+ },
32
+ "read_only": false,
33
+ "destructive": false,
34
+ "idempotent": false,
35
+ "open_world": false
36
+ },
6
37
  {
7
38
  "name": "auth_me",
8
39
  "title": "Check my access",