@abhinavyadav/bolna-mcp 1.0.3 → 1.0.6

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.
@@ -17,28 +17,31 @@ const objectiveOptionSchema = _zod.z.lazy(()=>_zod.z.object({
17
17
  sub_options: _zod.z.array(objectiveOptionSchema).optional().describe("Nested sub-options for hierarchical classifications")
18
18
  }));
19
19
  function registerDispositionTools(server) {
20
- server.tool("bolna_create_disposition", "Create a new call extraction disposition and link it to a Bolna agent", {
21
- agent_id: _zod.z.string().uuid().describe("UUID of the agent this disposition will be linked to"),
22
- name: _zod.z.string().describe("Display name for the disposition"),
23
- question: _zod.z.string().describe("The prompt sent to the LLM to evaluate the transcript"),
24
- category: _zod.z.string().optional().default("General").describe('Category grouping for the disposition (default: "General")'),
25
- system_prompt: _zod.z.string().optional().describe("Optional system context for the evaluating LLM"),
26
- model: _zod.z.string().optional().default("gpt-4.1-mini").describe("LLM model to use for evaluation"),
27
- is_subjective: _zod.z.boolean().optional().default(false).describe("Enable free-text response"),
28
- is_objective: _zod.z.boolean().optional().default(false).describe("Enable pre-defined value selection"),
29
- subjective_type: _zod.z.enum([
30
- "text",
31
- "timestamp",
32
- "numeric",
33
- "boolean",
34
- "email",
35
- "regex"
36
- ]).optional().default("text").describe("Format constraint for the free-text response"),
37
- subjective_type_config: _zod.z.object({
38
- pattern: _zod.z.string().describe("Regex pattern the answer must match"),
39
- description: _zod.z.string().optional()
40
- }).optional().describe("Required when subjective_type is 'regex'"),
41
- objective_options: _zod.z.array(objectiveOptionSchema).optional().describe("Required when is_objective is true")
20
+ server.registerTool("bolna_create_disposition", {
21
+ description: "Create a new call extraction disposition and link it to a Bolna agent",
22
+ inputSchema: {
23
+ agent_id: _zod.z.string().uuid().describe("UUID of the agent this disposition will be linked to"),
24
+ name: _zod.z.string().describe("Display name for the disposition"),
25
+ question: _zod.z.string().describe("The prompt sent to the LLM to evaluate the transcript"),
26
+ category: _zod.z.string().optional().default("General").describe('Category grouping for the disposition (default: "General")'),
27
+ system_prompt: _zod.z.string().optional().describe("Optional system context for the evaluating LLM"),
28
+ model: _zod.z.string().optional().default("gpt-4.1-mini").describe("LLM model to use for evaluation"),
29
+ is_subjective: _zod.z.boolean().optional().default(false).describe("Enable free-text response"),
30
+ is_objective: _zod.z.boolean().optional().default(false).describe("Enable pre-defined value selection"),
31
+ subjective_type: _zod.z.enum([
32
+ "text",
33
+ "timestamp",
34
+ "numeric",
35
+ "boolean",
36
+ "email",
37
+ "regex"
38
+ ]).optional().default("text").describe("Format constraint for the free-text response"),
39
+ subjective_type_config: _zod.z.object({
40
+ pattern: _zod.z.string().describe("Regex pattern the answer must match"),
41
+ description: _zod.z.string().optional()
42
+ }).optional().describe("Required when subjective_type is 'regex'"),
43
+ objective_options: _zod.z.array(objectiveOptionSchema).optional().describe("Required when is_objective is true")
44
+ }
42
45
  }, async (args)=>{
43
46
  try {
44
47
  const body = {
@@ -67,26 +70,29 @@ function registerDispositionTools(server) {
67
70
  (0, _client.handleAxiosError)(error, "bolna_create_disposition");
68
71
  }
69
72
  });
70
- server.tool("bolna_bulk_create_dispositions", "Atomically create and link multiple dispositions to an agent in a single request", {
71
- agent_id: _zod.z.string().uuid().describe("UUID of the agent to link all dispositions to"),
72
- dispositions: _zod.z.array(_zod.z.object({
73
- name: _zod.z.string(),
74
- question: _zod.z.string(),
75
- category: _zod.z.string().optional(),
76
- system_prompt: _zod.z.string().optional(),
77
- model: _zod.z.string().optional(),
78
- is_subjective: _zod.z.boolean().optional(),
79
- is_objective: _zod.z.boolean().optional(),
80
- subjective_type: _zod.z.enum([
81
- "text",
82
- "timestamp",
83
- "numeric",
84
- "boolean",
85
- "email",
86
- "regex"
87
- ]).optional(),
88
- objective_options: _zod.z.array(objectiveOptionSchema).optional()
89
- })).describe("Array of disposition objects to create")
73
+ server.registerTool("bolna_bulk_create_dispositions", {
74
+ description: "Atomically create and link multiple dispositions to an agent in a single request",
75
+ inputSchema: {
76
+ agent_id: _zod.z.string().uuid().describe("UUID of the agent to link all dispositions to"),
77
+ dispositions: _zod.z.array(_zod.z.object({
78
+ name: _zod.z.string(),
79
+ question: _zod.z.string(),
80
+ category: _zod.z.string().optional(),
81
+ system_prompt: _zod.z.string().optional(),
82
+ model: _zod.z.string().optional(),
83
+ is_subjective: _zod.z.boolean().optional(),
84
+ is_objective: _zod.z.boolean().optional(),
85
+ subjective_type: _zod.z.enum([
86
+ "text",
87
+ "timestamp",
88
+ "numeric",
89
+ "boolean",
90
+ "email",
91
+ "regex"
92
+ ]).optional(),
93
+ objective_options: _zod.z.array(objectiveOptionSchema).optional()
94
+ })).describe("Array of disposition objects to create")
95
+ }
90
96
  }, async (args)=>{
91
97
  try {
92
98
  const response = await _client.bolnaClient.post("/dispositions/bulk", {
@@ -105,9 +111,12 @@ function registerDispositionTools(server) {
105
111
  (0, _client.handleAxiosError)(error, "bolna_bulk_create_dispositions");
106
112
  }
107
113
  });
108
- server.tool("bolna_get_disposition", "Retrieve a single disposition by its ID", {
109
- disposition_id: _zod.z.string().describe("UUID of the disposition to retrieve"),
110
- agent_id: _zod.z.string().optional().describe("Optional agent UUID to scope the lookup")
114
+ server.registerTool("bolna_get_disposition", {
115
+ description: "Retrieve a single disposition by its ID",
116
+ inputSchema: {
117
+ disposition_id: _zod.z.string().describe("UUID of the disposition to retrieve"),
118
+ agent_id: _zod.z.string().optional().describe("Optional agent UUID to scope the lookup")
119
+ }
111
120
  }, async (args)=>{
112
121
  try {
113
122
  const response = await _client.bolnaClient.get(`/dispositions/${args.disposition_id}`, args.agent_id ? {
@@ -127,8 +136,11 @@ function registerDispositionTools(server) {
127
136
  (0, _client.handleAxiosError)(error, "bolna_get_disposition");
128
137
  }
129
138
  });
130
- server.tool("bolna_list_dispositions", "List all dispositions for your account, optionally filtered by agent", {
131
- agent_id: _zod.z.string().optional().describe("Optional agent UUID to filter dispositions by")
139
+ server.registerTool("bolna_list_dispositions", {
140
+ description: "List all dispositions for your account, optionally filtered by agent",
141
+ inputSchema: {
142
+ agent_id: _zod.z.string().optional().describe("Optional agent UUID to filter dispositions by")
143
+ }
132
144
  }, async (args)=>{
133
145
  try {
134
146
  const response = await _client.bolnaClient.get("/dispositions/", {
@@ -148,25 +160,28 @@ function registerDispositionTools(server) {
148
160
  (0, _client.handleAxiosError)(error, "bolna_list_dispositions");
149
161
  }
150
162
  });
151
- server.tool("bolna_update_disposition", "Update a disposition. When scoped to an agent, shared dispositions are copied before editing", {
152
- disposition_id: _zod.z.string().describe("UUID of the disposition to update"),
153
- agent_id: _zod.z.string().optional().describe("Agent UUID to scope the update (triggers copy-on-write for shared dispositions)"),
154
- name: _zod.z.string().optional(),
155
- question: _zod.z.string().optional(),
156
- category: _zod.z.string().optional(),
157
- system_prompt: _zod.z.string().optional(),
158
- model: _zod.z.string().optional(),
159
- is_subjective: _zod.z.boolean().optional(),
160
- is_objective: _zod.z.boolean().optional(),
161
- subjective_type: _zod.z.enum([
162
- "text",
163
- "timestamp",
164
- "numeric",
165
- "boolean",
166
- "email",
167
- "regex"
168
- ]).optional(),
169
- objective_options: _zod.z.array(objectiveOptionSchema).optional()
163
+ server.registerTool("bolna_update_disposition", {
164
+ description: "Update a disposition. When scoped to an agent, shared dispositions are copied before editing",
165
+ inputSchema: {
166
+ disposition_id: _zod.z.string().describe("UUID of the disposition to update"),
167
+ agent_id: _zod.z.string().optional().describe("Agent UUID to scope the update (triggers copy-on-write for shared dispositions)"),
168
+ name: _zod.z.string().optional(),
169
+ question: _zod.z.string().optional(),
170
+ category: _zod.z.string().optional(),
171
+ system_prompt: _zod.z.string().optional(),
172
+ model: _zod.z.string().optional(),
173
+ is_subjective: _zod.z.boolean().optional(),
174
+ is_objective: _zod.z.boolean().optional(),
175
+ subjective_type: _zod.z.enum([
176
+ "text",
177
+ "timestamp",
178
+ "numeric",
179
+ "boolean",
180
+ "email",
181
+ "regex"
182
+ ]).optional(),
183
+ objective_options: _zod.z.array(objectiveOptionSchema).optional()
184
+ }
170
185
  }, async (args)=>{
171
186
  try {
172
187
  const { disposition_id, agent_id, ...rest } = args;
@@ -188,8 +203,11 @@ function registerDispositionTools(server) {
188
203
  (0, _client.handleAxiosError)(error, "bolna_update_disposition");
189
204
  }
190
205
  });
191
- server.tool("bolna_delete_disposition", "Permanently delete a disposition by its ID", {
192
- disposition_id: _zod.z.string().describe("UUID of the disposition to delete")
206
+ server.registerTool("bolna_delete_disposition", {
207
+ description: "Permanently delete a disposition by its ID",
208
+ inputSchema: {
209
+ disposition_id: _zod.z.string().describe("UUID of the disposition to delete")
210
+ }
193
211
  }, async (args)=>{
194
212
  try {
195
213
  const response = await _client.bolnaClient.delete(`/dispositions/${args.disposition_id}`);
@@ -205,15 +223,18 @@ function registerDispositionTools(server) {
205
223
  (0, _client.handleAxiosError)(error, "bolna_delete_disposition");
206
224
  }
207
225
  });
208
- server.tool("bolna_test_dispositions", "Test all dispositions linked to an agent against a call transcript to preview extraction results", {
209
- agent_id: _zod.z.string().uuid().describe("UUID of the agent whose dispositions to test"),
210
- transcript: _zod.z.array(_zod.z.object({
211
- role: _zod.z.enum([
212
- "user",
213
- "assistant"
214
- ]),
215
- content: _zod.z.string()
216
- })).describe("Conversation transcript as an array of role/content objects to evaluate")
226
+ server.registerTool("bolna_test_dispositions", {
227
+ description: "Test all dispositions linked to an agent against a call transcript to preview extraction results",
228
+ inputSchema: {
229
+ agent_id: _zod.z.string().uuid().describe("UUID of the agent whose dispositions to test"),
230
+ transcript: _zod.z.array(_zod.z.object({
231
+ role: _zod.z.enum([
232
+ "user",
233
+ "assistant"
234
+ ]),
235
+ content: _zod.z.string()
236
+ })).describe("Conversation transcript as an array of role/content objects to evaluate")
237
+ }
217
238
  }, async (args)=>{
218
239
  try {
219
240
  const response = await _client.bolnaClient.post(`/v2/agent/${args.agent_id}/dispositions/test`, {
@@ -11,11 +11,14 @@ Object.defineProperty(exports, "registerExecutionTools", {
11
11
  const _zod = require("zod");
12
12
  const _client = require("../client.js");
13
13
  function registerExecutionTools(server) {
14
- server.tool("bolna_get_execution", "Retrieve full details of a call execution including transcript and recording URL", {
15
- execution_id: _zod.z.string().describe("The execution ID of the call to retrieve")
14
+ server.registerTool("bolna_get_execution", {
15
+ description: "Retrieve full details of a call execution including transcript and recording URL",
16
+ inputSchema: {
17
+ execution_id: _zod.z.string().describe("The execution ID of the call to retrieve")
18
+ }
16
19
  }, async (args)=>{
17
20
  try {
18
- const response = await _client.bolnaClient.get(`/execution/${args.execution_id}`);
21
+ const response = await _client.bolnaClient.get(`/executions/${args.execution_id}`);
19
22
  return {
20
23
  content: [
21
24
  {
@@ -28,10 +31,13 @@ function registerExecutionTools(server) {
28
31
  (0, _client.handleAxiosError)(error, "bolna_get_execution");
29
32
  }
30
33
  });
31
- server.tool("bolna_list_agent_executions", "List all call executions for a specific Bolna agent with pagination", {
32
- agent_id: _zod.z.string().describe("The agent ID whose call history to retrieve"),
33
- page_number: _zod.z.number().int().positive().optional().default(1).describe("Page number (1-indexed)"),
34
- page_size: _zod.z.number().int().positive().optional().default(10).describe("Number of executions per page")
34
+ server.registerTool("bolna_list_agent_executions", {
35
+ description: "List all call executions for a specific Bolna agent with pagination",
36
+ inputSchema: {
37
+ agent_id: _zod.z.string().describe("The agent ID whose call history to retrieve"),
38
+ page_number: _zod.z.number().int().positive().optional().default(1).describe("Page number (1-indexed)"),
39
+ page_size: _zod.z.number().int().positive().optional().default(10).describe("Number of executions per page")
40
+ }
35
41
  }, async (args)=>{
36
42
  try {
37
43
  const response = await _client.bolnaClient.get(`/agent/${args.agent_id}/executions`, {
@@ -52,11 +58,14 @@ function registerExecutionTools(server) {
52
58
  (0, _client.handleAxiosError)(error, "bolna_list_agent_executions");
53
59
  }
54
60
  });
55
- server.tool("bolna_get_execution_raw_logs", "Fetch raw debug logs for a call execution including LLM prompts, requests, responses, and reasoning", {
56
- execution_id: _zod.z.string().describe("The execution ID whose raw logs to retrieve")
61
+ server.registerTool("bolna_get_execution_raw_logs", {
62
+ description: "Fetch raw debug logs for a call execution including LLM prompts, requests, responses, and reasoning",
63
+ inputSchema: {
64
+ execution_id: _zod.z.string().describe("The execution ID whose raw logs to retrieve")
65
+ }
57
66
  }, async (args)=>{
58
67
  try {
59
- const response = await _client.bolnaClient.get(`/execution/${args.execution_id}/raw-logs`);
68
+ const response = await _client.bolnaClient.get(`/executions/${args.execution_id}/raw-logs`);
60
69
  return {
61
70
  content: [
62
71
  {
@@ -11,9 +11,12 @@ Object.defineProperty(exports, "registerInboundTools", {
11
11
  const _zod = require("zod");
12
12
  const _client = require("../client.js");
13
13
  function registerInboundTools(server) {
14
- server.tool("bolna_set_inbound_agent", "Associate a Bolna agent with a phone number so it automatically handles inbound calls", {
15
- agent_id: _zod.z.string().describe("The agent ID to assign for handling inbound calls"),
16
- phone_number: _zod.z.string().describe("The phone number (E.164 or as stored in Bolna) to configure for inbound")
14
+ server.registerTool("bolna_set_inbound_agent", {
15
+ description: "Associate a Bolna agent with a phone number so it automatically handles inbound calls",
16
+ inputSchema: {
17
+ agent_id: _zod.z.string().describe("The agent ID to assign for handling inbound calls"),
18
+ phone_number: _zod.z.string().describe("The phone number (E.164 or as stored in Bolna) to configure for inbound")
19
+ }
17
20
  }, async (args)=>{
18
21
  try {
19
22
  const response = await _client.bolnaClient.post("/inbound/set-agent", {
@@ -32,8 +35,11 @@ function registerInboundTools(server) {
32
35
  (0, _client.handleAxiosError)(error, "bolna_set_inbound_agent");
33
36
  }
34
37
  });
35
- server.tool("bolna_unlink_inbound_agent", "Remove a Bolna agent from a phone number to disable automated inbound call answering", {
36
- phone_number: _zod.z.string().describe("The phone number to unlink from its current inbound agent")
38
+ server.registerTool("bolna_unlink_inbound_agent", {
39
+ description: "Remove a Bolna agent from a phone number to disable automated inbound call answering",
40
+ inputSchema: {
41
+ phone_number: _zod.z.string().describe("The phone number to unlink from its current inbound agent")
42
+ }
37
43
  }, async (args)=>{
38
44
  try {
39
45
  const response = await _client.bolnaClient.delete("/inbound/unlink", {
@@ -17,16 +17,19 @@ function _interop_require_default(obj) {
17
17
  };
18
18
  }
19
19
  function registerKnowledgebaseTools(server) {
20
- server.tool("bolna_create_knowledgebase", "Create a knowledgebase by uploading a PDF (as base64) or ingesting a web URL", {
21
- source_type: _zod.z.enum([
22
- "file",
23
- "url"
24
- ]).describe('"file" to upload a PDF, "url" to ingest a web page'),
25
- // For file uploads
26
- file_base64: _zod.z.string().optional().describe("Base64-encoded PDF content (required when source_type is 'file')"),
27
- filename: _zod.z.string().optional().default("document.pdf").describe("Filename for the uploaded PDF (e.g. 'hospital_faqs.pdf')"),
28
- // For URL ingestion
29
- url: _zod.z.string().url().optional().describe("Web URL to ingest (required when source_type is 'url')")
20
+ server.registerTool("bolna_create_knowledgebase", {
21
+ description: "Create a knowledgebase by uploading a PDF (as base64) or ingesting a web URL",
22
+ inputSchema: {
23
+ source_type: _zod.z.enum([
24
+ "file",
25
+ "url"
26
+ ]).describe('"file" to upload a PDF, "url" to ingest a web page'),
27
+ // For file uploads
28
+ file_base64: _zod.z.string().optional().describe("Base64-encoded PDF content (required when source_type is 'file')"),
29
+ filename: _zod.z.string().optional().default("document.pdf").describe("Filename for the uploaded PDF (e.g. 'hospital_faqs.pdf')"),
30
+ // For URL ingestion
31
+ url: _zod.z.string().url().optional().describe("Web URL to ingest (required when source_type is 'url')")
32
+ }
30
33
  }, async (args)=>{
31
34
  try {
32
35
  if (args.source_type === "file") {
@@ -77,7 +80,10 @@ function registerKnowledgebaseTools(server) {
77
80
  (0, _client.handleAxiosError)(error, "bolna_create_knowledgebase");
78
81
  }
79
82
  });
80
- server.tool("bolna_list_knowledgebases", "List all knowledgebases in your Bolna account with their status and metadata", {}, async ()=>{
83
+ server.registerTool("bolna_list_knowledgebases", {
84
+ description: "List all knowledgebases in your Bolna account with their status and metadata",
85
+ inputSchema: {}
86
+ }, async ()=>{
81
87
  try {
82
88
  const response = await _client.bolnaClient.get("/knowledgebase");
83
89
  return {
@@ -92,8 +98,11 @@ function registerKnowledgebaseTools(server) {
92
98
  (0, _client.handleAxiosError)(error, "bolna_list_knowledgebases");
93
99
  }
94
100
  });
95
- server.tool("bolna_get_knowledgebase", "Retrieve details of a specific knowledgebase including its ID, filename, status, and creation time", {
96
- knowledgebase_id: _zod.z.string().describe("The ID of the knowledgebase to retrieve")
101
+ server.registerTool("bolna_get_knowledgebase", {
102
+ description: "Retrieve details of a specific knowledgebase including its ID, filename, status, and creation time",
103
+ inputSchema: {
104
+ knowledgebase_id: _zod.z.string().describe("The ID of the knowledgebase to retrieve")
105
+ }
97
106
  }, async (args)=>{
98
107
  try {
99
108
  const response = await _client.bolnaClient.get(`/knowledgebase/${args.knowledgebase_id}`);
@@ -109,8 +118,11 @@ function registerKnowledgebaseTools(server) {
109
118
  (0, _client.handleAxiosError)(error, "bolna_get_knowledgebase");
110
119
  }
111
120
  });
112
- server.tool("bolna_delete_knowledgebase", "Permanently delete a knowledgebase by its ID", {
113
- knowledgebase_id: _zod.z.string().describe("The ID of the knowledgebase to delete")
121
+ server.registerTool("bolna_delete_knowledgebase", {
122
+ description: "Permanently delete a knowledgebase by its ID",
123
+ inputSchema: {
124
+ knowledgebase_id: _zod.z.string().describe("The ID of the knowledgebase to delete")
125
+ }
114
126
  }, async (args)=>{
115
127
  try {
116
128
  const response = await _client.bolnaClient.delete(`/knowledgebase/${args.knowledgebase_id}`);
@@ -11,11 +11,14 @@ Object.defineProperty(exports, "registerPhoneNumberTools", {
11
11
  const _zod = require("zod");
12
12
  const _client = require("../client.js");
13
13
  function registerPhoneNumberTools(server) {
14
- server.tool("bolna_search_phone_numbers", "Search for available phone numbers to purchase, filtered by country, area code, or pattern", {
15
- country_code: _zod.z.string().describe('ISO 3166-1 alpha-2 country code, e.g. "US" for United States, "IN" for India'),
16
- area_code: _zod.z.string().optional().describe("Area/region code to filter available numbers (optional)"),
17
- pattern: _zod.z.string().optional().describe("Digit pattern to match in the phone number, e.g. '555' (optional)"),
18
- limit: _zod.z.number().int().positive().optional().default(5).describe("Maximum number of results to return (default 5)")
14
+ server.registerTool("bolna_search_phone_numbers", {
15
+ description: "Search for available phone numbers to purchase, filtered by country, area code, or pattern",
16
+ inputSchema: {
17
+ country_code: _zod.z.string().describe('ISO 3166-1 alpha-2 country code, e.g. "US" for United States, "IN" for India'),
18
+ area_code: _zod.z.string().optional().describe("Area/region code to filter available numbers (optional)"),
19
+ pattern: _zod.z.string().optional().describe("Digit pattern to match in the phone number, e.g. '555' (optional)"),
20
+ limit: _zod.z.number().int().positive().optional().default(5).describe("Maximum number of results to return (default 5)")
21
+ }
19
22
  }, async (args)=>{
20
23
  try {
21
24
  const params = {
@@ -24,7 +27,7 @@ function registerPhoneNumberTools(server) {
24
27
  };
25
28
  if (args.area_code !== undefined) params.area_code = args.area_code;
26
29
  if (args.pattern !== undefined) params.pattern = args.pattern;
27
- const response = await _client.bolnaClient.get("/phone_numbers/search", {
30
+ const response = await _client.bolnaClient.get("/phone-numbers/search", {
28
31
  params
29
32
  });
30
33
  return {
@@ -39,12 +42,15 @@ function registerPhoneNumberTools(server) {
39
42
  (0, _client.handleAxiosError)(error, "bolna_search_phone_numbers");
40
43
  }
41
44
  });
42
- server.tool("bolna_buy_phone_number", "Purchase a specific phone number for use with Bolna agents", {
43
- phone_number: _zod.z.string().describe("The phone number to purchase in E.164 format"),
44
- telephony_provider: _zod.z.string().describe('Telephony provider to use, e.g. "twilio", "plivo", "vonage"')
45
+ server.registerTool("bolna_buy_phone_number", {
46
+ description: "Purchase a specific phone number for use with Bolna agents",
47
+ inputSchema: {
48
+ phone_number: _zod.z.string().describe("The phone number to purchase in E.164 format"),
49
+ telephony_provider: _zod.z.string().describe('Telephony provider to use, e.g. "twilio", "plivo", "vonage"')
50
+ }
45
51
  }, async (args)=>{
46
52
  try {
47
- const response = await _client.bolnaClient.post("/phone_numbers/buy", {
53
+ const response = await _client.bolnaClient.post("/phone-numbers/buy", {
48
54
  phone_number: args.phone_number,
49
55
  telephony_provider: args.telephony_provider
50
56
  });
@@ -60,9 +66,12 @@ function registerPhoneNumberTools(server) {
60
66
  (0, _client.handleAxiosError)(error, "bolna_buy_phone_number");
61
67
  }
62
68
  });
63
- server.tool("bolna_list_phone_numbers", "List all phone numbers purchased and associated with your Bolna account", {}, async ()=>{
69
+ server.registerTool("bolna_list_phone_numbers", {
70
+ description: "List all phone numbers purchased and associated with your Bolna account",
71
+ inputSchema: {}
72
+ }, async ()=>{
64
73
  try {
65
- const response = await _client.bolnaClient.get("/phone_numbers");
74
+ const response = await _client.bolnaClient.get("/phone-numbers/all");
66
75
  return {
67
76
  content: [
68
77
  {
@@ -75,16 +84,19 @@ function registerPhoneNumberTools(server) {
75
84
  (0, _client.handleAxiosError)(error, "bolna_list_phone_numbers");
76
85
  }
77
86
  });
78
- server.tool("bolna_delete_phone_number", "Delete a purchased phone number to stop billing and permanently remove it from your account", {
79
- phone_number: _zod.z.string().describe("The phone number to delete (as stored in Bolna, E.164 format)")
87
+ server.registerTool("bolna_delete_phone_number", {
88
+ description: "Delete a purchased phone number by its ID to stop billing and permanently remove it from your account",
89
+ inputSchema: {
90
+ phone_number_id: _zod.z.string().describe("The ID of the phone number to delete (UUID, from bolna_list_phone_numbers)")
91
+ }
80
92
  }, async (args)=>{
81
93
  try {
82
- const response = await _client.bolnaClient.delete(`/phone_numbers/${encodeURIComponent(args.phone_number)}`);
94
+ const response = await _client.bolnaClient.delete(`/phone-numbers/${args.phone_number_id}`);
83
95
  return {
84
96
  content: [
85
97
  {
86
98
  type: "text",
87
- text: JSON.stringify(response.data, null, 2) || `Phone number ${args.phone_number} deleted successfully.`
99
+ text: JSON.stringify(response.data, null, 2) || `Phone number ${args.phone_number_id} deleted successfully.`
88
100
  }
89
101
  ]
90
102
  };
@@ -11,9 +11,12 @@ Object.defineProperty(exports, "registerProviderTools", {
11
11
  const _zod = require("zod");
12
12
  const _client = require("../client.js");
13
13
  function registerProviderTools(server) {
14
- server.tool("bolna_add_provider", "Securely add a new provider (e.g. LLM, TTS, STT, telephony) API key to your Bolna account", {
15
- provider_name: _zod.z.string().describe('Provider key name as recognised by Bolna, e.g. "OPENAI_API_KEY", "ELEVENLABS_API_KEY", "DEEPGRAM_API_KEY"'),
16
- provider_value: _zod.z.string().describe("The secret API key or credential value for the provider")
14
+ server.registerTool("bolna_add_provider", {
15
+ description: "Securely add a new provider (e.g. LLM, TTS, STT, telephony) API key to your Bolna account",
16
+ inputSchema: {
17
+ provider_name: _zod.z.string().describe('Provider key name as recognised by Bolna, e.g. "OPENAI_API_KEY", "ELEVENLABS_API_KEY", "DEEPGRAM_API_KEY"'),
18
+ provider_value: _zod.z.string().describe("The secret API key or credential value for the provider")
19
+ }
17
20
  }, async (args)=>{
18
21
  try {
19
22
  const response = await _client.bolnaClient.post("/providers", {
@@ -32,7 +35,10 @@ function registerProviderTools(server) {
32
35
  (0, _client.handleAxiosError)(error, "bolna_add_provider");
33
36
  }
34
37
  });
35
- server.tool("bolna_list_providers", "List all providers (API integrations) configured in your Bolna account", {}, async ()=>{
38
+ server.registerTool("bolna_list_providers", {
39
+ description: "List all providers (API integrations) configured in your Bolna account",
40
+ inputSchema: {}
41
+ }, async ()=>{
36
42
  try {
37
43
  const response = await _client.bolnaClient.get("/providers");
38
44
  return {
@@ -47,8 +53,11 @@ function registerProviderTools(server) {
47
53
  (0, _client.handleAxiosError)(error, "bolna_list_providers");
48
54
  }
49
55
  });
50
- server.tool("bolna_remove_provider", "Remove a previously added provider API key from your Bolna account", {
51
- provider_key_name: _zod.z.string().describe('The provider key name to remove, e.g. "OPENAI_API_KEY"')
56
+ server.registerTool("bolna_remove_provider", {
57
+ description: "Remove a previously added provider API key from your Bolna account",
58
+ inputSchema: {
59
+ provider_key_name: _zod.z.string().describe('The provider key name to remove, e.g. "OPENAI_API_KEY"')
60
+ }
52
61
  }, async (args)=>{
53
62
  try {
54
63
  const response = await _client.bolnaClient.delete(`/providers/${args.provider_key_name}`);