Skip to content

Commit 2e236b6

Browse files
authored
Merge pull request #11 from KeyValueSoftwareSystems/fix/mcp-missing-tools
fix : missing tools in mcp
2 parents 1709ca5 + 351686b commit 2e236b6

File tree

4 files changed

+43
-15
lines changed

4 files changed

+43
-15
lines changed

mcp-server/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@trysiren/mcp",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"homepage": "https://github.com/KeyValueSoftwareSystems/siren-agent-toolkit/tree/main/mcp-server",
55
"description": "A command line tool for setting up Siren MCP server",
66
"bin": "dist/index.js",

mcp-server/src/index.ts

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ const ACCEPTED_TOOLS = [
4141
'webhooks.configureInbound',
4242
];
4343

44+
// Mapping from MCP tool names to their actual actions configuration
45+
const TOOL_ACTIONS_MAP: { [key: string]: { [resource: string]: { [action: string]: boolean } } } = {
46+
'messaging.send': { messaging: { create: true } },
47+
'messaging.sendAwesomeTemplate': { messaging: { create: true } },
48+
'messaging.getStatus': { messaging: { read: true } },
49+
'messaging.getReplies': { messaging: { read: true } },
50+
'templates.list': { templates: { read: true } },
51+
'templates.create': { templates: { create: true } },
52+
'templates.update': { templates: { update: true } },
53+
'templates.delete': { templates: { delete: true } },
54+
'templates.publish': { templates: { update: true } },
55+
'users.add': { users: { create: true } },
56+
'users.update': { users: { update: true } },
57+
'users.delete': { users: { delete: true } },
58+
'workflows.trigger': { workflows: { trigger: true } },
59+
'workflows.triggerBulk': { workflows: { trigger: true } },
60+
'workflows.schedule': { workflows: { schedule: true } },
61+
'webhooks.configureNotification': { webhooks: { create: true } },
62+
'webhooks.configureInbound': { webhooks: { create: true } },
63+
};
64+
4465
export function parseArgs(args: string[]): Options {
4566
const options: Options = {};
4667

@@ -111,19 +132,27 @@ export async function main() {
111132

112133
if (selectedTools.includes('all')) {
113134
ACCEPTED_TOOLS.forEach((tool) => {
114-
const [resource, action] = tool.split('.');
115-
configuration.actions[resource] = {
116-
...configuration.actions[resource],
117-
[action]: true,
118-
};
135+
const toolActions = TOOL_ACTIONS_MAP[tool];
136+
if (toolActions) {
137+
Object.keys(toolActions).forEach((resource) => {
138+
configuration.actions[resource] = {
139+
...configuration.actions[resource],
140+
...toolActions[resource],
141+
};
142+
});
143+
}
119144
});
120145
} else {
121146
selectedTools.forEach((tool: any) => {
122-
const [resource, action] = tool.split('.');
123-
configuration.actions[resource] = {
124-
...configuration.actions[resource],
125-
[action]: true,
126-
};
147+
const toolActions = TOOL_ACTIONS_MAP[tool];
148+
if (toolActions) {
149+
Object.keys(toolActions).forEach((resource) => {
150+
configuration.actions[resource] = {
151+
...configuration.actions[resource],
152+
...toolActions[resource],
153+
};
154+
});
155+
}
127156
});
128157
}
129158

typescript/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ The Siren Agent Toolkit provides the following tools for AI agents:
6464

6565
### Messaging Tools
6666
- **`send_message`** - Send messages via email, SMS, Slack, etc.
67+
- **`send_awesome_template`** - Send messages using awesome templates
6768
- **`get_message_status`** - Check delivery status of sent messages
6869
- **`get_message_replies`** - Retrieve replies to sent messages
6970

@@ -78,8 +79,6 @@ The Siren Agent Toolkit provides the following tools for AI agents:
7879
- **`add_user`** - Create or update user profiles
7980
- **`update_user`** - Modify user information
8081
- **`delete_user`** - Remove users
81-
- **`get_user`** - Retrieve user details
82-
- **`list_users`** - Get all users with pagination
8382

8483
### Workflow Automation
8584
- **`trigger_workflow`** - Execute workflows immediately

0 commit comments

Comments
 (0)