@tenonhq/dovetail-mcp 0.0.45 → 0.0.47
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/README.md +9 -1
- package/dist/registry.js +1 -1
- package/dist/schemas/servicenow.d.ts +3 -0
- package/dist/schemas/servicenow.js +3 -0
- package/dist/tools/servicenow.js +13 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -69,12 +69,20 @@ clear "not configured" error.
|
|
|
69
69
|
| `calendar_get_today` | Today's events |
|
|
70
70
|
| `calendar_get_week` | Next 7 days |
|
|
71
71
|
| `calendar_get_event` | Single event by ID |
|
|
72
|
-
| `servicenow_query_table` | Table API GET (deny-listed tables blocked)
|
|
72
|
+
| `servicenow_query_table` | Table API GET — `table`, `sysparm_query`, optional `fields[]`, `limit` (≤1000), `offset`, `env` (deny-listed tables blocked) |
|
|
73
73
|
|
|
74
74
|
ServiceNow deny-list (default): `sys_user_password`, `sys_user_token`,
|
|
75
75
|
`sys_credential`, `sys_secret`, `sys_user_grmember`, `sys_audit`. Override
|
|
76
76
|
per-table with `SINC_MCP_SN_TABLE_OVERRIDE=table_a,table_b`.
|
|
77
77
|
|
|
78
|
+
**Paging past 1000 rows.** The Table API caps a single page at 1000 rows and
|
|
79
|
+
`limit` is capped to match, so a larger result set is read page by page with
|
|
80
|
+
`offset` (→ `sysparm_offset`): keep `sysparm_query` and `limit` fixed and
|
|
81
|
+
request `offset = page * limit` for page 0, 1, 2, …; the last page is the first
|
|
82
|
+
one that returns fewer than `limit` rows. Add `ORDERBYsys_id` to the query so
|
|
83
|
+
the pages don't shift between calls. `offset` is omitted from the request when
|
|
84
|
+
not supplied.
|
|
85
|
+
|
|
78
86
|
🔒 **Gated writes (Phase 2).** The four ClickUp write tools are inert unless
|
|
79
87
|
`SINC_MCP_WRITES_ENABLE=1` is set — that's the operator-controlled gate. When
|
|
80
88
|
on, calls return a dry-run preview unless `confirm:true` is passed; the
|
package/dist/registry.js
CHANGED
|
@@ -191,7 +191,7 @@ function buildDescriptors(deps) {
|
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
name: "servicenow_query_table",
|
|
194
|
-
description: "Read-only GET against the ServiceNow Table API. Required: table (lower-case identifier), sysparm_query (ServiceNow encoded query). Optional: fields[] limits the columns returned, limit caps row count (default 100, max 1000), env retargets a single call to a different instance by naming an env file in the server's working directory ('prod' or '.env.prod' → reads creds from .env.prod; omit to use the startup instance). Tables on the deny list (sys_user_password, sys_credential, etc.) are rejected unless SINC_MCP_SN_TABLE_OVERRIDE=<table> is set.",
|
|
194
|
+
description: "Read-only GET against the ServiceNow Table API. Required: table (lower-case identifier), sysparm_query (ServiceNow encoded query). Optional: fields[] limits the columns returned, limit caps row count (default 100, max 1000 — the instance's hard per-page ceiling), offset skips rows (sysparm_offset, default 0) so result sets larger than 1000 rows can be paged: page N (0-based) is offset = N * limit with the same limit and query, and the last page is the first one that returns fewer than limit rows (add ORDERBYsys_id to the query for a stable order), env retargets a single call to a different instance by naming an env file in the server's working directory ('prod' or '.env.prod' → reads creds from .env.prod; omit to use the startup instance). Tables on the deny list (sys_user_password, sys_credential, etc.) are rejected unless SINC_MCP_SN_TABLE_OVERRIDE=<table> is set.",
|
|
195
195
|
shape: servicenow_1.servicenowQueryTableSchema.shape,
|
|
196
196
|
annotations: dovetail_mcp_kit_1.READ_ONLY,
|
|
197
197
|
handler: function (args) {
|
|
@@ -4,16 +4,19 @@ export declare var servicenowQueryTableSchema: z.ZodObject<{
|
|
|
4
4
|
sysparm_query: z.ZodString;
|
|
5
5
|
fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
6
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
7
8
|
env: z.ZodOptional<z.ZodString>;
|
|
8
9
|
}, "strict", z.ZodTypeAny, {
|
|
9
10
|
table: string;
|
|
10
11
|
sysparm_query: string;
|
|
12
|
+
offset?: number | undefined;
|
|
11
13
|
fields?: string[] | undefined;
|
|
12
14
|
limit?: number | undefined;
|
|
13
15
|
env?: string | undefined;
|
|
14
16
|
}, {
|
|
15
17
|
table: string;
|
|
16
18
|
sysparm_query: string;
|
|
19
|
+
offset?: number | undefined;
|
|
17
20
|
fields?: string[] | undefined;
|
|
18
21
|
limit?: number | undefined;
|
|
19
22
|
env?: string | undefined;
|
|
@@ -7,6 +7,9 @@ exports.servicenowQueryTableSchema = zod_1.z.object({
|
|
|
7
7
|
sysparm_query: zod_1.z.string(),
|
|
8
8
|
fields: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
9
9
|
limit: zod_1.z.number().int().min(1).max(1000).optional(),
|
|
10
|
+
// Row offset → sysparm_offset. The Table API caps one page at 1000 rows, so
|
|
11
|
+
// paging past that is offset = page * limit (0-based pages). Omit → not sent.
|
|
12
|
+
offset: zod_1.z.number().int().min(0).optional(),
|
|
10
13
|
// Optional per-call instance retarget. Names an env file in the server's
|
|
11
14
|
// working directory: a bare token like "prod" or "workshop" resolves to
|
|
12
15
|
// ".env.<token>", or pass the full ".env.<name>" basename. Path separators
|
package/dist/tools/servicenow.js
CHANGED
|
@@ -64,12 +64,20 @@ async function servicenowQueryTable(args, deps) {
|
|
|
64
64
|
}
|
|
65
65
|
var client = resolveClient(deps, args.env);
|
|
66
66
|
var limit = args.limit !== undefined ? args.limit : 100;
|
|
67
|
+
var hasFields = Boolean(args.fields && args.fields.length > 0);
|
|
68
|
+
var hasOffset = args.offset !== undefined;
|
|
67
69
|
var records;
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
if (hasFields || hasOffset) {
|
|
71
|
+
// Options-object form: fields and/or offset. offset maps to sysparm_offset
|
|
72
|
+
// inside the client; when omitted it is never sent (instance default 0).
|
|
73
|
+
var options = { limit: limit };
|
|
74
|
+
if (hasFields) {
|
|
75
|
+
options.fields = args.fields;
|
|
76
|
+
}
|
|
77
|
+
if (hasOffset) {
|
|
78
|
+
options.offset = args.offset;
|
|
79
|
+
}
|
|
80
|
+
records = await client.table.query(args.table, args.sysparm_query, options);
|
|
73
81
|
}
|
|
74
82
|
else {
|
|
75
83
|
records = await client.table.query(args.table, args.sysparm_query, limit);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenonhq/dovetail-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"description": "MCP server exposing read tools for ClickUp / Gmail / Calendar / ServiceNow plus gated ClickUp writes, backed by the Dovetail integration packages.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@tenonhq/dovetail-google-auth": "~0.0.12",
|
|
23
23
|
"@tenonhq/dovetail-google-calendar": "~0.0.11",
|
|
24
24
|
"@tenonhq/dovetail-mcp-kit": "~0.0.1",
|
|
25
|
-
"@tenonhq/dovetail-servicenow": "~0.0.
|
|
25
|
+
"@tenonhq/dovetail-servicenow": "~0.0.49",
|
|
26
26
|
"dotenv": "^16.3.1",
|
|
27
27
|
"zod": "^3.23.0"
|
|
28
28
|
},
|