ofw-mcp 1.0.2 → 1.0.7
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/dist/index.js +0 -0
- package/dist/tools/messages.js +11 -2
- package/package.json +5 -1
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/tools/messages.js
CHANGED
|
@@ -33,7 +33,7 @@ export const toolDefinitions = [
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
name: 'ofw_send_message',
|
|
36
|
-
description: 'Send a message via OurFamilyWizard',
|
|
36
|
+
description: 'Send a message via OurFamilyWizard. If sending from a draft, pass draftId to automatically delete the draft after sending.',
|
|
37
37
|
annotations: { destructiveHint: true },
|
|
38
38
|
inputSchema: {
|
|
39
39
|
type: 'object',
|
|
@@ -45,6 +45,10 @@ export const toolDefinitions = [
|
|
|
45
45
|
items: { type: 'number' },
|
|
46
46
|
description: 'Array of recipient user IDs (get from ofw_get_profile)',
|
|
47
47
|
},
|
|
48
|
+
draftId: {
|
|
49
|
+
type: 'number',
|
|
50
|
+
description: 'ID of the draft to delete after sending (omit if not sending from a draft)',
|
|
51
|
+
},
|
|
48
52
|
},
|
|
49
53
|
required: ['subject', 'body', 'recipientIds'],
|
|
50
54
|
},
|
|
@@ -119,13 +123,18 @@ export async function handleTool(name, args, client) {
|
|
|
119
123
|
return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
|
|
120
124
|
}
|
|
121
125
|
case 'ofw_send_message': {
|
|
122
|
-
const { subject, body, recipientIds } = args;
|
|
126
|
+
const { subject, body, recipientIds, draftId } = args;
|
|
123
127
|
const data = await client.request('POST', '/pub/v3/messages', {
|
|
124
128
|
subject, body, recipientIds,
|
|
125
129
|
attachments: { myFileIDs: [] },
|
|
126
130
|
draft: false,
|
|
127
131
|
includeOriginal: false,
|
|
128
132
|
});
|
|
133
|
+
if (draftId !== undefined) {
|
|
134
|
+
const form = new FormData();
|
|
135
|
+
form.append('messageIds', String(draftId));
|
|
136
|
+
await client.request('DELETE', '/pub/v1/messages', form);
|
|
137
|
+
}
|
|
129
138
|
return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
|
|
130
139
|
}
|
|
131
140
|
case 'ofw_list_drafts': {
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ofw-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "OurFamilyWizard MCP server for Claude — developed and maintained by AI (Claude Sonnet 4.6)",
|
|
5
5
|
"author": "Claude Sonnet 4.6 (AI) <https://www.anthropic.com/claude>",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/chrischall/ofw-mcp"
|
|
9
|
+
},
|
|
6
10
|
"type": "module",
|
|
7
11
|
"bin": {
|
|
8
12
|
"ofw-mcp": "dist/index.js"
|