@rymi/mcp 2.4.0 → 2.6.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 +107 -7
  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></td>
140
+ <td><code>list_workspaces</code> · <code>create_workspace</code> · <code>update_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) {
@@ -1641,7 +1642,7 @@ var require_dist = __commonJS({
1641
1642
  var workspaceTools = [
1642
1643
  defineTool({
1643
1644
  name: "list_workspaces",
1644
- description: "List the workspaces this credential can act in, marking the current one. Act in another by setting RYMI_WORKSPACE (local MCP) or the Rymi-Workspace header.",
1645
+ description: "List the workspaces this credential can act in, marking the current one. Client workspaces show their agency in parent_id. Act in another by setting RYMI_WORKSPACE (local MCP) or the Rymi-Workspace header.",
1645
1646
  scope: "account",
1646
1647
  risk: "read",
1647
1648
  input: {},
@@ -1649,14 +1650,100 @@ var require_dist = __commonJS({
1649
1650
  }),
1650
1651
  defineTool({
1651
1652
  name: "create_workspace",
1652
- description: "Create a standalone workspace you own, with its own agents, numbers, keys and balance. It gets no free monthly credit.",
1653
+ description: "Create a standalone workspace you own, or, with parent, a client workspace of an agency workspace you run. The agency pays for a client workspace's calls. Neither gets the free monthly credit.",
1653
1654
  scope: "account",
1654
1655
  risk: "write",
1655
1656
  input: {
1656
1657
  name: import_zod13.z.string().min(1).max(80).describe("Workspace name"),
1657
- operating_country: import_zod13.z.string().length(2).optional().describe('ISO-3166 alpha-2 country, e.g. "IN"')
1658
+ operating_country: import_zod13.z.string().length(2).optional().describe('ISO-3166 alpha-2 country, e.g. "IN"'),
1659
+ parent: import_zod13.z.string().optional().describe("Agency workspace id. Makes this a client workspace the agency pays for.")
1658
1660
  },
1659
1661
  run: (client, params) => client.workspaces.create(params)
1662
+ }),
1663
+ defineTool({
1664
+ name: "get_workspace_usage",
1665
+ description: "Calls, minutes and credits for one workspace in a calendar month (UTC). Use it to invoice a client workspace. Credits are left out for client-role users.",
1666
+ scope: "account",
1667
+ risk: "read",
1668
+ input: {
1669
+ workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces"),
1670
+ month: import_zod13.z.string().regex(/^\d{4}-\d{2}$/).optional().describe("YYYY-MM; default this month")
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: "list_workspace_members",
1689
+ description: "People in a workspace and their roles (owner, admin, client).",
1690
+ scope: "account",
1691
+ risk: "read",
1692
+ input: { workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces") },
1693
+ run: (client, params) => client.workspaces.listMembers(params.workspace_id)
1694
+ }),
1695
+ defineTool({
1696
+ name: "add_workspace_member",
1697
+ 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.",
1698
+ scope: "account",
1699
+ risk: "sensitive",
1700
+ input: {
1701
+ workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces"),
1702
+ email: import_zod13.z.string().email().describe("Their email address"),
1703
+ role: import_zod13.z.enum(["admin", "client"]).optional().describe("Defaults to the role the workspace takes")
1704
+ },
1705
+ run: (client, { workspace_id, ...member }) => client.workspaces.addMember(workspace_id, member)
1706
+ }),
1707
+ defineTool({
1708
+ name: "remove_workspace_member",
1709
+ description: "Remove a person's access to a workspace. The owner can't be removed.",
1710
+ scope: "account",
1711
+ risk: "sensitive",
1712
+ input: {
1713
+ workspace_id: import_zod13.z.string().describe("Workspace id from list_workspaces"),
1714
+ user_id: import_zod13.z.string().describe("user_id from list_workspace_members")
1715
+ },
1716
+ run: (client, params) => client.workspaces.removeMember(params.workspace_id, params.user_id)
1717
+ })
1718
+ ];
1719
+ var import_zod14 = require("zod");
1720
+ var rules = import_zod14.z.object({
1721
+ 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"),
1722
+ dnc_check: import_zod14.z.boolean().optional().describe("Check the workspace do-not-call list before calls"),
1723
+ require_voice_consent: import_zod14.z.boolean().optional().describe("Require recorded voice consent on the contact"),
1724
+ recording_notice: import_zod14.z.boolean().optional().describe("Recording notice default for new agents"),
1725
+ destination_countries: import_zod14.z.array(import_zod14.z.string().length(2)).nullable().optional().describe("Countries this workspace may call; null = all supported"),
1726
+ apply_to_single_calls: import_zod14.z.boolean().optional().describe("Also apply hours and consent to single calls")
1727
+ }).partial();
1728
+ var complianceTools = [
1729
+ defineTool({
1730
+ name: "get_compliance_settings",
1731
+ 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.",
1732
+ scope: "account",
1733
+ risk: "read",
1734
+ input: {},
1735
+ run: (client) => client.compliance.getSettings()
1736
+ }),
1737
+ defineTool({
1738
+ name: "update_compliance_settings",
1739
+ 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.",
1740
+ scope: "account",
1741
+ risk: "write",
1742
+ input: {
1743
+ operating_country: import_zod14.z.string().length(2).nullable().optional().describe('ISO country, e.g. "IN"'),
1744
+ rules: rules.optional()
1745
+ },
1746
+ run: (client, params) => client.compliance.updateSettings(params)
1660
1747
  })
1661
1748
  ];
1662
1749
  var import_agentTools2 = (init_agentTools(), __toCommonJS(agentTools_exports));
@@ -1693,13 +1780,26 @@ var require_dist = __commonJS({
1693
1780
  ...billingTools,
1694
1781
  ...campaignTools,
1695
1782
  ...shareLinkTools,
1696
- ...workspaceTools
1783
+ ...workspaceTools,
1784
+ ...complianceTools
1697
1785
  ].map((t) => ({ ...t, run: async (client, params) => redactToolSecrets(await t.run(client, params)) }));
1698
1786
  var names = /* @__PURE__ */ new Set();
1699
1787
  for (const tool of opsToolCatalog2) {
1700
1788
  if (names.has(tool.name)) throw new Error(`Duplicate ops tool name: ${tool.name}`);
1701
1789
  names.add(tool.name);
1702
1790
  }
1791
+ var import_zod15 = require("zod");
1792
+ 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.");
1793
+ function withWorkspaceParam2(tool) {
1794
+ return {
1795
+ ...tool,
1796
+ input: { ...tool.input, workspace: WORKSPACE },
1797
+ run: (client, params) => {
1798
+ const { workspace, ...rest } = params;
1799
+ return tool.run(typeof workspace === "string" && workspace ? client.withWorkspace(workspace) : client, rest);
1800
+ }
1801
+ };
1802
+ }
1703
1803
  }
1704
1804
  });
1705
1805
 
@@ -1729,7 +1829,7 @@ function withToolErrors(handler) {
1729
1829
  // package.json
1730
1830
  var package_default = {
1731
1831
  name: "@rymi/mcp",
1732
- version: "2.4.0",
1832
+ version: "2.6.0",
1733
1833
  description: "Rymi MCP server \u2014 manage AI voice agents via Model Context Protocol",
1734
1834
  license: "MIT",
1735
1835
  author: "Rymi AI <engineering@rymi.live>",
@@ -1797,7 +1897,7 @@ function createServer(apiKey2) {
1797
1897
  version: package_default.version
1798
1898
  });
1799
1899
  const isReadOnly = process.env.RYMI_MCP_READONLY === "1";
1800
- for (const tool of import_ops_tools.opsToolCatalog) {
1900
+ for (const tool of import_ops_tools.opsToolCatalog.map(import_ops_tools.withWorkspaceParam)) {
1801
1901
  if (isReadOnly && tool.risk !== "read") continue;
1802
1902
  server2.tool(
1803
1903
  tool.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rymi/mcp",
3
- "version": "2.4.0",
3
+ "version": "2.6.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.3.0",
47
+ "@rymi/node": "^2.5.0",
48
48
  "zod": "^3.23.0"
49
49
  },
50
50
  "devDependencies": {