@rymi/mcp 2.5.0 → 2.7.0

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 (3) hide show
  1. package/README.md +6 -2
  2. package/dist/index.js +100 -4
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -63,7 +63,7 @@ Run the server on your own machine — it speaks **stdio** by default and talks
63
63
  }
64
64
  ```
65
65
 
66
- > **Options:** `RYMI_MCP_READONLY=1` hides every mutating tool (including `create_call`, `batch_call`, `publish_agent`). `RYMI_WORKSPACE` makes the local server act in that workspace (sent as the `Rymi-Workspace` header). On the hosted endpoint, send the `Rymi-Workspace` header on the HTTP request instead.
66
+ > **Options:** `RYMI_MCP_READONLY=1` hides every mutating tool (including `create_call`, `batch_call`, `publish_agent`). `RYMI_WORKSPACE` makes the local server act in that workspace (sent as the `Rymi-Workspace` header). On the hosted endpoint, send the `Rymi-Workspace` header on the HTTP request instead. Every tool also takes an optional `workspace` argument, so one connection can act in any workspace it can reach, such as an agency's client workspaces.
67
67
  >
68
68
  > This package speaks **stdio** only. `--transport http` was removed in 2.0.0 — use the hosted endpoint above, which the local server could never match on auth (it has no OAuth, and no per-key tool gating).
69
69
 
@@ -137,7 +137,11 @@ Run the server on your own machine — it speaks **stdio** by default and talks
137
137
  </tr>
138
138
  <tr>
139
139
  <td><b>Workspaces</b></td>
140
- <td><code>list_workspaces</code> · <code>create_workspace</code> · <code>get_workspace_usage</code></td>
140
+ <td><code>list_workspaces</code> · <code>create_workspace</code> · <code>update_workspace</code> · <code>delete_workspace</code> · <code>get_workspace_usage</code> · <code>list_workspace_members</code> · <code>add_workspace_member</code> · <code>remove_workspace_member</code></td>
141
+ </tr>
142
+ <tr>
143
+ <td><b>Compliance settings</b></td>
144
+ <td><code>get_compliance_settings</code> · <code>update_compliance_settings</code></td>
141
145
  </tr>
142
146
  </table>
143
147
 
package/dist/index.js CHANGED
@@ -373,7 +373,8 @@ var require_dist = __commonJS({
373
373
  __export2(index_exports, {
374
374
  defineTool: () => defineTool,
375
375
  opsToolCatalog: () => opsToolCatalog2,
376
- resolveToolDisposition: () => resolveToolDisposition
376
+ resolveToolDisposition: () => resolveToolDisposition,
377
+ withWorkspaceParam: () => withWorkspaceParam2
377
378
  });
378
379
  module2.exports = __toCommonJS2(index_exports);
379
380
  function defineTool(def) {
@@ -1669,6 +1670,88 @@ var require_dist = __commonJS({
1669
1670
  month: import_zod13.z.string().regex(/^\d{4}-\d{2}$/).optional().describe("YYYY-MM; default this month")
1670
1671
  },
1671
1672
  run: (client, params) => client.workspaces.usage(params.workspace_id, { month: params.month })
1673
+ }),
1674
+ defineTool({
1675
+ name: "update_workspace",
1676
+ description: "Rename a workspace, change its operating country, or set a client workspace's monthly spend cap in credits (1 credit = $0.01; null removes the cap). Calls in that client workspace stop at the cap until next month.",
1677
+ scope: "account",
1678
+ risk: "write",
1679
+ input: {
1680
+ workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces"),
1681
+ name: import_zod13.z.string().min(1).max(80).optional().describe("New name"),
1682
+ operating_country: import_zod13.z.string().length(2).nullable().optional().describe('ISO-3166 alpha-2 country, e.g. "IN"; null clears it'),
1683
+ spend_cap_cents_monthly: import_zod13.z.number().int().min(0).nullable().optional().describe("Client workspaces only: monthly cap in credits; null removes it")
1684
+ },
1685
+ run: (client, { workspace_id, ...patch }) => client.workspaces.update(workspace_id, patch)
1686
+ }),
1687
+ defineTool({
1688
+ name: "delete_workspace",
1689
+ description: "Delete an empty workspace: no agents, numbers, calls, campaigns or client workspaces left in it. Only its owner may, or for a client workspace, the agency's owner. The first workspace you signed up with can't be deleted.",
1690
+ scope: "account",
1691
+ risk: "sensitive",
1692
+ input: { workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces") },
1693
+ run: (client, params) => client.workspaces.delete(params.workspace_id)
1694
+ }),
1695
+ defineTool({
1696
+ name: "list_workspace_members",
1697
+ description: "People in a workspace and their roles (owner, admin, client).",
1698
+ scope: "account",
1699
+ risk: "read",
1700
+ input: { workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces") },
1701
+ run: (client, params) => client.workspaces.listMembers(params.workspace_id)
1702
+ }),
1703
+ defineTool({
1704
+ name: "add_workspace_member",
1705
+ description: "Add a person by email. A client workspace takes the client role (sees calls and minutes, edits contacts, the do-not-call list, knowledge and the transfer number); other workspaces take admin. Someone without a Rymi account gets an invite email.",
1706
+ scope: "account",
1707
+ risk: "sensitive",
1708
+ input: {
1709
+ workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces"),
1710
+ email: import_zod13.z.string().email().describe("Their email address"),
1711
+ role: import_zod13.z.enum(["admin", "client"]).optional().describe("Defaults to the role the workspace takes")
1712
+ },
1713
+ run: (client, { workspace_id, ...member }) => client.workspaces.addMember(workspace_id, member)
1714
+ }),
1715
+ defineTool({
1716
+ name: "remove_workspace_member",
1717
+ description: "Remove a person's access to a workspace. The owner can't be removed.",
1718
+ scope: "account",
1719
+ risk: "sensitive",
1720
+ input: {
1721
+ workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces"),
1722
+ user_id: import_zod13.z.string().describe("user_id from list_workspace_members")
1723
+ },
1724
+ run: (client, params) => client.workspaces.removeMember(params.workspace_id, params.user_id)
1725
+ })
1726
+ ];
1727
+ var import_zod14 = require("zod");
1728
+ var rules = import_zod14.z.object({
1729
+ calling_hours: import_zod14.z.object({ start_hour: import_zod14.z.number().int().min(0).max(23), end_hour: import_zod14.z.number().int().min(1).max(24) }).nullable().optional().describe("Callee-local calling hours; null = any hour"),
1730
+ dnc_check: import_zod14.z.boolean().optional().describe("Check the workspace do-not-call list before calls"),
1731
+ require_voice_consent: import_zod14.z.boolean().optional().describe("Require recorded voice consent on the contact"),
1732
+ recording_notice: import_zod14.z.boolean().optional().describe("Recording notice default for new agents"),
1733
+ destination_countries: import_zod14.z.array(import_zod14.z.string().length(2)).nullable().optional().describe("Countries this workspace may call; null = all supported"),
1734
+ apply_to_single_calls: import_zod14.z.boolean().optional().describe("Also apply hours and consent to single calls")
1735
+ }).partial();
1736
+ var complianceTools = [
1737
+ defineTool({
1738
+ name: "get_compliance_settings",
1739
+ description: "Read the workspace's compliance settings: operating country, callee-local calling hours, do-not-call check, voice consent, recording-notice default and allowed destination countries. Compliance is the customer's responsibility; these settings help.",
1740
+ scope: "account",
1741
+ risk: "read",
1742
+ input: {},
1743
+ run: (client) => client.compliance.getSettings()
1744
+ }),
1745
+ defineTool({
1746
+ name: "update_compliance_settings",
1747
+ description: "Change the workspace's compliance settings. Setting operating_country fills every setting not already edited from that country's preset. Blocked calls fail with destination_not_allowed, outside_calling_hours or no_voice_consent.",
1748
+ scope: "account",
1749
+ risk: "write",
1750
+ input: {
1751
+ operating_country: import_zod14.z.string().length(2).nullable().optional().describe('ISO country, e.g. "IN"'),
1752
+ rules: rules.optional()
1753
+ },
1754
+ run: (client, params) => client.compliance.updateSettings(params)
1672
1755
  })
1673
1756
  ];
1674
1757
  var import_agentTools2 = (init_agentTools(), __toCommonJS(agentTools_exports));
@@ -1705,13 +1788,26 @@ var require_dist = __commonJS({
1705
1788
  ...billingTools,
1706
1789
  ...campaignTools,
1707
1790
  ...shareLinkTools,
1708
- ...workspaceTools
1791
+ ...workspaceTools,
1792
+ ...complianceTools
1709
1793
  ].map((t) => ({ ...t, run: async (client, params) => redactToolSecrets(await t.run(client, params)) }));
1710
1794
  var names = /* @__PURE__ */ new Set();
1711
1795
  for (const tool of opsToolCatalog2) {
1712
1796
  if (names.has(tool.name)) throw new Error(`Duplicate ops tool name: ${tool.name}`);
1713
1797
  names.add(tool.name);
1714
1798
  }
1799
+ var import_zod15 = require("zod");
1800
+ var WORKSPACE = import_zod15.z.string().optional().describe("Act in this workspace, e.g. one of your client workspaces (id from list_workspaces). Default: the workspace this connection uses.");
1801
+ function withWorkspaceParam2(tool) {
1802
+ return {
1803
+ ...tool,
1804
+ input: { ...tool.input, workspace: WORKSPACE },
1805
+ run: (client, params) => {
1806
+ const { workspace, ...rest } = params;
1807
+ return tool.run(typeof workspace === "string" && workspace ? client.withWorkspace(workspace) : client, rest);
1808
+ }
1809
+ };
1810
+ }
1715
1811
  }
1716
1812
  });
1717
1813
 
@@ -1741,7 +1837,7 @@ function withToolErrors(handler) {
1741
1837
  // package.json
1742
1838
  var package_default = {
1743
1839
  name: "@rymi/mcp",
1744
- version: "2.5.0",
1840
+ version: "2.7.0",
1745
1841
  description: "Rymi MCP server \u2014 manage AI voice agents via Model Context Protocol",
1746
1842
  license: "MIT",
1747
1843
  author: "Rymi AI <engineering@rymi.live>",
@@ -1809,7 +1905,7 @@ function createServer(apiKey2) {
1809
1905
  version: package_default.version
1810
1906
  });
1811
1907
  const isReadOnly = process.env.RYMI_MCP_READONLY === "1";
1812
- for (const tool of import_ops_tools.opsToolCatalog) {
1908
+ for (const tool of import_ops_tools.opsToolCatalog.map(import_ops_tools.withWorkspaceParam)) {
1813
1909
  if (isReadOnly && tool.risk !== "read") continue;
1814
1910
  server2.tool(
1815
1911
  tool.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rymi/mcp",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "description": "Rymi MCP server — manage AI voice agents via Model Context Protocol",
5
5
  "license": "MIT",
6
6
  "author": "Rymi AI <engineering@rymi.live>",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@modelcontextprotocol/sdk": "^1.11.1",
47
- "@rymi/node": "^2.4.0",
47
+ "@rymi/node": "^2.6.0",
48
48
  "zod": "^3.23.0"
49
49
  },
50
50
  "devDependencies": {