@mcp-consultant-tools/azure-sql 27.0.0 → 28.0.0-beta.3

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 (43) hide show
  1. package/build/index.d.ts +15 -2
  2. package/build/index.d.ts.map +1 -1
  3. package/build/index.js +40 -491
  4. package/build/index.js.map +1 -1
  5. package/build/prompts/index.d.ts +4 -0
  6. package/build/prompts/index.d.ts.map +1 -0
  7. package/build/prompts/index.js +6 -0
  8. package/build/prompts/index.js.map +1 -0
  9. package/build/prompts/templates.d.ts +3 -0
  10. package/build/prompts/templates.d.ts.map +1 -0
  11. package/build/prompts/templates.js +81 -0
  12. package/build/prompts/templates.js.map +1 -0
  13. package/build/services/connection-service.d.ts +132 -0
  14. package/build/services/connection-service.d.ts.map +1 -0
  15. package/build/services/connection-service.js +350 -0
  16. package/build/services/connection-service.js.map +1 -0
  17. package/build/services/index.d.ts +5 -0
  18. package/build/services/index.d.ts.map +1 -0
  19. package/build/services/index.js +3 -0
  20. package/build/services/index.js.map +1 -0
  21. package/build/services/query-service.d.ts +119 -0
  22. package/build/services/query-service.d.ts.map +1 -0
  23. package/build/services/query-service.js +355 -0
  24. package/build/services/query-service.js.map +1 -0
  25. package/build/tools/connection-tools.d.ts +3 -0
  26. package/build/tools/connection-tools.d.ts.map +1 -0
  27. package/build/tools/connection-tools.js +131 -0
  28. package/build/tools/connection-tools.js.map +1 -0
  29. package/build/tools/index.d.ts +5 -0
  30. package/build/tools/index.d.ts.map +1 -0
  31. package/build/tools/index.js +9 -0
  32. package/build/tools/index.js.map +1 -0
  33. package/build/tools/query-tools.d.ts +3 -0
  34. package/build/tools/query-tools.d.ts.map +1 -0
  35. package/build/tools/query-tools.js +271 -0
  36. package/build/tools/query-tools.js.map +1 -0
  37. package/build/types.d.ts +11 -0
  38. package/build/types.d.ts.map +1 -0
  39. package/build/types.js +2 -0
  40. package/build/types.js.map +1 -0
  41. package/build/utils/sql-formatters.d.ts +2 -1
  42. package/build/utils/sql-formatters.d.ts.map +1 -1
  43. package/package.json +1 -1
package/build/index.d.ts CHANGED
@@ -1,4 +1,17 @@
1
1
  #!/usr/bin/env node
2
- import { AzureSqlService } from "./AzureSqlService.js";
3
- export declare function registerAzureSqlTools(server: any, azuresqlService?: AzureSqlService): void;
2
+ /**
3
+ * @mcp-consultant-tools/azure-sql
4
+ *
5
+ * MCP server for Azure SQL Database integration.
6
+ * Entry point: MCP server startup + backward-compatible registerAzureSqlTools().
7
+ */
8
+ /**
9
+ * Register Azure SQL tools and prompts to an MCP server.
10
+ * Backward-compatible API for the meta package.
11
+ */
12
+ export declare function registerAzureSqlTools(server: any): void;
13
+ export { ConnectionService } from './services/connection-service.js';
14
+ export { QueryService } from './services/query-service.js';
15
+ export type { AzureSqlConfig } from './services/connection-service.js';
16
+ export type { ServiceContext } from './types.js';
4
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAKvD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,eAAe,CAAC,EAAE,eAAe,QAmnBnF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAwEH;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAIvD;AAGD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
package/build/index.js CHANGED
@@ -1,15 +1,26 @@
1
1
  #!/usr/bin/env node
2
+ /**
3
+ * @mcp-consultant-tools/azure-sql
4
+ *
5
+ * MCP server for Azure SQL Database integration.
6
+ * Entry point: MCP server startup + backward-compatible registerAzureSqlTools().
7
+ */
2
8
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
9
  import { pathToFileURL } from "node:url";
4
10
  import { realpathSync } from "node:fs";
5
11
  import { createMcpServer, createEnvLoader } from "@mcp-consultant-tools/core";
6
- import { AzureSqlService } from "./AzureSqlService.js";
7
- import { z } from 'zod';
8
- import { formatSqlResultsAsMarkdown, formatTableSchemaAsMarkdown, formatDatabaseOverview } from './utils/sql-formatters.js';
9
- export function registerAzureSqlTools(server, azuresqlService) {
10
- let service = azuresqlService || null;
11
- function getAzureSqlService() {
12
- if (!service) {
12
+ import { ConnectionService } from './services/connection-service.js';
13
+ import { QueryService } from './services/query-service.js';
14
+ import { registerAllTools } from './tools/index.js';
15
+ import { registerAllPrompts } from './prompts/index.js';
16
+ /**
17
+ * Build a ServiceContext from environment variables (lazy service initialization).
18
+ */
19
+ function createServiceContext() {
20
+ let connection = null;
21
+ let query = null;
22
+ function getConnection() {
23
+ if (!connection) {
13
24
  const missingConfig = [];
14
25
  let resources = [];
15
26
  if (process.env.AZURE_SQL_SERVERS) {
@@ -46,494 +57,32 @@ export function registerAzureSqlTools(server, azuresqlService) {
46
57
  queryTimeout: parseInt(process.env.AZURE_SQL_QUERY_TIMEOUT || "30000"),
47
58
  maxResultRows: parseInt(process.env.AZURE_SQL_MAX_RESULT_ROWS || "1000"),
48
59
  };
49
- service = new AzureSqlService(config);
60
+ connection = new ConnectionService(config);
50
61
  console.error("Azure SQL service initialized");
51
62
  }
52
- return service;
63
+ return connection;
53
64
  }
54
- /**
55
- * Helper to build "defaults used" message for tool responses.
56
- * Only shows message when defaults were actually used (parameters were omitted).
57
- */
58
- function buildDefaultsUsedMessage(providedServerId, resolvedServerId, providedDatabase, resolvedDatabase) {
59
- const defaultsUsed = [];
60
- if (!providedServerId)
61
- defaultsUsed.push(`server='${resolvedServerId}'`);
62
- if (resolvedDatabase !== undefined && !providedDatabase)
63
- defaultsUsed.push(`database='${resolvedDatabase}'`);
64
- if (defaultsUsed.length > 0) {
65
- return `\n\nℹ️ Used defaults: ${defaultsUsed.join(', ')}`;
66
- }
67
- return '';
68
- }
69
- // ========================================
70
- // PROMPTS
71
- // ========================================
72
- server.prompt("sql-database-overview", "Get a comprehensive overview of the Azure SQL Database schema", {
73
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
74
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
75
- }, async ({ serverId, database }) => {
76
- const sqlService = getAzureSqlService();
77
- const resolvedServerId = sqlService.resolveServerId(serverId);
78
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
79
- const [tables, views, procedures, triggers, functions] = await Promise.all([
80
- sqlService.listTables(resolvedServerId, resolvedDatabase),
81
- sqlService.listViews(resolvedServerId, resolvedDatabase),
82
- sqlService.listStoredProcedures(resolvedServerId, resolvedDatabase),
83
- sqlService.listTriggers(resolvedServerId, resolvedDatabase),
84
- sqlService.listFunctions(resolvedServerId, resolvedDatabase),
85
- ]);
86
- const formattedOverview = formatDatabaseOverview(tables, views, procedures, triggers, functions);
87
- return {
88
- messages: [
89
- {
90
- role: "user",
91
- content: {
92
- type: "text",
93
- text: formattedOverview,
94
- },
95
- },
96
- ],
97
- };
98
- });
99
- server.prompt("sql-table-details", "Get detailed report for a specific table with columns, indexes, and relationships", {
100
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
101
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
102
- schemaName: z.string().describe("Schema name (e.g., 'dbo')"),
103
- tableName: z.string().describe("Table name"),
104
- }, async ({ serverId, database, schemaName, tableName }) => {
105
- const sqlService = getAzureSqlService();
106
- const resolvedServerId = sqlService.resolveServerId(serverId);
107
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
108
- const schema = await sqlService.getTableSchema(resolvedServerId, resolvedDatabase, schemaName, tableName);
109
- let template = formatTableSchemaAsMarkdown(schema);
110
- template += `\n\n### Sample Query\n\n\`\`\`sql\nSELECT TOP 100 * FROM ${schemaName}.${tableName}\n\`\`\``;
111
- return {
112
- messages: [
113
- {
114
- role: "user",
115
- content: {
116
- type: "text",
117
- text: template,
118
- },
119
- },
120
- ],
121
- };
122
- });
123
- server.prompt("sql-query-results", "Execute a query and return formatted results with column headers", {
124
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
125
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
126
- query: z.string().describe("SELECT query to execute"),
127
- }, async ({ serverId, database, query }) => {
128
- const sqlService = getAzureSqlService();
129
- const resolvedServerId = sqlService.resolveServerId(serverId);
130
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
131
- const result = await sqlService.executeSelectQuery(resolvedServerId, resolvedDatabase, query);
132
- let template = `## Query Results\n\n`;
133
- template += `**Query:**\n\`\`\`sql\n${query}\n\`\`\`\n\n`;
134
- template += `**Results:**\n${formatSqlResultsAsMarkdown(result)}\n\n`;
135
- template += `**Row Count:** ${result.rowCount}`;
136
- if (result.truncated) {
137
- template += ` (truncated)`;
138
- }
139
- return {
140
- messages: [
141
- {
142
- role: "user",
143
- content: {
144
- type: "text",
145
- text: template,
146
- },
147
- },
148
- ],
149
- };
150
- });
151
- // ========================================
152
- // TOOLS
153
- // ========================================
154
- server.tool("sql-list-servers", `List all configured SQL servers.
155
- ⚠️ SKIP THIS for most queries. You DO NOT need to call this before querying - defaults are automatic.
156
- Only use this tool if: (1) you got an explicit error about server not found, OR (2) user specifically asks about available servers.`, {}, async () => {
157
- try {
158
- const sqlService = getAzureSqlService();
159
- const servers = await sqlService.listServers();
160
- return {
161
- content: [
162
- {
163
- type: "text",
164
- text: JSON.stringify(servers, null, 2),
165
- },
166
- ],
167
- };
168
- }
169
- catch (error) {
170
- return {
171
- content: [
172
- {
173
- type: "text",
174
- text: `Error listing servers: ${error.message}`,
175
- },
176
- ],
177
- isError: true,
178
- };
179
- }
180
- });
181
- server.tool("sql-list-databases", `List databases on a SQL server.
182
- ⚠️ SKIP THIS for most queries. You DO NOT need to call this before querying - defaults are automatic.
183
- Only use this tool if: (1) you got an explicit error about database not found, OR (2) user specifically asks about available databases.`, {
184
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
185
- }, async ({ serverId }) => {
186
- try {
187
- const sqlService = getAzureSqlService();
188
- const resolvedServerId = sqlService.resolveServerId(serverId);
189
- const databases = await sqlService.listDatabases(resolvedServerId);
190
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId);
191
- return {
192
- content: [
193
- {
194
- type: "text",
195
- text: JSON.stringify(databases, null, 2) + defaultsMsg,
196
- },
197
- ],
198
- };
199
- }
200
- catch (error) {
201
- return {
202
- content: [
203
- {
204
- type: "text",
205
- text: `Error listing databases: ${error.message}`,
206
- },
207
- ],
208
- isError: true,
209
- };
210
- }
211
- });
212
- server.tool("sql-get-defaults", `Get the default server and database configuration.
213
- ⚠️ SKIP THIS - you do NOT need to call this before querying. Just call sql-execute-query with only the query parameter.
214
- Only use this if: user specifically asks what server/database is configured, or you need to confirm defaults after an error.`, {}, async () => {
215
- try {
216
- const sqlService = getAzureSqlService();
217
- const defaults = sqlService.getDefaultConfiguration();
218
- return {
219
- content: [
220
- {
221
- type: "text",
222
- text: JSON.stringify(defaults, null, 2),
223
- },
224
- ],
225
- };
226
- }
227
- catch (error) {
228
- return {
229
- content: [
230
- {
231
- type: "text",
232
- text: `Error getting defaults: ${error.message}`,
233
- },
234
- ],
235
- isError: true,
236
- };
237
- }
238
- });
239
- server.tool("sql-test-connection", "Test SQL Server connectivity and return connection information", {
240
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
241
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
242
- }, async ({ serverId, database }) => {
243
- try {
244
- const sqlService = getAzureSqlService();
245
- const resolvedServerId = sqlService.resolveServerId(serverId);
246
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
247
- const result = await sqlService.testConnection(resolvedServerId, resolvedDatabase);
248
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
249
- return {
250
- content: [
251
- {
252
- type: "text",
253
- text: JSON.stringify(result, null, 2) + defaultsMsg,
254
- },
255
- ],
256
- };
257
- }
258
- catch (error) {
259
- return {
260
- content: [
261
- {
262
- type: "text",
263
- text: `Error testing connection: ${error.message}`,
264
- },
265
- ],
266
- isError: true,
267
- };
268
- }
269
- });
270
- server.tool("sql-list-tables", "List all user tables in the database with row counts and sizes", {
271
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
272
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
273
- }, async ({ serverId, database }) => {
274
- try {
275
- const sqlService = getAzureSqlService();
276
- const resolvedServerId = sqlService.resolveServerId(serverId);
277
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
278
- const tables = await sqlService.listTables(resolvedServerId, resolvedDatabase);
279
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
280
- return {
281
- content: [
282
- {
283
- type: "text",
284
- text: JSON.stringify(tables, null, 2) + defaultsMsg,
285
- },
286
- ],
287
- };
288
- }
289
- catch (error) {
290
- return {
291
- content: [
292
- {
293
- type: "text",
294
- text: `Error listing tables: ${error.message}`,
295
- },
296
- ],
297
- isError: true,
298
- };
299
- }
300
- });
301
- server.tool("sql-list-views", "List all views in the database", {
302
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
303
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
304
- }, async ({ serverId, database }) => {
305
- try {
306
- const sqlService = getAzureSqlService();
307
- const resolvedServerId = sqlService.resolveServerId(serverId);
308
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
309
- const views = await sqlService.listViews(resolvedServerId, resolvedDatabase);
310
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
311
- return {
312
- content: [
313
- {
314
- type: "text",
315
- text: JSON.stringify(views, null, 2) + defaultsMsg,
316
- },
317
- ],
318
- };
319
- }
320
- catch (error) {
321
- return {
322
- content: [
323
- {
324
- type: "text",
325
- text: `Error listing views: ${error.message}`,
326
- },
327
- ],
328
- isError: true,
329
- };
330
- }
331
- });
332
- server.tool("sql-list-sprocs", "List all stored procedures in the Azure SQL Database", {
333
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
334
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
335
- }, async ({ serverId, database }) => {
336
- try {
337
- const sqlService = getAzureSqlService();
338
- const resolvedServerId = sqlService.resolveServerId(serverId);
339
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
340
- const procedures = await sqlService.listStoredProcedures(resolvedServerId, resolvedDatabase);
341
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
342
- return {
343
- content: [
344
- {
345
- type: "text",
346
- text: JSON.stringify(procedures, null, 2) + defaultsMsg,
347
- },
348
- ],
349
- };
350
- }
351
- catch (error) {
352
- return {
353
- content: [
354
- {
355
- type: "text",
356
- text: `Error listing stored procedures: ${error.message}`,
357
- },
358
- ],
359
- isError: true,
360
- };
361
- }
362
- });
363
- server.tool("sql-list-triggers", "List all database triggers in the Azure SQL Database", {
364
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
365
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
366
- }, async ({ serverId, database }) => {
367
- try {
368
- const sqlService = getAzureSqlService();
369
- const resolvedServerId = sqlService.resolveServerId(serverId);
370
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
371
- const triggers = await sqlService.listTriggers(resolvedServerId, resolvedDatabase);
372
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
373
- return {
374
- content: [
375
- {
376
- type: "text",
377
- text: JSON.stringify(triggers, null, 2) + defaultsMsg,
378
- },
379
- ],
380
- };
381
- }
382
- catch (error) {
383
- return {
384
- content: [
385
- {
386
- type: "text",
387
- text: `Error listing triggers: ${error.message}`,
388
- },
389
- ],
390
- isError: true,
391
- };
392
- }
393
- });
394
- server.tool("sql-list-functions", "List all user-defined functions in the Azure SQL Database", {
395
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
396
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
397
- }, async ({ serverId, database }) => {
398
- try {
399
- const sqlService = getAzureSqlService();
400
- const resolvedServerId = sqlService.resolveServerId(serverId);
401
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
402
- const functions = await sqlService.listFunctions(resolvedServerId, resolvedDatabase);
403
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
404
- return {
405
- content: [
406
- {
407
- type: "text",
408
- text: JSON.stringify(functions, null, 2) + defaultsMsg,
409
- },
410
- ],
411
- };
412
- }
413
- catch (error) {
414
- return {
415
- content: [
416
- {
417
- type: "text",
418
- text: `Error listing functions: ${error.message}`,
419
- },
420
- ],
421
- isError: true,
422
- };
423
- }
424
- });
425
- server.tool("sql-get-table-schema", "Get detailed schema information for a table including columns, indexes, and foreign keys", {
426
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
427
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
428
- schemaName: z.string().describe("Schema name (e.g., 'dbo')"),
429
- tableName: z.string().describe("Table name (e.g., 'Users')"),
430
- }, async ({ serverId, database, schemaName, tableName }) => {
431
- try {
432
- const sqlService = getAzureSqlService();
433
- const resolvedServerId = sqlService.resolveServerId(serverId);
434
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
435
- const schema = await sqlService.getTableSchema(resolvedServerId, resolvedDatabase, schemaName, tableName);
436
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
437
- return {
438
- content: [
439
- {
440
- type: "text",
441
- text: JSON.stringify(schema, null, 2) + defaultsMsg,
442
- },
443
- ],
444
- };
445
- }
446
- catch (error) {
447
- return {
448
- content: [
449
- {
450
- type: "text",
451
- text: `Error getting table schema: ${error.message}`,
452
- },
453
- ],
454
- isError: true,
455
- };
456
- }
457
- });
458
- server.tool("sql-get-obj-def", "Get the SQL definition for a view, stored procedure, function, or trigger", {
459
- serverId: z.string().optional().describe("⚠️ OMIT to use default server. DO NOT GUESS."),
460
- database: z.string().optional().describe("⚠️ OMIT to use default database. DO NOT GUESS."),
461
- schemaName: z.string().describe("Schema name (e.g., 'dbo')"),
462
- objectName: z.string().describe("Object name"),
463
- objectType: z.enum(['VIEW', 'PROCEDURE', 'FUNCTION', 'TRIGGER']).describe("Object type"),
464
- }, async ({ serverId, database, schemaName, objectName, objectType }) => {
465
- try {
466
- const sqlService = getAzureSqlService();
467
- const resolvedServerId = sqlService.resolveServerId(serverId);
468
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
469
- const definition = await sqlService.getObjectDefinition(resolvedServerId, resolvedDatabase, schemaName, objectName, objectType);
470
- const defaultsMsg = buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
471
- return {
472
- content: [
473
- {
474
- type: "text",
475
- text: JSON.stringify(definition, null, 2) + defaultsMsg,
476
- },
477
- ],
478
- };
479
- }
480
- catch (error) {
481
- return {
482
- content: [
483
- {
484
- type: "text",
485
- text: `Error getting object definition: ${error.message}`,
486
- },
487
- ],
488
- isError: true,
489
- };
490
- }
491
- });
492
- server.tool("sql-execute-query", `Execute a SELECT query against Azure SQL Database.
493
- ⚠️ IMPORTANT: DO NOT GUESS serverId or database values. If you don't know them, OMIT THEM ENTIRELY.
494
- The server has pre-configured defaults - just provide the query parameter and defaults will be applied automatically.
495
- Example: sql-execute-query(query: "SELECT * FROM dbo.Users") - serverId and database omitted, defaults used.`, {
496
- serverId: z.string().optional().describe("⚠️ OMIT unless switching servers. DO NOT GUESS - omitting uses the pre-configured default server."),
497
- database: z.string().optional().describe("⚠️ OMIT unless switching databases. DO NOT GUESS - omitting uses the pre-configured default database."),
498
- query: z.string().describe("SELECT query to execute (e.g., 'SELECT TOP 10 * FROM dbo.Users WHERE IsActive = 1')"),
499
- }, async ({ serverId, database, query }) => {
500
- try {
501
- const sqlService = getAzureSqlService();
502
- // Resolve defaults for optional parameters
503
- const resolvedServerId = sqlService.resolveServerId(serverId);
504
- const resolvedDatabase = sqlService.resolveDatabase(resolvedServerId, database);
505
- const result = await sqlService.executeSelectQuery(resolvedServerId, resolvedDatabase, query);
506
- let text = JSON.stringify(result, null, 2);
507
- if (result.truncated) {
508
- text += `\n\n⚠️ WARNING: Results truncated to ${result.rowCount} rows. Add WHERE clause to filter results.`;
509
- }
510
- // Add context about resolved defaults if parameters were omitted
511
- text += buildDefaultsUsedMessage(serverId, resolvedServerId, database, resolvedDatabase);
512
- return {
513
- content: [
514
- {
515
- type: "text",
516
- text,
517
- },
518
- ],
519
- };
520
- }
521
- catch (error) {
522
- return {
523
- content: [
524
- {
525
- type: "text",
526
- text: `Error executing query: ${error.message}`,
527
- },
528
- ],
529
- isError: true,
530
- };
531
- }
532
- });
533
- console.error("Azure SQL tools registered: 12 tools, 3 prompts");
65
+ return {
66
+ get connection() { return getConnection(); },
67
+ get query() { return query ??= new QueryService(getConnection()); },
68
+ };
69
+ }
70
+ /**
71
+ * Register Azure SQL tools and prompts to an MCP server.
72
+ * Backward-compatible API for the meta package.
73
+ */
74
+ export function registerAzureSqlTools(server) {
75
+ const ctx = createServiceContext();
76
+ registerAllTools(server, ctx);
77
+ registerAllPrompts(server, ctx);
534
78
  }
535
- // CLI entry point (standalone execution)
536
- // Uses realpathSync to resolve symlinks created by npx
79
+ // Backward-compatible exports
80
+ export { ConnectionService } from './services/connection-service.js';
81
+ export { QueryService } from './services/query-service.js';
82
+ /**
83
+ * Standalone CLI server (when run directly)
84
+ * Uses realpathSync to resolve symlinks created by npx
85
+ */
537
86
  if (import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href) {
538
87
  const loadEnv = createEnvLoader();
539
88
  loadEnv();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAwD,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAElL,MAAM,UAAU,qBAAqB,CAAC,MAAW,EAAE,eAAiC;IAClF,IAAI,OAAO,GAA2B,eAAe,IAAI,IAAI,CAAC;IAE9D,SAAS,kBAAkB;QACzB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,aAAa,GAAa,EAAE,CAAC;YACnC,IAAI,SAAS,GAAU,EAAE,CAAC;YAE1B,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;gBAClC,IAAI,CAAC;oBACH,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;gBACxD,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;gBAC5D,CAAC;YACH,CAAC;iBA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GAAG,KAAK,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,EAAE,CAAC;IAClC,OAAO,EAAE,CAAC;IAEV,MAAM,MAAM,GAAG,eAAe,CAAC;QAC7B,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,OAAO;QAChB,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KACzC,CAAC,CAAC;IAEH,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;QAC/C,OAAO,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;QAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ServiceContext } from '../types.js';
2
+ export declare function registerAllPrompts(server: any, ctx: ServiceContext): void;
3
+ export { registerSqlPrompts } from './templates.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAEzE;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { registerSqlPrompts } from './templates.js';
2
+ export function registerAllPrompts(server, ctx) {
3
+ registerSqlPrompts(server, ctx);
4
+ }
5
+ export { registerSqlPrompts } from './templates.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,UAAU,kBAAkB,CAAC,MAAW,EAAE,GAAmB;IACjE,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ServiceContext } from '../types.js';
2
+ export declare function registerSqlPrompts(server: any, ctx: ServiceContext): void;
3
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/prompts/templates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAOlD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAsGzE"}