mcp-quickbase 2.0.5 → 2.2.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.
- package/.crewchief/runs/state.json +3 -0
- package/.mcp.json +6 -32
- package/.sdd/tickets/RELS_relationship-management/README.md +98 -0
- package/.sdd/tickets/RELS_relationship-management/planning/analysis.md +190 -0
- package/.sdd/tickets/RELS_relationship-management/planning/architecture.md +413 -0
- package/.sdd/tickets/RELS_relationship-management/planning/plan.md +177 -0
- package/.sdd/tickets/RELS_relationship-management/planning/quality-strategy.md +335 -0
- package/.sdd/tickets/RELS_relationship-management/planning/review-updates.md +95 -0
- package/.sdd/tickets/RELS_relationship-management/planning/security-review.md +213 -0
- package/.sdd/tickets/RELS_relationship-management/planning/ticket-review.md +885 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.1001_domain-setup.md +96 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.1002_get-relationships-tool.md +142 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.1003_register-phase1-tools.md +105 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.2001_create-relationship-tool.md +151 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.2002_update-relationship-tool.md +145 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.3001_delete-relationship-tool.md +154 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.4001_integration-testing.md +159 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.4002_final-verification.md +182 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS_TASK_INDEX.md +179 -0
- package/crewchief.config.js +31 -0
- package/dist/client/quickbase.d.ts +7 -2
- package/dist/client/quickbase.js +64 -51
- package/dist/client/quickbase.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/server.d.ts +3 -3
- package/dist/mcp/server.js +21 -17
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp-stdio-server.js +64 -49
- package/dist/mcp-stdio-server.js.map +1 -1
- package/dist/server.js +84 -83
- package/dist/server.js.map +1 -1
- package/dist/tools/apps/create_app.d.ts +2 -2
- package/dist/tools/apps/create_app.js +23 -23
- package/dist/tools/apps/create_app.js.map +1 -1
- package/dist/tools/apps/index.d.ts +4 -4
- package/dist/tools/apps/index.js +3 -3
- package/dist/tools/apps/list_tables.d.ts +7 -7
- package/dist/tools/apps/list_tables.js +28 -27
- package/dist/tools/apps/list_tables.js.map +1 -1
- package/dist/tools/apps/update_app.d.ts +2 -2
- package/dist/tools/apps/update_app.js +28 -26
- package/dist/tools/apps/update_app.js.map +1 -1
- package/dist/tools/base.d.ts +3 -3
- package/dist/tools/base.js +7 -7
- package/dist/tools/base.js.map +1 -1
- package/dist/tools/configure_cache.d.ts +3 -3
- package/dist/tools/configure_cache.js +16 -16
- package/dist/tools/configure_cache.js.map +1 -1
- package/dist/tools/fields/create_field.d.ts +8 -7
- package/dist/tools/fields/create_field.js +39 -29
- package/dist/tools/fields/create_field.js.map +1 -1
- package/dist/tools/fields/delete_field.d.ts +79 -0
- package/dist/tools/fields/delete_field.js +105 -0
- package/dist/tools/fields/delete_field.js.map +1 -0
- package/dist/tools/fields/get_field.d.ts +91 -0
- package/dist/tools/fields/get_field.js +82 -0
- package/dist/tools/fields/get_field.js.map +1 -0
- package/dist/tools/fields/index.d.ts +5 -3
- package/dist/tools/fields/index.js +11 -5
- package/dist/tools/fields/index.js.map +1 -1
- package/dist/tools/fields/update_field.d.ts +7 -15
- package/dist/tools/fields/update_field.js +39 -38
- package/dist/tools/fields/update_field.js.map +1 -1
- package/dist/tools/files/download_file.d.ts +2 -2
- package/dist/tools/files/download_file.js +35 -35
- package/dist/tools/files/download_file.js.map +1 -1
- package/dist/tools/files/index.d.ts +3 -3
- package/dist/tools/files/index.js +3 -3
- package/dist/tools/files/upload_file.d.ts +2 -2
- package/dist/tools/files/upload_file.js +52 -44
- package/dist/tools/files/upload_file.js.map +1 -1
- package/dist/tools/index.d.ts +13 -12
- package/dist/tools/index.js +6 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/records/bulk_create_records.d.ts +2 -2
- package/dist/tools/records/bulk_create_records.js +28 -28
- package/dist/tools/records/bulk_create_records.js.map +1 -1
- package/dist/tools/records/bulk_update_records.d.ts +2 -2
- package/dist/tools/records/bulk_update_records.js +27 -27
- package/dist/tools/records/bulk_update_records.js.map +1 -1
- package/dist/tools/records/create_record.d.ts +2 -2
- package/dist/tools/records/create_record.js +40 -40
- package/dist/tools/records/create_record.js.map +1 -1
- package/dist/tools/records/index.d.ts +6 -6
- package/dist/tools/records/index.js +3 -3
- package/dist/tools/records/query_records.d.ts +3 -3
- package/dist/tools/records/query_records.js +82 -78
- package/dist/tools/records/query_records.js.map +1 -1
- package/dist/tools/records/update_record.d.ts +2 -2
- package/dist/tools/records/update_record.js +31 -29
- package/dist/tools/records/update_record.js.map +1 -1
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.js +1 -1
- package/dist/tools/relationships/create_relationship.d.ts +150 -0
- package/dist/tools/relationships/create_relationship.js +181 -0
- package/dist/tools/relationships/create_relationship.js.map +1 -0
- package/dist/tools/relationships/delete_relationship.d.ts +66 -0
- package/dist/tools/relationships/delete_relationship.js +85 -0
- package/dist/tools/relationships/delete_relationship.js.map +1 -0
- package/dist/tools/relationships/get_relationships.d.ts +126 -0
- package/dist/tools/relationships/get_relationships.js +126 -0
- package/dist/tools/relationships/get_relationships.js.map +1 -0
- package/dist/tools/relationships/index.d.ts +14 -0
- package/dist/tools/relationships/index.js +37 -0
- package/dist/tools/relationships/index.js.map +1 -0
- package/dist/tools/relationships/update_relationship.d.ts +139 -0
- package/dist/tools/relationships/update_relationship.js +168 -0
- package/dist/tools/relationships/update_relationship.js.map +1 -0
- package/dist/tools/reports/index.d.ts +2 -2
- package/dist/tools/reports/index.js +3 -3
- package/dist/tools/reports/run_report.d.ts +3 -3
- package/dist/tools/reports/run_report.js +29 -29
- package/dist/tools/reports/run_report.js.map +1 -1
- package/dist/tools/tables/create_table.d.ts +2 -49
- package/dist/tools/tables/create_table.js +26 -49
- package/dist/tools/tables/create_table.js.map +1 -1
- package/dist/tools/tables/get_table_fields.d.ts +2 -2
- package/dist/tools/tables/get_table_fields.js +25 -25
- package/dist/tools/tables/get_table_fields.js.map +1 -1
- package/dist/tools/tables/index.d.ts +4 -4
- package/dist/tools/tables/index.js +3 -3
- package/dist/tools/tables/update_table.d.ts +2 -2
- package/dist/tools/tables/update_table.js +28 -26
- package/dist/tools/tables/update_table.js.map +1 -1
- package/dist/tools/test_connection.d.ts +2 -2
- package/dist/tools/test_connection.js +28 -28
- package/dist/tools/test_connection.js.map +1 -1
- package/dist/types/api.d.ts +1 -1
- package/dist/types/mcp.d.ts +1 -1
- package/dist/utils/cache.js +16 -16
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/file.js +44 -40
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/logger.js +30 -28
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/retry.js +10 -10
- package/dist/utils/retry.js.map +1 -1
- package/dist/utils/validation.d.ts +1 -1
- package/dist/utils/validation.js +39 -36
- package/dist/utils/validation.js.map +1 -1
- package/docs/README.md +6 -0
- package/docs/future-improvements.md +33 -0
- package/docs/migration-guide.md +160 -0
- package/docs/release-notes.md +89 -0
- package/package.json +5 -4
- /package/{HARDENING_SUMMARY.md → docs/hardening-summary.md} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BaseTool } from
|
|
2
|
-
import { QuickbaseClient } from
|
|
1
|
+
import { BaseTool } from "../base";
|
|
2
|
+
import { QuickbaseClient } from "../../client/quickbase";
|
|
3
3
|
interface RunReportParams {
|
|
4
4
|
report_id: string;
|
|
5
5
|
options?: {
|
|
6
6
|
filters?: Record<string, any>;
|
|
7
|
-
format?:
|
|
7
|
+
format?: "JSON" | "CSV" | "XML";
|
|
8
8
|
groupBy?: string[];
|
|
9
9
|
sortBy?: string[];
|
|
10
10
|
skip?: number;
|
|
@@ -3,66 +3,66 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RunReportTool = void 0;
|
|
4
4
|
const base_1 = require("../base");
|
|
5
5
|
const logger_1 = require("../../utils/logger");
|
|
6
|
-
const logger = (0, logger_1.createLogger)(
|
|
6
|
+
const logger = (0, logger_1.createLogger)("RunReportTool");
|
|
7
7
|
/**
|
|
8
8
|
* Tool for executing Quickbase reports
|
|
9
9
|
*/
|
|
10
10
|
class RunReportTool extends base_1.BaseTool {
|
|
11
11
|
constructor(client) {
|
|
12
12
|
super(client);
|
|
13
|
-
this.name =
|
|
14
|
-
this.description =
|
|
13
|
+
this.name = "run_report";
|
|
14
|
+
this.description = "Execute a Quickbase report with optional filters and parameters";
|
|
15
15
|
this.paramSchema = {
|
|
16
|
-
type:
|
|
16
|
+
type: "object",
|
|
17
17
|
properties: {
|
|
18
18
|
report_id: {
|
|
19
|
-
type:
|
|
20
|
-
description:
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "The ID of the report to run",
|
|
21
21
|
},
|
|
22
22
|
options: {
|
|
23
|
-
type:
|
|
24
|
-
description:
|
|
23
|
+
type: "object",
|
|
24
|
+
description: "Additional options for the report execution",
|
|
25
25
|
properties: {
|
|
26
26
|
filters: {
|
|
27
|
-
type:
|
|
28
|
-
description:
|
|
27
|
+
type: "object",
|
|
28
|
+
description: "Filter conditions for the report",
|
|
29
29
|
},
|
|
30
30
|
format: {
|
|
31
|
-
type:
|
|
32
|
-
description:
|
|
33
|
-
enum: [
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Output format for the report",
|
|
33
|
+
enum: ["JSON", "CSV", "XML"],
|
|
34
34
|
},
|
|
35
35
|
groupBy: {
|
|
36
|
-
type:
|
|
37
|
-
description:
|
|
38
|
-
items: { type:
|
|
36
|
+
type: "array",
|
|
37
|
+
description: "Fields to group results by",
|
|
38
|
+
items: { type: "string" },
|
|
39
39
|
},
|
|
40
40
|
sortBy: {
|
|
41
|
-
type:
|
|
42
|
-
description:
|
|
43
|
-
items: { type:
|
|
41
|
+
type: "array",
|
|
42
|
+
description: "Fields to sort results by",
|
|
43
|
+
items: { type: "string" },
|
|
44
44
|
},
|
|
45
45
|
skip: {
|
|
46
|
-
type:
|
|
47
|
-
description:
|
|
46
|
+
type: "number",
|
|
47
|
+
description: "Number of records to skip",
|
|
48
48
|
},
|
|
49
49
|
top: {
|
|
50
|
-
type:
|
|
51
|
-
description:
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
50
|
+
type: "number",
|
|
51
|
+
description: "Number of records to retrieve",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
55
|
},
|
|
56
|
-
required: [
|
|
56
|
+
required: ["report_id"],
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
async run(params) {
|
|
60
60
|
const { report_id, options = {} } = params;
|
|
61
61
|
logger.info(`Running report: ${report_id}`);
|
|
62
62
|
const response = await this.client.request({
|
|
63
|
-
method:
|
|
63
|
+
method: "POST",
|
|
64
64
|
path: `/reports/${report_id}/run`,
|
|
65
|
-
body: options
|
|
65
|
+
body: options,
|
|
66
66
|
});
|
|
67
67
|
logger.info(`Report executed successfully: ${report_id}`);
|
|
68
68
|
return response;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_report.js","sourceRoot":"","sources":["../../../src/tools/reports/run_report.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEnC,+CAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,eAAe,CAAC,CAAC;AAc7C;;GAEG;AACH,MAAa,aAAc,SAAQ,eAA8B;
|
|
1
|
+
{"version":3,"file":"run_report.js","sourceRoot":"","sources":["../../../src/tools/reports/run_report.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEnC,+CAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,eAAe,CAAC,CAAC;AAc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AI,CAAC,mBAAmB,SAAS,EAAE,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACzC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,YAAY,SAAS,MAAM;YACjC,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;QAE1D,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAnED,sCAmEC"}
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
import { BaseTool } from
|
|
2
|
-
import { QuickbaseClient } from
|
|
3
|
-
/**
|
|
4
|
-
* Field definition for table creation
|
|
5
|
-
*/
|
|
6
|
-
export interface FieldDefinition {
|
|
7
|
-
/**
|
|
8
|
-
* Name of the field
|
|
9
|
-
*/
|
|
10
|
-
name: string;
|
|
11
|
-
/**
|
|
12
|
-
* Type of the field (e.g., text, number, date)
|
|
13
|
-
*/
|
|
14
|
-
type: string;
|
|
15
|
-
/**
|
|
16
|
-
* Description of the field
|
|
17
|
-
*/
|
|
18
|
-
description?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Additional field properties
|
|
21
|
-
*/
|
|
22
|
-
properties?: Record<string, any>;
|
|
23
|
-
}
|
|
1
|
+
import { BaseTool } from "../base";
|
|
2
|
+
import { QuickbaseClient } from "../../client/quickbase";
|
|
24
3
|
/**
|
|
25
4
|
* Parameters for create_table tool
|
|
26
5
|
*/
|
|
@@ -37,10 +16,6 @@ export interface CreateTableParams {
|
|
|
37
16
|
* Description of the table
|
|
38
17
|
*/
|
|
39
18
|
description?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Initial fields to create with the table
|
|
42
|
-
*/
|
|
43
|
-
fields?: FieldDefinition[];
|
|
44
19
|
/**
|
|
45
20
|
* Additional options for table creation
|
|
46
21
|
*/
|
|
@@ -99,28 +74,6 @@ export declare class CreateTableTool extends BaseTool<CreateTableParams, CreateT
|
|
|
99
74
|
type: string;
|
|
100
75
|
description: string;
|
|
101
76
|
};
|
|
102
|
-
fields: {
|
|
103
|
-
type: string;
|
|
104
|
-
description: string;
|
|
105
|
-
items: {
|
|
106
|
-
type: string;
|
|
107
|
-
properties: {
|
|
108
|
-
name: {
|
|
109
|
-
type: string;
|
|
110
|
-
};
|
|
111
|
-
type: {
|
|
112
|
-
type: string;
|
|
113
|
-
};
|
|
114
|
-
description: {
|
|
115
|
-
type: string;
|
|
116
|
-
};
|
|
117
|
-
properties: {
|
|
118
|
-
type: string;
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
required: string[];
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
77
|
options: {
|
|
125
78
|
type: string;
|
|
126
79
|
description: string;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CreateTableTool = void 0;
|
|
4
4
|
const base_1 = require("../base");
|
|
5
5
|
const logger_1 = require("../../utils/logger");
|
|
6
|
-
const logger = (0, logger_1.createLogger)(
|
|
6
|
+
const logger = (0, logger_1.createLogger)("CreateTableTool");
|
|
7
7
|
/**
|
|
8
8
|
* Tool for creating a new table in a Quickbase application
|
|
9
9
|
*/
|
|
@@ -14,46 +14,32 @@ class CreateTableTool extends base_1.BaseTool {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(client) {
|
|
16
16
|
super(client);
|
|
17
|
-
this.name =
|
|
18
|
-
this.description =
|
|
17
|
+
this.name = "create_table";
|
|
18
|
+
this.description = "Creates a new table in a Quickbase application. IMPORTANT: This only creates the table structure with system fields. To add custom fields, use the create_field tool after creating the table.";
|
|
19
19
|
/**
|
|
20
20
|
* Parameter schema for create_table
|
|
21
21
|
*/
|
|
22
22
|
this.paramSchema = {
|
|
23
|
-
type:
|
|
23
|
+
type: "object",
|
|
24
24
|
properties: {
|
|
25
25
|
app_id: {
|
|
26
|
-
type:
|
|
27
|
-
description:
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "The ID of the application",
|
|
28
28
|
},
|
|
29
29
|
name: {
|
|
30
|
-
type:
|
|
31
|
-
description:
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Name of the table",
|
|
32
32
|
},
|
|
33
33
|
description: {
|
|
34
|
-
type:
|
|
35
|
-
description:
|
|
36
|
-
},
|
|
37
|
-
fields: {
|
|
38
|
-
type: 'array',
|
|
39
|
-
description: 'List of field definitions',
|
|
40
|
-
items: {
|
|
41
|
-
type: 'object',
|
|
42
|
-
properties: {
|
|
43
|
-
name: { type: 'string' },
|
|
44
|
-
type: { type: 'string' },
|
|
45
|
-
description: { type: 'string' },
|
|
46
|
-
properties: { type: 'object' }
|
|
47
|
-
},
|
|
48
|
-
required: ['name', 'type']
|
|
49
|
-
}
|
|
34
|
+
type: "string",
|
|
35
|
+
description: "Description of the table",
|
|
50
36
|
},
|
|
51
37
|
options: {
|
|
52
|
-
type:
|
|
53
|
-
description:
|
|
54
|
-
}
|
|
38
|
+
type: "object",
|
|
39
|
+
description: "Additional options for table creation",
|
|
40
|
+
},
|
|
55
41
|
},
|
|
56
|
-
required: [
|
|
42
|
+
required: ["app_id", "name"],
|
|
57
43
|
};
|
|
58
44
|
}
|
|
59
45
|
/**
|
|
@@ -62,48 +48,39 @@ class CreateTableTool extends base_1.BaseTool {
|
|
|
62
48
|
* @returns Created table details
|
|
63
49
|
*/
|
|
64
50
|
async run(params) {
|
|
65
|
-
logger.info(
|
|
51
|
+
logger.info("Creating new table in Quickbase application", {
|
|
66
52
|
appId: params.app_id,
|
|
67
|
-
tableName: params.name
|
|
53
|
+
tableName: params.name,
|
|
68
54
|
});
|
|
69
|
-
const { app_id, name, description,
|
|
55
|
+
const { app_id, name, description, options } = params;
|
|
70
56
|
// Prepare request body
|
|
71
57
|
const body = {
|
|
72
58
|
name,
|
|
73
|
-
description: description ||
|
|
59
|
+
description: description || "",
|
|
74
60
|
};
|
|
75
|
-
// Add fields if provided
|
|
76
|
-
if (fields && fields.length > 0) {
|
|
77
|
-
body.fields = fields.map(field => ({
|
|
78
|
-
fieldType: field.type,
|
|
79
|
-
label: field.name,
|
|
80
|
-
description: field.description || '',
|
|
81
|
-
...(field.properties || {})
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
61
|
// Add any additional options
|
|
85
62
|
if (options) {
|
|
86
63
|
Object.assign(body, options);
|
|
87
64
|
}
|
|
88
65
|
// Create the table
|
|
89
66
|
const response = await this.client.request({
|
|
90
|
-
method:
|
|
67
|
+
method: "POST",
|
|
91
68
|
path: `/tables?appId=${app_id}`,
|
|
92
|
-
body
|
|
69
|
+
body,
|
|
93
70
|
});
|
|
94
71
|
if (!response.success || !response.data) {
|
|
95
|
-
logger.error(
|
|
72
|
+
logger.error("Failed to create table", {
|
|
96
73
|
error: response.error,
|
|
97
74
|
appId: app_id,
|
|
98
|
-
tableName: name
|
|
75
|
+
tableName: name,
|
|
99
76
|
});
|
|
100
|
-
throw new Error(response.error?.message ||
|
|
77
|
+
throw new Error(response.error?.message || "Failed to create table");
|
|
101
78
|
}
|
|
102
79
|
const table = response.data;
|
|
103
|
-
logger.info(
|
|
80
|
+
logger.info("Successfully created table", {
|
|
104
81
|
tableId: table.id,
|
|
105
82
|
appId: app_id,
|
|
106
|
-
tableName: table.name
|
|
83
|
+
tableName: table.name,
|
|
107
84
|
});
|
|
108
85
|
return {
|
|
109
86
|
tableId: table.id,
|
|
@@ -111,7 +88,7 @@ class CreateTableTool extends base_1.BaseTool {
|
|
|
111
88
|
description: table.description,
|
|
112
89
|
fields: table.fields,
|
|
113
90
|
created: table.created,
|
|
114
|
-
...table
|
|
91
|
+
...table,
|
|
115
92
|
};
|
|
116
93
|
}
|
|
117
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_table.js","sourceRoot":"","sources":["../../../src/tools/tables/create_table.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEnC,+CAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,qBAAY,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6BAA6B;QAC7B,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC/B,CAAC;QAED,mBAAmB;QACnB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACzC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,iBAAiB,MAAM,EAAE;YAC/B,IAAI;SACL,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE;gBACrC,KAAK,EAAE,QAAQ,CAAC,KAAK;gBACrB,KAAK,EAAE,MAAM;gBACb,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,IAAI,wBAAwB,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,KAAK,GAAG,QAAQ,CAAC,IAA2B,CAAC;QAEnD,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACxC,OAAO,EAAE,KAAK,CAAC,EAAE;YACjB,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,KAAK,CAAC,IAAI;SACtB,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,EAAE;YACjB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,GAAG,KAAK;SACT,CAAC;IACJ,CAAC;CACF;AAnGD,0CAmGC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GetTableFieldsTool = void 0;
|
|
4
4
|
const base_1 = require("../base");
|
|
5
5
|
const logger_1 = require("../../utils/logger");
|
|
6
|
-
const logger = (0, logger_1.createLogger)(
|
|
6
|
+
const logger = (0, logger_1.createLogger)("GetTableFieldsTool");
|
|
7
7
|
/**
|
|
8
8
|
* Tool for retrieving field information for a specific Quickbase table
|
|
9
9
|
*/
|
|
@@ -14,28 +14,28 @@ class GetTableFieldsTool extends base_1.BaseTool {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(client) {
|
|
16
16
|
super(client);
|
|
17
|
-
this.name =
|
|
18
|
-
this.description =
|
|
17
|
+
this.name = "get_table_fields";
|
|
18
|
+
this.description = "Retrieves field information for a specific Quickbase table";
|
|
19
19
|
/**
|
|
20
20
|
* Parameter schema for get_table_fields
|
|
21
21
|
*/
|
|
22
22
|
this.paramSchema = {
|
|
23
|
-
type:
|
|
23
|
+
type: "object",
|
|
24
24
|
properties: {
|
|
25
25
|
table_id: {
|
|
26
|
-
type:
|
|
27
|
-
description:
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "The ID of the Quickbase table",
|
|
28
28
|
},
|
|
29
29
|
include_system: {
|
|
30
|
-
type:
|
|
31
|
-
description:
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description: "Whether to include system fields",
|
|
32
32
|
},
|
|
33
33
|
field_type: {
|
|
34
|
-
type:
|
|
35
|
-
description:
|
|
36
|
-
}
|
|
34
|
+
type: "string",
|
|
35
|
+
description: "Filter fields by type",
|
|
36
|
+
},
|
|
37
37
|
},
|
|
38
|
-
required: [
|
|
38
|
+
required: ["table_id"],
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -45,9 +45,9 @@ class GetTableFieldsTool extends base_1.BaseTool {
|
|
|
45
45
|
*/
|
|
46
46
|
async run(params) {
|
|
47
47
|
const { table_id, include_system, field_type } = params;
|
|
48
|
-
logger.info(
|
|
48
|
+
logger.info("Getting fields for Quickbase table", {
|
|
49
49
|
tableId: table_id,
|
|
50
|
-
includeSystem: include_system
|
|
50
|
+
includeSystem: include_system,
|
|
51
51
|
});
|
|
52
52
|
// Prepare query parameters
|
|
53
53
|
const queryParams = {};
|
|
@@ -56,19 +56,19 @@ class GetTableFieldsTool extends base_1.BaseTool {
|
|
|
56
56
|
}
|
|
57
57
|
// Get fields in the table
|
|
58
58
|
const response = await this.client.request({
|
|
59
|
-
method:
|
|
59
|
+
method: "GET",
|
|
60
60
|
path: `/fields?tableId=${table_id}`,
|
|
61
|
-
params: queryParams
|
|
61
|
+
params: queryParams,
|
|
62
62
|
});
|
|
63
63
|
if (!response.success || !response.data) {
|
|
64
|
-
logger.error(
|
|
64
|
+
logger.error("Failed to get table fields", {
|
|
65
65
|
error: response.error,
|
|
66
|
-
tableId: table_id
|
|
66
|
+
tableId: table_id,
|
|
67
67
|
});
|
|
68
|
-
throw new Error(response.error?.message ||
|
|
68
|
+
throw new Error(response.error?.message || "Failed to get table fields");
|
|
69
69
|
}
|
|
70
70
|
// Cast data to array of fields
|
|
71
|
-
let fields = response.data.map(field => ({
|
|
71
|
+
let fields = response.data.map((field) => ({
|
|
72
72
|
id: field.id,
|
|
73
73
|
label: field.label,
|
|
74
74
|
fieldType: field.fieldType,
|
|
@@ -76,19 +76,19 @@ class GetTableFieldsTool extends base_1.BaseTool {
|
|
|
76
76
|
required: field.required,
|
|
77
77
|
unique: field.unique,
|
|
78
78
|
properties: field.properties,
|
|
79
|
-
...field
|
|
79
|
+
...field,
|
|
80
80
|
}));
|
|
81
81
|
// Filter fields by type if requested
|
|
82
|
-
if (field_type && field_type.trim() !==
|
|
83
|
-
fields = fields.filter(field => field.fieldType.toLowerCase() === field_type.toLowerCase());
|
|
82
|
+
if (field_type && field_type.trim() !== "") {
|
|
83
|
+
fields = fields.filter((field) => field.fieldType.toLowerCase() === field_type.toLowerCase());
|
|
84
84
|
}
|
|
85
85
|
logger.info(`Found ${fields.length} fields in table`, {
|
|
86
86
|
tableId: table_id,
|
|
87
|
-
fieldTypes: [...new Set(fields.map(f => f.fieldType))].join(
|
|
87
|
+
fieldTypes: [...new Set(fields.map((f) => f.fieldType))].join(", "),
|
|
88
88
|
});
|
|
89
89
|
return {
|
|
90
90
|
fields,
|
|
91
|
-
tableId: table_id
|
|
91
|
+
tableId: table_id,
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_table_fields.js","sourceRoot":"","sources":["../../../src/tools/tables/get_table_fields.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEnC,+CAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,oBAAoB,CAAC,CAAC;AAkFlD;;GAEG;AACH,MAAa,kBAAmB,SAAQ,
|
|
1
|
+
{"version":3,"file":"get_table_fields.js","sourceRoot":"","sources":["../../../src/tools/tables/get_table_fields.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEnC,+CAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,oBAAoB,CAAC,CAAC;AAkFlD;;GAEG;AACH,MAAa,kBAAmB,SAAQ,eAGvC;IA2BC;;;OAGG;IACH,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,CAAC,CAAC;QA/BT,SAAI,GAAG,kBAAkB,CAAC;QAC1B,gBAAW,GAChB,4DAA4D,CAAC;QAE/D;;WAEG;QACI,gBAAW,GAAG;YACnB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,kCAAkC;iBAChD;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uBAAuB;iBACrC;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB,CAAC;IAQF,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,GAAG,CACjB,MAA4B;QAE5B,MAAM,EAAE,QAAQ,EAAE,cAA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J,qCAAqC;QACrC,IAAI,UAAU,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAC3C,MAAM,GAAG,MAAM,CAAC,MAAM,CACpB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,WAAW,EAAE,CACtE,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,MAAM,kBAAkB,EAAE;YACpD,OAAO,EAAE,QAAQ;YACjB,UAAU,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;SACpE,CAAC,CAAC;QAEH,OAAO;YACL,MAAM;YACN,OAAO,EAAE,QAAQ;SAClB,CAAC;IACJ,CAAC;CACF;AAxGD,gDAwGC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { QuickbaseClient } from
|
|
1
|
+
import { QuickbaseClient } from "../../client/quickbase";
|
|
2
2
|
/**
|
|
3
3
|
* Register all table operation tools with the registry
|
|
4
4
|
* @param client Quickbase client
|
|
5
5
|
*/
|
|
6
6
|
export declare function registerTableTools(client: QuickbaseClient): void;
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
7
|
+
export * from "./create_table";
|
|
8
|
+
export * from "./update_table";
|
|
9
|
+
export * from "./get_table_fields";
|
|
@@ -20,18 +20,18 @@ const create_table_1 = require("./create_table");
|
|
|
20
20
|
const update_table_1 = require("./update_table");
|
|
21
21
|
const get_table_fields_1 = require("./get_table_fields");
|
|
22
22
|
const logger_1 = require("../../utils/logger");
|
|
23
|
-
const logger = (0, logger_1.createLogger)(
|
|
23
|
+
const logger = (0, logger_1.createLogger)("TableTools");
|
|
24
24
|
/**
|
|
25
25
|
* Register all table operation tools with the registry
|
|
26
26
|
* @param client Quickbase client
|
|
27
27
|
*/
|
|
28
28
|
function registerTableTools(client) {
|
|
29
|
-
logger.info(
|
|
29
|
+
logger.info("Registering table operation tools");
|
|
30
30
|
// Register individual tools
|
|
31
31
|
registry_1.toolRegistry.registerTool(new create_table_1.CreateTableTool(client));
|
|
32
32
|
registry_1.toolRegistry.registerTool(new update_table_1.UpdateTableTool(client));
|
|
33
33
|
registry_1.toolRegistry.registerTool(new get_table_fields_1.GetTableFieldsTool(client));
|
|
34
|
-
logger.info(
|
|
34
|
+
logger.info("Table operation tools registered");
|
|
35
35
|
}
|
|
36
36
|
// Export all tools
|
|
37
37
|
__exportStar(require("./create_table"), exports);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateTableTool = void 0;
|
|
4
4
|
const base_1 = require("../base");
|
|
5
5
|
const logger_1 = require("../../utils/logger");
|
|
6
|
-
const logger = (0, logger_1.createLogger)(
|
|
6
|
+
const logger = (0, logger_1.createLogger)("UpdateTableTool");
|
|
7
7
|
/**
|
|
8
8
|
* Tool for updating an existing table in a Quickbase application
|
|
9
9
|
*/
|
|
@@ -14,32 +14,32 @@ class UpdateTableTool extends base_1.BaseTool {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(client) {
|
|
16
16
|
super(client);
|
|
17
|
-
this.name =
|
|
18
|
-
this.description =
|
|
17
|
+
this.name = "update_table";
|
|
18
|
+
this.description = "Updates an existing Quickbase table";
|
|
19
19
|
/**
|
|
20
20
|
* Parameter schema for update_table
|
|
21
21
|
*/
|
|
22
22
|
this.paramSchema = {
|
|
23
|
-
type:
|
|
23
|
+
type: "object",
|
|
24
24
|
properties: {
|
|
25
25
|
table_id: {
|
|
26
|
-
type:
|
|
27
|
-
description:
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "The ID of the table",
|
|
28
28
|
},
|
|
29
29
|
name: {
|
|
30
|
-
type:
|
|
31
|
-
description:
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "New name for the table",
|
|
32
32
|
},
|
|
33
33
|
description: {
|
|
34
|
-
type:
|
|
35
|
-
description:
|
|
34
|
+
type: "string",
|
|
35
|
+
description: "New description for the table",
|
|
36
36
|
},
|
|
37
37
|
options: {
|
|
38
|
-
type:
|
|
39
|
-
description:
|
|
40
|
-
}
|
|
38
|
+
type: "object",
|
|
39
|
+
description: "Additional options for table update",
|
|
40
|
+
},
|
|
41
41
|
},
|
|
42
|
-
required: [
|
|
42
|
+
required: ["table_id"],
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -48,13 +48,15 @@ class UpdateTableTool extends base_1.BaseTool {
|
|
|
48
48
|
* @returns Updated table details
|
|
49
49
|
*/
|
|
50
50
|
async run(params) {
|
|
51
|
-
logger.info(
|
|
52
|
-
tableId: params.table_id
|
|
51
|
+
logger.info("Updating Quickbase table", {
|
|
52
|
+
tableId: params.table_id,
|
|
53
53
|
});
|
|
54
54
|
const { table_id, name, description, options } = params;
|
|
55
55
|
// At least one update field is required
|
|
56
|
-
if (!name &&
|
|
57
|
-
|
|
56
|
+
if (!name &&
|
|
57
|
+
!description &&
|
|
58
|
+
(!options || Object.keys(options).length === 0)) {
|
|
59
|
+
throw new Error("At least one update field (name, description, or options) is required");
|
|
58
60
|
}
|
|
59
61
|
// Prepare request body with only the fields that are provided
|
|
60
62
|
const body = {};
|
|
@@ -70,28 +72,28 @@ class UpdateTableTool extends base_1.BaseTool {
|
|
|
70
72
|
}
|
|
71
73
|
// Update the table
|
|
72
74
|
const response = await this.client.request({
|
|
73
|
-
method:
|
|
75
|
+
method: "POST",
|
|
74
76
|
path: `/tables/${table_id}`,
|
|
75
|
-
body
|
|
77
|
+
body,
|
|
76
78
|
});
|
|
77
79
|
if (!response.success || !response.data) {
|
|
78
|
-
logger.error(
|
|
80
|
+
logger.error("Failed to update table", {
|
|
79
81
|
error: response.error,
|
|
80
|
-
tableId: table_id
|
|
82
|
+
tableId: table_id,
|
|
81
83
|
});
|
|
82
|
-
throw new Error(response.error?.message ||
|
|
84
|
+
throw new Error(response.error?.message || "Failed to update table");
|
|
83
85
|
}
|
|
84
86
|
const table = response.data;
|
|
85
|
-
logger.info(
|
|
87
|
+
logger.info("Successfully updated table", {
|
|
86
88
|
tableId: table.id,
|
|
87
|
-
updates: Object.keys(body).join(
|
|
89
|
+
updates: Object.keys(body).join(", "),
|
|
88
90
|
});
|
|
89
91
|
return {
|
|
90
92
|
tableId: table.id,
|
|
91
93
|
name: table.name,
|
|
92
94
|
description: table.description,
|
|
93
95
|
updated: table.updated || new Date().toISOString(),
|
|
94
|
-
...table
|
|
96
|
+
...table,
|
|
95
97
|
};
|
|
96
98
|
}
|
|
97
99
|
}
|