iit-mcp-autotask 0.63.18 → 0.64.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/.env.example +3 -0
- package/README.md +6 -8
- package/capabilities.json +5 -5
- package/dist/config/schema.d.ts +8 -0
- package/dist/config/schema.js +1 -0
- package/dist/doctor.d.ts +1 -0
- package/dist/doctor.js +1 -0
- package/dist/tools/capabilities-manifest.js +1 -0
- package/dist/tools/catalog-data.d.ts +1 -1
- package/dist/tools/catalog-data.js +3 -3
- package/dist/tools/context/client.js +1 -0
- package/dist/tools/dispatch.js +1 -2
- package/dist/tools/lists.js +3 -1
- package/dist/tools/meta.js +6 -2
- package/dist/tools/results/errors.js +11 -5
- package/dist/tools/schemas.js +2 -2
- package/dist/tools/server.js +1 -1
- package/package.json +2 -2
- package/server.json +2 -2
package/.env.example
CHANGED
|
@@ -88,6 +88,9 @@ AUTOTASK_PROFILE=readonly
|
|
|
88
88
|
# the vendor.
|
|
89
89
|
AUTOTASK_CACHE=on
|
|
90
90
|
|
|
91
|
+
# Opt in to masking SDK personal and business-sensitive fields in tool results.
|
|
92
|
+
# AUTOTASK_REDACT_PERSONAL_DATA=true
|
|
93
|
+
|
|
91
94
|
# --- Vendor budget (the server boots the SDK in the conservative `agent` profile; overrides here) ---
|
|
92
95
|
# These are per-client allowances. The SDK also caps each object/tracking identifier at
|
|
93
96
|
# 3 active requests and shares a conservative origin-wide 10,000-attempt hourly ceiling
|
package/README.md
CHANGED
|
@@ -544,6 +544,7 @@ non-zero on an invalid config (fail-fast) instead of failing at the first tool c
|
|
|
544
544
|
| `AUTOTASK_ALLOWED_BASE_HOSTS` | http: unless `AUTOTASK_ALLOW_ANY_BASE_HOST=true` | — | comma-separated exact hostnames or `*.suffix` subdomain suffixes a caller may name in `X-Autotask-Base-Url` (no scheme/port/path). Unset + default origin set → only that origin accepted. Unset + no default → boot refused unless the lab-only flag. **Recommended production value: `*.autotask.net`**. Literal private-IP origins are always refused. |
|
|
545
545
|
| `AUTOTASK_ALLOW_ANY_BASE_HOST` | no | `false` | lab-only opt-in to boot with neither allow-list nor default origin; `warn`-logged at boot (decision D-4); refused with the operator profile. Not set in production. |
|
|
546
546
|
| `AUTOTASK_CACHE` | no | `on` | the single off switch for the SDK's per-tenant in-process caches (see [Per-tenant pool & cache](#per-tenant-pool--cache)): `on` (default) sends no cache block — the SDK's default-on caches apply to each pooled tenant client (read ~5 min + the reference tables at 1 h, field metadata ~5 min, plus the fuzzy company-name index below); `off` sends `cache: false` (every read re-dials the vendor) |
|
|
547
|
+
| `AUTOTASK_REDACT_PERSONAL_DATA` | no | `false` | Set to `true` to mask the SDK's personal and business-sensitive fields in tool results and dry-run payloads. |
|
|
547
548
|
| `AUTOTASK_OUTPUT_DIR` | no | unset | the ONE directory the `output_path` option may write into (the bounded query tools and the invoice export; stdio transport only). Unset = defaults to `output/` under `AUTOTASK_STATE_DIR` (the feature refuses when neither is set); must be absolute, must already EXIST (the server never creates the root) and must not be the filesystem root. A caller path is relative to this root, and the root and target are canonically resolved (`realpath`) so a traversal or symlink escape is refused — with nothing created outside the root. See [Query results](#query-results-tsv-output_path-and-the-saved-file-shape) |
|
|
548
549
|
| `AUTOTASK_QUERY_MAX_BYTES` | no | 262144 (256 KiB) | the `autotask_query` rows-mode response budget in bytes (16384 to 4194304): a larger answer is cut to the longest whole-row prefix that fits, with `hasMore` and `bytesCapped` (see [Query results](#query-results-tsv-output_path-and-the-saved-file-shape)); totals, `output_path` and `autotask_read` are not capped |
|
|
549
550
|
| `AUTOTASK_RATE_LIMIT_PER_HOUR` | no | 8000 (agent profile) | override the SDK's local hourly allowance (at most 10,000; `null`/off is rejected at boot); the shared SDK origin ceiling remains enforced |
|
|
@@ -759,18 +760,15 @@ guards (rate limiter, 429 cooldown) — a worse security posture, not a safer on
|
|
|
759
760
|
|
|
760
761
|
## Security posture
|
|
761
762
|
|
|
762
|
-
- **
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
`test/integration/redaction-secret-reads.test.ts`). The confidential class this covers: the
|
|
763
|
+
- **Personal-data redaction is opt-in.** Set `AUTOTASK_REDACT_PERSONAL_DATA=true` to retain the
|
|
764
|
+
masking behavior of earlier releases. `doctor` and the `server` part of `autotask_tenant_status`
|
|
765
|
+
report the effective setting. Opt-in masking covers contacts' personal data and the
|
|
766
766
|
`configuration_items` domain fields (`domain`, `domainExpirationDateTime`,
|
|
767
767
|
`domainLastUpdatedDateTime`, `domainRegistrationDateTime`), the RMM device-audit fields
|
|
768
768
|
(`rmmDeviceAuditExternalIPAddress`, `rmmDeviceAuditIPAddress`, `rmmDeviceAuditMacAddress`,
|
|
769
769
|
`rmmDeviceAuditMobileNumber`, `rmmDeviceAuditSNMPContact`), `primaryContact`, `taxID` and
|
|
770
|
-
`webAddress`
|
|
771
|
-
|
|
772
|
-
fields are not — so a filter on a redacted field still matches server-side, but the answer cannot
|
|
773
|
-
show the triggering value.
|
|
770
|
+
`webAddress` fields. The SDK always masks the exact field names `password`, `secretKey` and `secret`. Autotask still
|
|
771
|
+
evaluates filters against stored values when result masking is enabled.
|
|
774
772
|
- **Untrusted-content wrapping:** vendor free text in results stays wrapped in this server's own
|
|
775
773
|
`<untrusted_content>` markers end-to-end (the pinned SDK returns read-path values raw — its
|
|
776
774
|
wrapper is a projection-layer helper; the server wraps once at the choke point: exactly once,
|
package/capabilities.json
CHANGED
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"id": "autotask.platform.catalog",
|
|
77
|
-
"description": "Find the exact operation key for anything without a dedicated tool: ranked search (q) over the 1,
|
|
77
|
+
"description": "Find the exact operation key for anything without a dedicated tool: ranked search (q) over the 1,413 registry operations, with effect and whether this deployment serves it. No vendor call.",
|
|
78
78
|
"mcpPrimitive": "tool",
|
|
79
79
|
"toolName": "autotask_catalog",
|
|
80
80
|
"type": "read",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"id": "autotask.generic.read",
|
|
109
|
-
"description": "Run one or several reads in one call by exact registry key: unbilled work, profitability and margin, SLA health. Scope by company/contract ids (unscoped = tenant walk); totals: autotask_query group_by; slim: includeFields, noteChars.",
|
|
109
|
+
"description": "Run one or several reads in one call by exact registry key: unbilled work, profitability and margin, SLA health. Scope by company/contract ids where supported (unscoped = tenant walk); totals: autotask_query group_by; slim: includeFields, noteChars.",
|
|
110
110
|
"mcpPrimitive": "tool",
|
|
111
111
|
"toolName": "autotask_read",
|
|
112
112
|
"type": "read",
|
|
@@ -138,13 +138,13 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"id": "autotask.discovery.query",
|
|
141
|
-
"description": "List records
|
|
141
|
+
"description": "List records with a filter (e.g. tickets, time entries, service calls, contracts, time off). Totals, no rows: group_by, sum, count (hours logged by ticket, how many match). By id: id in. Scope by company ids if supported (unscoped = tenant walk).",
|
|
142
142
|
"mcpPrimitive": "tool",
|
|
143
143
|
"toolName": "autotask_query",
|
|
144
144
|
"type": "read",
|
|
145
145
|
"toolset": "core",
|
|
146
146
|
"profile": "readonly",
|
|
147
|
-
"backingOperation": "
|
|
147
|
+
"backingOperation": "node-autotask/operations invokeRead (any effect=read <resource>.query key) | operations.aggregate",
|
|
148
148
|
"annotations": {
|
|
149
149
|
"readOnly": true,
|
|
150
150
|
"idempotent": true,
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
"autotask_describe",
|
|
481
481
|
"autotask_read"
|
|
482
482
|
],
|
|
483
|
-
"backingRegistryOperations":
|
|
483
|
+
"backingRegistryOperations": 1413,
|
|
484
484
|
"note": "autotask_catalog finds the exact operation key (ranked search), autotask_describe serves its contract, autotask_read runs any effect=read key. Writes go through the operator profile (autotask_write then autotask_apply); authenticate.* is never served."
|
|
485
485
|
},
|
|
486
486
|
"schemas": {}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -99,6 +99,10 @@ export declare const CONFIG_FIELDS: z.ZodObject<{
|
|
|
99
99
|
on: "on";
|
|
100
100
|
off: "off";
|
|
101
101
|
}>>;
|
|
102
|
+
AUTOTASK_REDACT_PERSONAL_DATA: z.ZodPipe<z.ZodDefault<z.ZodEnum<{
|
|
103
|
+
true: "true";
|
|
104
|
+
false: "false";
|
|
105
|
+
}>>, z.ZodTransform<boolean, "true" | "false">>;
|
|
102
106
|
AUTOTASK_OUTPUT_DIR: z.ZodOptional<z.ZodPreprocess<z.ZodString, unknown>>;
|
|
103
107
|
AUTOTASK_QUERY_MAX_BYTES: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
104
108
|
AUTOTASK_RATE_LIMIT_PER_HOUR: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -158,6 +162,10 @@ export declare const schema: z.ZodObject<{
|
|
|
158
162
|
on: "on";
|
|
159
163
|
off: "off";
|
|
160
164
|
}>>;
|
|
165
|
+
AUTOTASK_REDACT_PERSONAL_DATA: z.ZodPipe<z.ZodDefault<z.ZodEnum<{
|
|
166
|
+
true: "true";
|
|
167
|
+
false: "false";
|
|
168
|
+
}>>, z.ZodTransform<boolean, "true" | "false">>;
|
|
161
169
|
AUTOTASK_OUTPUT_DIR: z.ZodOptional<z.ZodPreprocess<z.ZodString, unknown>>;
|
|
162
170
|
AUTOTASK_QUERY_MAX_BYTES: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
163
171
|
AUTOTASK_RATE_LIMIT_PER_HOUR: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
package/dist/config/schema.js
CHANGED
|
@@ -188,6 +188,7 @@ export const CONFIG_FIELDS = z
|
|
|
188
188
|
* sent — every SDK cache channel is off and every read re-dials the vendor.
|
|
189
189
|
*/
|
|
190
190
|
AUTOTASK_CACHE: z.enum(['on', 'off']).default('on'),
|
|
191
|
+
AUTOTASK_REDACT_PERSONAL_DATA: z.enum(['true', 'false']).default('false').transform((v) => v === 'true'),
|
|
191
192
|
/**
|
|
192
193
|
* The `output_path` root (issue #11, ruling N6): the ONE directory the bounded query tools'
|
|
193
194
|
* `output_path` option may write into. Optional at boot — the feature refuses per call when it
|
package/dist/doctor.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export interface DoctorReport {
|
|
|
58
58
|
readonly ok: boolean;
|
|
59
59
|
readonly transport: Config['MCP_TRANSPORT'];
|
|
60
60
|
readonly dialed: number;
|
|
61
|
+
readonly redactPersonalData: boolean;
|
|
61
62
|
readonly credentials: readonly DoctorCredentialCheck[];
|
|
62
63
|
readonly bases: readonly DoctorBaseCheck[];
|
|
63
64
|
readonly hostPolicy: DoctorHostPolicy;
|
package/dist/doctor.js
CHANGED
|
@@ -30,6 +30,7 @@ const BACKING = {
|
|
|
30
30
|
autotask_catalog: 'node-autotask/capabilities registry + MCP_TOOL_CATALOG.json',
|
|
31
31
|
autotask_describe: 'registry records + operations.relationshipMap',
|
|
32
32
|
autotask_read: 'node-autotask/operations invokeRead (any effect=read key)',
|
|
33
|
+
autotask_query: 'node-autotask/operations invokeRead (any effect=read <resource>.query key) | operations.aggregate',
|
|
33
34
|
autotask_write: 'node-autotask/operations invokeWrite / invokeDelete dry run (the keys AUTOTASK_WRITE lists)',
|
|
34
35
|
autotask_apply: 'node-autotask/operations invokeWrite / invokeDelete (exactly the previewed plan, no hard rule)',
|
|
35
36
|
autotask_apply_destructive: 'node-autotask/operations invokeWrite / invokeDelete (exactly the previewed plan that hits a hard rule)',
|
|
@@ -108,7 +108,7 @@ export declare function sdkCacheOptions(cache: 'on' | 'off'): Pick<AutotaskConfi
|
|
|
108
108
|
* fails the boot (or the CI test) instead of quietly shipping a tool surface that no longer
|
|
109
109
|
* describes the SDK behind it.
|
|
110
110
|
*/
|
|
111
|
-
export declare const BUILT_AGAINST_PLAN_HASH = "
|
|
111
|
+
export declare const BUILT_AGAINST_PLAN_HASH = "fe0c9ce6a957bb730c1bdb9fb46498e61e2d04cc1cdd861d796ac26f982ab505";
|
|
112
112
|
/**
|
|
113
113
|
* Fail fast when the installed SDK's plan has moved out from under this surface.
|
|
114
114
|
* Called at boot (main.ts) and safe to call repeatedly (pure comparison).
|
|
@@ -133,9 +133,9 @@ export const TOOL_DESCRIPTIONS = {
|
|
|
133
133
|
autotask_guide: 'Step-by-step playbooks for multi-step Autotask tasks. No args: the index; {skill} returns one playbook, {skill, section} one section. Static text, no vendor call. Use it first when a task needs several tools.',
|
|
134
134
|
autotask_catalog: `Find the exact operation key for anything without a dedicated tool: ranked search (q) over the ${RECORDS.length.toLocaleString('en-US')} registry operations, with effect and whether this deployment serves it. No vendor call.`,
|
|
135
135
|
autotask_describe: 'One operation\'s (registry key or tool name) exact input/output contract, examples, errors, policy verdict and playbooks (operation), or one resource\'s relationship map: parent, children, lookup keys (resource). No vendor call.',
|
|
136
|
-
autotask_read: 'Run one or several reads in one call by exact registry key: unbilled work, profitability and margin, SLA health. Scope by company/contract ids (unscoped = tenant walk); totals: autotask_query group_by; slim: includeFields, noteChars.',
|
|
136
|
+
autotask_read: 'Run one or several reads in one call by exact registry key: unbilled work, profitability and margin, SLA health. Scope by company/contract ids where supported (unscoped = tenant walk); totals: autotask_query group_by; slim: includeFields, noteChars.',
|
|
137
137
|
autotask_resolve: 'Find the record for an identifier: id or name, ticket number, CI serial, contact email (by), staff by email, user name or name (resource resources, include_api_users); one resource or a sweep. Exact, then contains; companies add fuzzy candidates.',
|
|
138
|
-
autotask_query: 'List records
|
|
138
|
+
autotask_query: 'List records with a filter (e.g. tickets, time entries, service calls, contracts, time off). Totals, no rows: group_by, sum, count (hours logged by ticket, how many match). By id: id in. Scope by company ids if supported (unscoped = tenant walk).',
|
|
139
139
|
autotask_tenant_status: 'Identity (API user + impersonated user), Autotask API version, this server\'s package/SDK version and profile (server), request thresholds, and the time zone of the people asking, with local and UTC time (time). Use it first to check credentials.',
|
|
140
140
|
autotask_ticket_full_context: 'One ticket with its company, contact, assigned resource, project, notes, time entries and attachment metadata. Missing parts degrade to typed absent; a missing ticket is not found.',
|
|
141
141
|
autotask_company_full_profile: 'One company with locations, contacts, notes, open tickets and projects (capped: true = more exist; raise the limit). fields {part:[names]} trims columns. Open = not tenant-closed. Missing parts degrade to typed absent.',
|
|
@@ -190,7 +190,7 @@ export function sdkCacheOptions(cache) {
|
|
|
190
190
|
* fails the boot (or the CI test) instead of quietly shipping a tool surface that no longer
|
|
191
191
|
* describes the SDK behind it.
|
|
192
192
|
*/
|
|
193
|
-
export const BUILT_AGAINST_PLAN_HASH = '
|
|
193
|
+
export const BUILT_AGAINST_PLAN_HASH = 'fe0c9ce6a957bb730c1bdb9fb46498e61e2d04cc1cdd861d796ac26f982ab505';
|
|
194
194
|
/**
|
|
195
195
|
* Fail fast when the installed SDK's plan has moved out from under this surface.
|
|
196
196
|
* Called at boot (main.ts) and safe to call repeatedly (pure comparison).
|
|
@@ -30,6 +30,7 @@ export function buildSdkBaseOptions(config, log) {
|
|
|
30
30
|
profile: 'agent',
|
|
31
31
|
// Keep LLM-facing name/label siblings enabled (SDK labels are opt-in).
|
|
32
32
|
labels: true,
|
|
33
|
+
redactPersonalData: config.AUTOTASK_REDACT_PERSONAL_DATA,
|
|
33
34
|
// Tool calls must never hang inside a vendor maintenance window (issue #252): the wait is
|
|
34
35
|
// 0, so the SDK's shared per-zone maintenance gate opens and surfaces the typed
|
|
35
36
|
// MaintenanceError at once (node-autotask 0.40.0 #285) instead of a call riding out the
|
package/dist/tools/dispatch.js
CHANGED
|
@@ -184,8 +184,7 @@ function annotateCatalogRows(result) {
|
|
|
184
184
|
catalogRow.queryOperation = operation !== undefined && toolForOp(operation) === 'autotask_query' ? operation : null;
|
|
185
185
|
if (isShapeOnlyVendorOperation(operation) && catalogRow.error != null) {
|
|
186
186
|
// The SDK's row error carries vendor text and a code without trusted HTTP status.
|
|
187
|
-
|
|
188
|
-
catalogRow.error = { code: 'UPSTREAM_ERROR', message };
|
|
187
|
+
catalogRow.error = { code: 'UPSTREAM_ERROR', message: 'Autotask could not provide metadata for this resource.' };
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
190
|
}
|
package/dist/tools/lists.js
CHANGED
|
@@ -62,7 +62,9 @@ export function buildQuery(ctx) {
|
|
|
62
62
|
// one sentence that names the scope to add (data.message and reasons[].detail both carry it whole)
|
|
63
63
|
const hint = isDeletedActivityAuditResource(args.resource)
|
|
64
64
|
? 'pass an audit filter such as {field: "id", op: "exist"} for bounded reads or counts'
|
|
65
|
-
:
|
|
65
|
+
: args.resource === 'internal_locations' || args.resource === 'shipping_types'
|
|
66
|
+
? 'call again with {field: "id", op: "eq", value: "<id>"} for a known record, or {field: "id", op: "exist"} for the whole entity'
|
|
67
|
+
: 'call again with a scope such as {field: "companyID", op: "eq", value: "<id>"} (time_entries: ticket.companyID), or {field: "id", op: "exist"} for the whole entity';
|
|
66
68
|
throw new InputInvalidError(`query: filter is missing or empty; ${hint}`, 'filter');
|
|
67
69
|
}
|
|
68
70
|
// #228: totals mode (group_by / sum / count) is the SDK's operations.aggregate over the same filter
|
package/dist/tools/meta.js
CHANGED
|
@@ -247,10 +247,14 @@ export function buildDescribe(ctx) {
|
|
|
247
247
|
reachable: (r?.reachable ?? true) && refusalReason(k, ctx.record(k), ctx.config, ctx.writable, ctx.write?.runScope) === null,
|
|
248
248
|
};
|
|
249
249
|
});
|
|
250
|
-
|
|
250
|
+
const queryTool = operation === 'autotask_query';
|
|
251
|
+
return ok(queryTool
|
|
252
|
+
? 'Example registry keys for autotask_query. Find more query resources via autotask_catalog, then describe the exact key.'
|
|
253
|
+
: `"${operation}" serves ${keys.length} registry keys; pass one as operation for its full record.`, {
|
|
251
254
|
tool: operation,
|
|
252
255
|
...toolServed(ctx, operation),
|
|
253
256
|
operations: rows,
|
|
257
|
+
...(queryTool ? { operationsScope: 'examples' } : {}),
|
|
254
258
|
paramNames: paramNames(keys[0], ctx.record(keys[0])),
|
|
255
259
|
});
|
|
256
260
|
}
|
|
@@ -787,7 +791,7 @@ export function buildTenantStatus(ctx) {
|
|
|
787
791
|
// late failure cannot outlive this request, and assemble only in requested order.
|
|
788
792
|
const settled = await Promise.allSettled(parts.map(async (part) => {
|
|
789
793
|
if (part === 'server') {
|
|
790
|
-
return { value: { name: SERVER_NAME, version: SERVER_VERSION, sdkVersion: SDK_VERSION, profile: ctx.config.AUTOTASK_PROFILE, ticketNoteVerificationProjection: TICKET_NOTE_VERIFICATION_PROJECTION, readRuntime: readRuntimeProof(ctx.client) } };
|
|
794
|
+
return { value: { name: SERVER_NAME, version: SERVER_VERSION, sdkVersion: SDK_VERSION, profile: ctx.config.AUTOTASK_PROFILE, redactPersonalData: ctx.config.AUTOTASK_REDACT_PERSONAL_DATA, ticketNoteVerificationProjection: TICKET_NOTE_VERIFICATION_PROJECTION, readRuntime: readRuntimeProof(ctx.client) } };
|
|
791
795
|
}
|
|
792
796
|
if (part === 'time')
|
|
793
797
|
return { value: zoneClock(ctx.config.AUTOTASK_USER_TIMEZONE) };
|
|
@@ -306,7 +306,8 @@ export function isKnowledgeBaseRootOperation(operation) {
|
|
|
306
306
|
return operation !== undefined && /^knowledge_base_(articles|categories)\./.test(operation);
|
|
307
307
|
}
|
|
308
308
|
export function isShapeOnlyVendorOperation(operation) {
|
|
309
|
-
return isKnowledgeBaseRootOperation(operation)
|
|
309
|
+
return isKnowledgeBaseRootOperation(operation)
|
|
310
|
+
|| (operation !== undefined && /^(inventory_locations|internal_locations|shipping_types)\./.test(operation));
|
|
310
311
|
}
|
|
311
312
|
/** A vendor failure's canonical status code, also used in transport audit logs. */
|
|
312
313
|
export function statusBasedVendorCode(operation, status) {
|
|
@@ -378,18 +379,23 @@ export function typedErrorPayload(err, correlationId, secrets = []) {
|
|
|
378
379
|
// upstream body into err.message by design, and a SHORT body (a credential echo) would
|
|
379
380
|
// otherwise cross under the 200-char bound. Other client-side errors (no httpStatus) keep the
|
|
380
381
|
// SDK's own deterministic text (bounded as before).
|
|
381
|
-
|
|
382
|
+
const knowledgeBase = isKnowledgeBaseRootOperation(operation);
|
|
383
|
+
const inventoryLocation = operation?.startsWith('inventory_locations.') === true;
|
|
384
|
+
if (shapeOnlyVendorError && code === 'NOT_FOUND' && (knowledgeBase || operation?.endsWith('.get') === true)) {
|
|
382
385
|
payload.message = operation === 'knowledge_base_articles.get'
|
|
383
386
|
? 'No published article was visible to this API user at the requested ID.'
|
|
384
|
-
:
|
|
387
|
+
: knowledgeBase
|
|
385
388
|
? 'No Knowledge Base record was visible to this API user at the requested ID.'
|
|
386
|
-
:
|
|
389
|
+
: operation === 'inventory_locations.get'
|
|
390
|
+
? 'No inventory location was visible to this API user at the requested ID.'
|
|
391
|
+
: 'No record was visible to this API user at the requested ID.';
|
|
387
392
|
}
|
|
388
393
|
else if (httpStatus !== undefined) {
|
|
389
394
|
payload.message = shapeMessage(httpStatus, url);
|
|
390
395
|
}
|
|
391
396
|
else if (shapeOnlyVendorError) {
|
|
392
|
-
payload.message =
|
|
397
|
+
payload.message = knowledgeBase ? 'Autotask refused the Knowledge Base operation.'
|
|
398
|
+
: inventoryLocation ? 'Autotask refused the inventory location operation.' : 'Autotask refused the operation.';
|
|
393
399
|
}
|
|
394
400
|
else {
|
|
395
401
|
payload.message = sdkValidation
|
package/dist/tools/schemas.js
CHANGED
|
@@ -28,7 +28,7 @@ export const OP_KEY = z
|
|
|
28
28
|
.max(80)
|
|
29
29
|
.regex(/^[a-z][a-z0-9_]*\.[a-zA-Z][a-zA-Z0-9]*$/, {
|
|
30
30
|
error: (iss) => typeof iss.input === 'string' && /^autotask_[a-z_]+$/.test(iss.input)
|
|
31
|
-
? `"${iss.input}" is an MCP tool name, not a registry key — call the tool directly
|
|
31
|
+
? `"${iss.input}" is an MCP tool name, not a registry key — call the tool directly or find a registry key via autotask_catalog`
|
|
32
32
|
: 'expected an exact registry key, e.g. tickets.get',
|
|
33
33
|
});
|
|
34
34
|
/** The positional args of one registry operation (the registry's widest operation takes 3). */
|
|
@@ -188,7 +188,7 @@ const DESCRIBE_OP = z
|
|
|
188
188
|
.max(80)
|
|
189
189
|
.regex(/^(?:[a-z][a-z0-9_]*\.[a-zA-Z][a-zA-Z0-9]*|autotask_[a-z0-9_]+)$/, 'expected a registry key (e.g. tickets.get) or an MCP tool name (e.g. autotask_query)');
|
|
190
190
|
export const DESCRIBE_INPUT = z.object({
|
|
191
|
-
operation: DESCRIBE_OP.optional().describe('
|
|
191
|
+
operation: DESCRIBE_OP.optional().describe('Registry key or MCP tool name. Use autotask_catalog to find query resources.'),
|
|
192
192
|
summary: z.boolean().optional().describe('true: purpose, args and usage only.'),
|
|
193
193
|
full: z.boolean().optional().describe('true: the complete record (default slim).'),
|
|
194
194
|
resource: z.string().regex(/^[a-z][a-z0-9_]{0,59}$/).optional().describe('Resource key for its relationship map, e.g. tickets.'),
|
package/dist/tools/server.js
CHANGED
|
@@ -79,7 +79,7 @@ Routing:
|
|
|
79
79
|
|
|
80
80
|
Filters: [{field, op, value}]; op is ${FILTER_OPS.slice(0, -1).join(', ')} or ${FILTER_OPS.at(-1)}; group with {op: "and"|"or", items: [...]}. Field names are vendor-cased: operations.fieldCatalog args [{resources:[key], fields:[names], labels:true}], not getFieldInfo. A bare object is refused. in/notIn take an array or "1,2,3".
|
|
81
81
|
Dates: UTC ISO-8601; dateWorked is a YYYY-MM-DD date, never converted.
|
|
82
|
-
Scope
|
|
82
|
+
Scope queries by supported IDs. Time entries use ticket.companyID. Unscoped is a tenant-wide walk, refused above ${UNSCOPED_WALK_THRESHOLD} rows unless acknowledge_unscoped (query) or acknowledgeUnscoped (read). Totals: autotask_query group_by/sum (same scope); time: both hoursWorked and hoursToBill.
|
|
83
83
|
A list miss is not proof of absence: verify by id.${zone}`;
|
|
84
84
|
}
|
|
85
85
|
/** The full identity stamp (the `/metadata` build block — the era pair, FR-2). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iit-mcp-autotask",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.0",
|
|
4
4
|
"description": "MCP server for the Autotask (Datto) PSA domain, built on the node-autotask SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Max Soukhomlinov",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@modelcontextprotocol/server": "^2.2.0",
|
|
57
|
-
"node-autotask": "0.
|
|
57
|
+
"node-autotask": "0.91.0",
|
|
58
58
|
"zod": "^4.6.7"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
package/server.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iit-mcp-autotask",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.0",
|
|
4
4
|
"description": "MCP server for the Autotask (Datto) PSA API, powered by the node-autotask SDK",
|
|
5
5
|
"mcpProtocolBaseline": "2026-07-28",
|
|
6
6
|
"legacyProtocolFallback": "2025-11-25",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"capabilitiesManifest": "capabilities.json",
|
|
63
63
|
"sdk": {
|
|
64
64
|
"package": "node-autotask",
|
|
65
|
-
"versionRange": "0.
|
|
65
|
+
"versionRange": "0.91.0"
|
|
66
66
|
},
|
|
67
67
|
"vendorExtensions": false,
|
|
68
68
|
"credentialModelNote": "per-request; server-held under stdio or, on HTTP, only behind AUTOTASK_HTTP_AUTH=tokens; operator plans and the ledger are keyed by principal and tenant id, never by credential, and an apply authenticates the request credential and restores the plan's per-write impersonation"
|