@abgov/adsp-sdk-mcp-server 1.29.0 → 1.31.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/README.md +29 -0
- package/assets/docs/services/cache-service.md +10 -0
- package/package.json +1 -1
- package/provenance.json +4 -4
- package/src/instructions.d.ts +6 -0
- package/src/instructions.js +22 -0
- package/src/instructions.js.map +1 -0
- package/src/server.js +8 -2
- package/src/server.js.map +1 -1
- package/src/tools/registerApiTools.js +4 -0
- package/src/tools/registerApiTools.js.map +1 -1
- package/src/tools/registerConfigurationSchemaTool.js +2 -0
- package/src/tools/registerConfigurationSchemaTool.js.map +1 -1
- package/src/tools/registerDocsTools.js +4 -0
- package/src/tools/registerDocsTools.js.map +1 -1
- package/src/tools/registerQuickstartTool.js +2 -0
- package/src/tools/registerQuickstartTool.js.map +1 -1
- package/src/tools/registerSdkTools.js +2 -0
- package/src/tools/registerSdkTools.js.map +1 -1
- package/src/tools/registerServerInfoTool.js +2 -0
- package/src/tools/registerServerInfoTool.js.map +1 -1
- package/src/tools/registerServiceRolesTool.js +2 -0
- package/src/tools/registerServiceRolesTool.js.map +1 -1
- package/src/tools/types.d.ts +14 -0
- package/src/tools/types.js +8 -0
- package/src/tools/types.js.map +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,20 @@ content each service serves at `/swagger/docs/v1`, so they work offline.
|
|
|
39
39
|
The two live tools require logging in first (see below). Everything else in this package works fully offline with no
|
|
40
40
|
setup.
|
|
41
41
|
|
|
42
|
+
### Server instructions and tool annotations
|
|
43
|
+
|
|
44
|
+
The `initialize` result carries an `instructions` string (`src/instructions.ts`, about 10 lines). It covers only what
|
|
45
|
+
no single tool description says: which tool answers which kind of question, that only the two live tools need
|
|
46
|
+
`npx @abgov/adsp-cli login`, and that `get_adsp_mcp_server_info` tells how fresh the bundled content is. Clients such
|
|
47
|
+
as Claude Code use it to decide when to search this server's deferred tools. It must not restate a tool description;
|
|
48
|
+
`server.spec.ts` fails if it shares six or more consecutive words with one.
|
|
49
|
+
|
|
50
|
+
Every tool in `tools/list` declares `readOnlyHint: true`. The offline tools also declare `openWorldHint: false`,
|
|
51
|
+
because they answer only from bundled content; the live tools keep the default (open world), because they call ADSP.
|
|
52
|
+
These are hints for the client, such as skipping a confirmation prompt, not enforcement: the read-only guarantee is
|
|
53
|
+
the `ToolDefinition` handler contract in `src/tools/types.ts`. The tool-contract golden
|
|
54
|
+
(`src/fixtures/tool-contract.golden.json`) pins each tool's annotations.
|
|
55
|
+
|
|
42
56
|
This package covers the Node SDK only. Other language SDKs (`.NET`, Django, Flask, Spring) are out of scope for now.
|
|
43
57
|
|
|
44
58
|
The SDK has two entry points for two different kinds of service: `initializeService` for tenant services (the
|
|
@@ -209,6 +223,21 @@ nx test adsp-sdk-mcp-server
|
|
|
209
223
|
nx lint adsp-sdk-mcp-server
|
|
210
224
|
```
|
|
211
225
|
|
|
226
|
+
### Service matching evaluation
|
|
227
|
+
|
|
228
|
+
`src/eval/service-matching.json` holds needs described in product terms, such as "applicants attach supporting
|
|
229
|
+
documents to an application", each with the ADSP services that should answer it. The queries come from probes of the
|
|
230
|
+
hosted server and from the project-planner-service business patterns' `serviceMappings`. To see where
|
|
231
|
+
`search_adsp_docs` ranks the expected services over the repo's `docs/`, run:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npx nx run adsp-sdk-mcp-server:eval-service-matching
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
It prints a table and the number of queries with every expected service in the top 1, 3 and 5. It reports and does
|
|
238
|
+
not fail. Use it to compare a ranking change, or a new matching tool, against the baseline. `src/eval/` is not part
|
|
239
|
+
of the published package.
|
|
240
|
+
|
|
212
241
|
### Refresh workflow
|
|
213
242
|
|
|
214
243
|
The bundled content is refreshed from source on every release, not fetched live. After changing `docs/`, a service's
|
|
@@ -80,6 +80,16 @@ Cache service does not send domain events.
|
|
|
80
80
|
|
|
81
81
|
It consumes domain events from the [event service](event-service.md) to invalidate cache entries: events matching a target's `invalidationEvents`, and access service admin events for the access target. Events that don't match a target are ignored.
|
|
82
82
|
|
|
83
|
+
## Audit
|
|
84
|
+
|
|
85
|
+
Cache service records the following audit action under the `cache-service` namespace. Changes to cache target configuration are audited by the [configuration service](configuration-service.md).
|
|
86
|
+
|
|
87
|
+
| Action | Category | Severity | Retention class | Recorded when |
|
|
88
|
+
| --- | --- | --- | --- | --- |
|
|
89
|
+
| `cache.invalidated` | `administrative` | `info` | `standard` | An invalidation event removes one or more cache entries. |
|
|
90
|
+
|
|
91
|
+
The record's actor is the `system` (invalidation is driven by domain events), the resource is `{ type: 'cache-target', id: <target URN> }`, and the metadata includes the target URN, TTL, triggering event, and invalidated paths. Cache hits and misses, TTL expiry, and invalidation events that remove no entries are not audited. Set `CACHE_AUDIT_ENABLED=false` to disable audit recording.
|
|
92
|
+
|
|
83
93
|
## Code examples
|
|
84
94
|
|
|
85
95
|
### Configure a target
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/adsp-sdk-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - MCP server for ADSP documentation and Node SDK reference lookup.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|
package/provenance.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "release",
|
|
3
|
-
"builtAt": "2026-11-
|
|
4
|
-
"sourceCommit": "
|
|
5
|
-
"latestRelease": "1.
|
|
6
|
-
"docsCommit": "
|
|
3
|
+
"builtAt": "2026-11-16T20:18:04.243Z",
|
|
4
|
+
"sourceCommit": "07509c700ab7b8f13e7a6c68e2a782c5827ff79a",
|
|
5
|
+
"latestRelease": "1.30.0",
|
|
6
|
+
"docsCommit": "f5ec796791f7d2f031ce8973881d8511d04ea92b",
|
|
7
7
|
"sdk": {
|
|
8
8
|
"version": "2.36.1",
|
|
9
9
|
"commit": "dd58a2b854c4406b42c0604dba3fa4b941038d6c",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returned in the initialize result. Covers only what no single tool description can: which tool answers which
|
|
3
|
+
* kind of question, which tools need a login, and how fresh the bundled content is. Keep it short and never restate
|
|
4
|
+
* a tool description (server.spec.ts checks this); clients may truncate or ignore instructions.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SERVER_INSTRUCTIONS: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SERVER_INSTRUCTIONS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Returned in the initialize result. Covers only what no single tool description can: which tool answers which
|
|
6
|
+
* kind of question, which tools need a login, and how fresh the bundled content is. Keep it short and never restate
|
|
7
|
+
* a tool description (server.spec.ts checks this); clients may truncate or ignore instructions.
|
|
8
|
+
*/
|
|
9
|
+
exports.SERVER_INSTRUCTIONS = [
|
|
10
|
+
'Use this server to build services and apps on ADSP (Alberta Digital Service Platform). Pick the tool by the question:',
|
|
11
|
+
'- What ADSP offers, which service fits a need, platform concepts or how-tos: search_adsp_docs, then read_adsp_doc.',
|
|
12
|
+
' Search matches words, not meaning. If a need described in product terms finds nothing useful, search again with',
|
|
13
|
+
' the capability\'s name (e.g. "file", "calendar", "notification") or browse services/ with list_adsp_docs.',
|
|
14
|
+
'- Writing a Node service: get_platform_quickstart first, then search_sdk_reference for a specific symbol.',
|
|
15
|
+
"- Calling a service's REST API: search_service_endpoints, then read_service_endpoint.",
|
|
16
|
+
'- Roles a service account needs, or the configuration a platform service accepts from yours: list_service_roles,',
|
|
17
|
+
' get_service_configuration_schema. Only these two reach the live platform; the user must run',
|
|
18
|
+
' `npx @abgov/adsp-cli login` first. Every other tool answers offline from content bundled at build time.',
|
|
19
|
+
'Bundled content can lag the platform. get_adsp_mcp_server_info says when and from which commit it was built;',
|
|
20
|
+
'mention that when a detail may be out of date.',
|
|
21
|
+
].join('\n');
|
|
22
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../../libs/adsp-sdk-mcp-server/src/instructions.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,mBAAmB,GAAG;IACjC,uHAAuH;IACvH,oHAAoH;IACpH,mHAAmH;IACnH,6GAA6G;IAC7G,2GAA2G;IAC3G,uFAAuF;IACvF,kHAAkH;IAClH,+FAA+F;IAC/F,2GAA2G;IAC3G,8GAA8G;IAC9G,gDAAgD;CACjD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
|
package/src/server.js
CHANGED
|
@@ -8,6 +8,7 @@ const path_1 = require("path");
|
|
|
8
8
|
const perf_hooks_1 = require("perf_hooks");
|
|
9
9
|
const apiSpecsRepository_1 = require("./api-specs/apiSpecsRepository");
|
|
10
10
|
const docsRepository_1 = require("./docs/docsRepository");
|
|
11
|
+
const instructions_1 = require("./instructions");
|
|
11
12
|
const metrics_1 = require("./metrics");
|
|
12
13
|
const registerApiTools_1 = require("./tools/registerApiTools");
|
|
13
14
|
const registerConfigurationSchemaTool_1 = require("./tools/registerConfigurationSchemaTool");
|
|
@@ -60,9 +61,14 @@ function createAdspMcpServer(options = {}) {
|
|
|
60
61
|
// would fix it but risks changing runtime behavior for unrelated consumers (e.g. agent-service's Mastra agent
|
|
61
62
|
// config). Server + setRequestHandler avoids the SDK's zod-compat generics entirely; tools validate their own
|
|
62
63
|
// args with zod as a plain value (see tools/*.ts), never passing a schema through the SDK's type machinery.
|
|
63
|
-
const server = new index_js_1.Server({ name: 'adsp-sdk-mcp-server', version: (0, version_1.readPackageVersion)() }, { capabilities: { tools: {} } });
|
|
64
|
+
const server = new index_js_1.Server({ name: 'adsp-sdk-mcp-server', version: (0, version_1.readPackageVersion)() }, { capabilities: { tools: {} }, instructions: instructions_1.SERVER_INSTRUCTIONS });
|
|
64
65
|
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
|
|
65
|
-
tools: tools.map(({ name, description, inputSchema }) => ({
|
|
66
|
+
tools: tools.map(({ name, description, inputSchema, annotations }) => ({
|
|
67
|
+
name,
|
|
68
|
+
description,
|
|
69
|
+
inputSchema,
|
|
70
|
+
annotations,
|
|
71
|
+
})),
|
|
66
72
|
}));
|
|
67
73
|
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request, extra) => {
|
|
68
74
|
const started = perf_hooks_1.performance.now();
|
package/src/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../libs/adsp-sdk-mcp-server/src/server.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../libs/adsp-sdk-mcp-server/src/server.ts"],"names":[],"mappings":";;AA0CA,4CAwBC;AAED,kDA8CC;AAlHD,wEAAmE;AACnE,iEAAmH;AACnH,+BAAqC;AACrC,2CAAyC;AACzC,uEAAoE;AACpE,0DAAuD;AACvD,iDAAqD;AACrD,uCAAsD;AACtD,+DAA0D;AAC1D,6FAAyF;AACzF,yDAAqD;AACrD,iEAA4D;AAC5D,2EAAsE;AACtE,+EAA2E;AAC3E,+DAA0D;AAC1D,2EAAsE;AAEtE,uCAA+C;AAc/C,8HAA8H;AAC9H,MAAM,iBAAiB,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAClE,MAAM,sBAAsB,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AAE5E,MAAM,YAAY,GAAG,IAAI,GAAG,EAAwB,CAAC;AAErD,SAAS,IAAI,CAAI,MAAe;IAC9B,IAAI,KAAoB,CAAC;IACzB,O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
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const textSearch_1 = require("../search/textSearch");
|
|
6
|
+
const types_1 = require("./types");
|
|
6
7
|
const SearchArgs = zod_1.z.object({
|
|
7
8
|
query: zod_1.z.string(),
|
|
8
9
|
service: zod_1.z.string().optional(),
|
|
@@ -39,6 +40,7 @@ function createApiTools(loadApis) {
|
|
|
39
40
|
return [
|
|
40
41
|
{
|
|
41
42
|
name: 'list_service_apis',
|
|
43
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
42
44
|
description: 'List the ADSP services that publish a REST API, with each service URN and number of operations. Content ' +
|
|
43
45
|
'comes from the OpenAPI specs each service serves at /swagger/docs/v1, bundled offline.',
|
|
44
46
|
inputSchema: { type: 'object', properties: {} },
|
|
@@ -48,6 +50,7 @@ function createApiTools(loadApis) {
|
|
|
48
50
|
},
|
|
49
51
|
{
|
|
50
52
|
name: 'search_service_endpoints',
|
|
53
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
51
54
|
description: 'Search ADSP service REST endpoints by keyword (path, summary, tags and description), optionally within one ' +
|
|
52
55
|
'service. Returns method, path, summary and who may call it; use read_service_endpoint for parameters, ' +
|
|
53
56
|
'request and response schemas.',
|
|
@@ -81,6 +84,7 @@ function createApiTools(loadApis) {
|
|
|
81
84
|
},
|
|
82
85
|
{
|
|
83
86
|
name: 'read_service_endpoint',
|
|
87
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
84
88
|
description: "Read one ADSP REST endpoint as its service's OpenAPI spec defines it: description, who may call it, " +
|
|
85
89
|
'parameters, request body and responses, with schema references inlined.',
|
|
86
90
|
inputSchema: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerApiTools.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerApiTools.ts"],"names":[],"mappings":";;AA2CA,
|
|
1
|
+
{"version":3,"file":"registerApiTools.js","sourceRoot":"","sources":["../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;iBAC7G;gBACD,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;aACxC;YACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBAChB,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACpE,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAC;gBACxB,MAAM,OAAO,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;gBAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;oBACb,OAAO,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;gBAClD,OAAO,QAAQ;oBACb,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;oBAChB,CAAC,CAAC,SAAS,CACP,GAAG,OAAO,CAAC,GAAG,WAAW,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,oBAAoB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC3G,CAAC;YACR,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createConfigurationSchemaTools = createConfigurationSchemaTools;
|
|
4
4
|
const adsp_cli_1 = require("@abgov/adsp-cli");
|
|
5
5
|
const metrics_1 = require("../metrics");
|
|
6
|
+
const types_1 = require("./types");
|
|
6
7
|
const liveToolLimit_1 = require("./liveToolLimit");
|
|
7
8
|
const upstreamErrors_1 = require("./upstreamErrors");
|
|
8
9
|
function describeError(err) {
|
|
@@ -31,6 +32,7 @@ function createConfigurationSchemaTools() {
|
|
|
31
32
|
return [
|
|
32
33
|
{
|
|
33
34
|
name: 'get_service_configuration_schema',
|
|
35
|
+
annotations: types_1.LIVE_TOOL_ANNOTATIONS,
|
|
34
36
|
description: 'Returns the configuration schema(s) for ADSP platform services, read live from configuration-service. ' +
|
|
35
37
|
'Use this to determine the correct shape for `serviceConfigurations` entries in `initializeService` when ' +
|
|
36
38
|
'registering with a service that does not have a named field in `ServiceRegistration` (e.g. form-service, ' +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerConfigurationSchemaTool.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerConfigurationSchemaTool.ts"],"names":[],"mappings":";;AAwCA,
|
|
1
|
+
{"version":3,"file":"registerConfigurationSchemaTool.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerConfigurationSchemaTool.ts"],"names":[],"mappings":";;AAwCA,wEAoDC;AA5FD,8CAMyB;AACzB,wCAAwC;AACxC,mCAAoE;AACpE,mDAAqD;AACrD,qDAAyD;AAEzD,SAAS,aAAa,CAAC,GAAY;IACjC,IAAI,GAAG,YAAY,qCAA0B,EAAE,CAAC;QAC9C,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,IAAI,GAAG,YAAY,2BAAgB,EAAE,CAAC;QACpC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACvB,OAAO,uFAAuF,CAAC;QACjG,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACvB,OAAO,CACL,wGAAwG;gBACxG,4EAA4E,CAC7E,CAAC;QACJ,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YACtB,OAAO,wCAAwC,GAAG,CAAC,MAAM,0DAA0D,CAAC;QACtH,CAAC;QACD,OAAO,8BAA8B,GAAG,CAAC,MAAM,GAAG,CAAC;IACrD,CAAC;IAED,IAAI,GAAG,YAAY,SAAS,EAAE,CAAC;QAC7B,OAAO,sCAAsC,GAAG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,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;qBACpE,CAAC;gBACJ,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,IAAA,oBAAU,GAAE,CAAC,mBAAmB,CAAC,kCAAkC,EAAE,IAAA,sCAAqB,EAAC,GAAG,CAAC,CAAC,CAAC;oBACjG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBAClF,CAAC;YACH,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC;SACtB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createDocsTools = createDocsTools;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const textSearch_1 = require("../search/textSearch");
|
|
6
|
+
const types_1 = require("./types");
|
|
6
7
|
const SearchArgs = zod_1.z.object({
|
|
7
8
|
query: zod_1.z.string(),
|
|
8
9
|
limit: zod_1.z.number().int().min(1).max(20).optional(),
|
|
@@ -17,6 +18,7 @@ function createDocsTools(docs) {
|
|
|
17
18
|
return [
|
|
18
19
|
{
|
|
19
20
|
name: 'search_adsp_docs',
|
|
21
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
20
22
|
description: 'Search ADSP platform documentation (getting started, architecture, service concepts, and tutorials) by ' +
|
|
21
23
|
'keyword. Returns matching pages with a snippet; use read_adsp_doc with the returned path to read the full page.',
|
|
22
24
|
inputSchema: {
|
|
@@ -62,6 +64,7 @@ function createDocsTools(docs) {
|
|
|
62
64
|
},
|
|
63
65
|
{
|
|
64
66
|
name: 'list_adsp_docs',
|
|
67
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
65
68
|
description: 'List the paths and titles of every bundled ADSP doc page, optionally only those under a path prefix ' +
|
|
66
69
|
'(e.g. "services/" or "tutorials/"). Use it to browse what exists when keyword search misses; read a page ' +
|
|
67
70
|
'with read_adsp_doc.',
|
|
@@ -92,6 +95,7 @@ function createDocsTools(docs) {
|
|
|
92
95
|
},
|
|
93
96
|
{
|
|
94
97
|
name: 'read_adsp_doc',
|
|
98
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
95
99
|
description: 'Return the full markdown content of an ADSP doc page by its path, as returned by search_adsp_docs or ' +
|
|
96
100
|
'list_adsp_docs.',
|
|
97
101
|
inputSchema: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerDocsTools.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerDocsTools.ts"],"names":[],"mappings":";;AAkBA,
|
|
1
|
+
{"version":3,"file":"registerDocsTools.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerDocsTools.ts"],"names":[],"mappings":";;AAkBA,0CAyHC;AA3ID,6BAAwB;AAExB,qDAAkD;AAClD,mCAAmE;AAEnE,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IACxB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,SAAgB,eAAe,CAAC,IAAoB;IAClD,OAAO;QACL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gBAChB,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACtC,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5B,IAAI,CAAC,GAAG,EAAE,CAAC;oBACT,8HAA8H;oBAC9H,OAAO;wBACL,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAM;gCACZ,IAAI,EAAE,yBAAyB,IAAI,iEAAiE;6BACrG;yBACF;qBACF,CAAC;gBACJ,CAAC;gBAED,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,KAAK,OAAO,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;YACnF,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createQuickstartTool = createQuickstartTool;
|
|
4
|
+
const types_1 = require("./types");
|
|
4
5
|
const QUICKSTART = `# Getting started with @abgov/adsp-service-sdk (Node)
|
|
5
6
|
|
|
6
7
|
The SDK has two entry points for two different kinds of service. Most product teams building on ADSP want
|
|
@@ -146,6 +147,7 @@ function createQuickstartTool() {
|
|
|
146
147
|
return [
|
|
147
148
|
{
|
|
148
149
|
name: 'get_platform_quickstart',
|
|
150
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
149
151
|
description: 'Returns the canonical initializeService usage pattern for a new Node service built on top of ADSP (the ' +
|
|
150
152
|
'common case for product teams), notes the initializePlatform variant for cross-tenant platform services, ' +
|
|
151
153
|
'and summarizes the capabilities returned. Use this first for the most common question: how to start using ' +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerQuickstartTool.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerQuickstartTool.ts"],"names":[],"mappings":";;AAgJA,
|
|
1
|
+
{"version":3,"file":"registerQuickstartTool.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerQuickstartTool.ts"],"names":[],"mappings":";;AAgJA,oDAcC;AA9JD,mCAAmE;AAEnE,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4IlB,CAAC;AAEF,SAAgB,oBAAoB;IAClC,OAAO;QACL;YACE,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EAAE,gCAAwB;YACrC,WAAW,EACT,yGAAyG;gBACzG,2GAA2G;gBAC3G,4GAA4G;gBAC5G,2BAA2B;YAC7B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;YAC/C,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;SACnE;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createSdkTools = createSdkTools;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const search_1 = require("../sdk-reference/search");
|
|
6
|
+
const types_1 = require("./types");
|
|
6
7
|
const SearchArgs = zod_1.z.object({
|
|
7
8
|
query: zod_1.z.string(),
|
|
8
9
|
limit: zod_1.z.number().int().min(1).max(20).optional(),
|
|
@@ -11,6 +12,7 @@ function createSdkTools() {
|
|
|
11
12
|
return [
|
|
12
13
|
{
|
|
13
14
|
name: 'search_sdk_reference',
|
|
15
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
14
16
|
description: 'Search the @abgov/adsp-service-sdk (Node SDK) reference by symbol name, module, or keyword. Returns full ' +
|
|
15
17
|
'symbol details: kind, module, description, option/return shape, example, and deprecated flag.',
|
|
16
18
|
inputSchema: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerSdkTools.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerSdkTools.ts"],"names":[],"mappings":";;AASA,
|
|
1
|
+
{"version":3,"file":"registerSdkTools.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerSdkTools.ts"],"names":[],"mappings":";;AASA,wCAmCC;AA5CD,6BAAwB;AACxB,oDAA6D;AAC7D,mCAAmE;AAEnE,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAEH,SAAgB,cAAc;IAC5B,OAAO;QACL;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,gCAAwB;YACrC,WAAW,EACT,2GAA2G;gBAC3G,+FAA+F;YACjG,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kFAAkF;qBAChG;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kDAAkD;qBAChE;iBACF;gBACD,QAAQ,EAAE,CAAC,OAAO,CAAC;aACpB;YACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBAChB,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAChD,MAAM,OAAO,GAAG,IAAA,2BAAkB,EAAC,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;gBACtD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBACzB,OAAO;wBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0DAA0D,KAAK,IAAI,EAAE,CAAC;qBACvG,CAAC;gBACJ,CAAC;gBAED,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;YACjF,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -6,6 +6,7 @@ const fs_1 = require("fs");
|
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const reference_1 = require("../sdk-reference/reference");
|
|
8
8
|
const version_1 = require("../version");
|
|
9
|
+
const types_1 = require("./types");
|
|
9
10
|
const PROVENANCE_PATH = (0, path_1.join)(__dirname, '..', '..', 'provenance.json');
|
|
10
11
|
function readProvenance(path = PROVENANCE_PATH) {
|
|
11
12
|
try {
|
|
@@ -37,6 +38,7 @@ function createServerInfoTool(docs, provenance = readProvenance()) {
|
|
|
37
38
|
return [
|
|
38
39
|
{
|
|
39
40
|
name: 'get_adsp_mcp_server_info',
|
|
41
|
+
annotations: types_1.OFFLINE_TOOL_ANNOTATIONS,
|
|
40
42
|
description: "Report this server's version and where its bundled content came from: the docs source commit, the " +
|
|
41
43
|
'@abgov/adsp-service-sdk version the SDK reference matches, and when it was built. Use it to tell a user ' +
|
|
42
44
|
'when an answer may be stale.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerServerInfoTool.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerServerInfoTool.ts"],"names":[],"mappings":";;AAsBA,wCAMC;AAkBD,
|
|
1
|
+
{"version":3,"file":"registerServerInfoTool.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerServerInfoTool.ts"],"names":[],"mappings":";;AAsBA,wCAMC;AAkBD,oDAqBC;AAnED,2BAAkC;AAClC,+BAA4B;AAE5B,0DAA2D;AAC3D,wCAAgD;AAChD,mCAAmE;AAenE,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;AAEvE,SAAgB,cAAc,CAAC,IAAI,GAAG,eAAe;IACnD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,UAA6B;IACvD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,8EAA8E,CAAC;IACxF,CAAC;IAED,MAAM,IAAI,GAAG,wCAAwC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC1E,MAAM,MAAM,GACV,UAAU,CAAC,IAAI,KAAK,QAAQ;QAC1B,CAAC,CAAC,8BAA8B,UAAU,CAAC,YAAY,IAAI,SAAS,kBAAkB,UAAU,CAAC,aAAa,IAAI,SAAS,EAAE;QAC7H,CAAC,CAAC,EAAE,CAAC;IACT,OAAO,CACL,GAAG,IAAI,GAAG,MAAM,2FAA2F;QAC3G,gBAAgB,CACjB,CAAC;AACJ,CAAC;AAED,SAAgB,oBAAoB,CAAC,IAAoB,EAAE,UAAU,GAAG,cAAc,EAAE;IACtF,MAAM,IAAI,GAAG;QACX,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,IAAA,4BAAkB,GAAE;QAC7B,UAAU;QACV,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,yBAAa,CAAC,MAAM,EAAE;QACpF,IAAI,EAAE,kBAAkB,CAAC,UAAU,CAAC;KACrC,CAAC;IAEF,OAAO;QACL;YACE,IAAI,EAAE,0BAA0B;YAChC,WAAW,EAAE,gCAAwB;YACrC,WAAW,EACT,oGAAoG;gBACpG,0GAA0G;gBAC1G,8BAA8B;YAChC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;YAC/C,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;SACtF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createServiceRolesTools = createServiceRolesTools;
|
|
4
4
|
const adsp_cli_1 = require("@abgov/adsp-cli");
|
|
5
5
|
const metrics_1 = require("../metrics");
|
|
6
|
+
const types_1 = require("./types");
|
|
6
7
|
const liveToolLimit_1 = require("./liveToolLimit");
|
|
7
8
|
const upstreamErrors_1 = require("./upstreamErrors");
|
|
8
9
|
function describeError(err) {
|
|
@@ -52,6 +53,7 @@ function createServiceRolesTools() {
|
|
|
52
53
|
return [
|
|
53
54
|
{
|
|
54
55
|
name: 'list_service_roles',
|
|
56
|
+
annotations: types_1.LIVE_TOOL_ANNOTATIONS,
|
|
55
57
|
description: 'List every ADSP platform service\'s registered RBAC role (role name, description, whether it is ' +
|
|
56
58
|
'part of the tenant-admin composite role), read live from tenant-service configuration. Use this to ' +
|
|
57
59
|
'identify the least-privileged role when your service needs to call another ADSP service. After ' +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerServiceRolesTool.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerServiceRolesTool.ts"],"names":[],"mappings":";;AA8DA,
|
|
1
|
+
{"version":3,"file":"registerServiceRolesTool.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/registerServiceRolesTool.ts"],"names":[],"mappings":";;AA8DA,0DAyCC;AAvGD,8CAMyB;AACzB,wCAAwC;AACxC,mCAAoE;AACpE,mDAAqD;AACrD,qDAAyD;AAEzD,SAAS,aAAa,CAAC,GAAY;IACjC,IAAI,GAAG,YAAY,qCAA0B,EAAE,CAAC;QAC9C,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,IAAI,GAAG,YAAY,2BAAgB,EAAE,CAAC;QACpC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACvB,OAAO,uFAAuF,CAAC;QACjG,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACvB,OAAO,CACL,uGAAuG;gBACvG,4EAA4E,CAC7E,CAAC;QACJ,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YACtB,OAAO,wCAAwC,GAAG,CAAC,MAAM,0DAA0D,CAAC;QACtH,CAAC;QACD,OAAO,8BAA8B,GAAG,CAAC,MAAM,GAAG,CAAC;IACrD,CAAC;IAED,IAAI,GAAG,YAAY,SAAS,EAAE,CAAC;QAC7B,OAAO,sCAAsC,GAAG,CAAC,OAAO,2EAA2E,CAAC;IACtI,CAAC;IAED,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;CAoB9B,CAAC;AAEF,SAAgB,uBAAuB;IACrC,OAAO;QACL;YACE,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EAA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E,MAAM,EAAE,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBAClF,CAAC;YACH,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC;SACtB;KACF,CAAC;AACJ,CAAC"}
|
package/src/tools/types.d.ts
CHANGED
|
@@ -8,10 +8,23 @@ export interface ToolCallContext {
|
|
|
8
8
|
/** Aborted when the client cancels the call or disconnects. */
|
|
9
9
|
signal?: AbortSignal;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* MCP tool annotations are hints for the client, not enforcement. Every tool here only reads, so all declare
|
|
13
|
+
* `readOnlyHint`. Offline tools answer from content bundled in the package, so they also declare a closed world;
|
|
14
|
+
* live tools call ADSP APIs and keep the spec's default open world.
|
|
15
|
+
*/
|
|
16
|
+
export declare const OFFLINE_TOOL_ANNOTATIONS: {
|
|
17
|
+
readonly readOnlyHint: true;
|
|
18
|
+
readonly openWorldHint: false;
|
|
19
|
+
};
|
|
20
|
+
export declare const LIVE_TOOL_ANNOTATIONS: {
|
|
21
|
+
readonly readOnlyHint: true;
|
|
22
|
+
};
|
|
11
23
|
export interface ToolDefinition {
|
|
12
24
|
name: string;
|
|
13
25
|
description: string;
|
|
14
26
|
inputSchema: JsonSchemaObject;
|
|
27
|
+
annotations: typeof OFFLINE_TOOL_ANNOTATIONS;
|
|
15
28
|
/**
|
|
16
29
|
* Must be a pure lookup/computation over `args` and this tool's own read-only data (docs, SDK reference) — no
|
|
17
30
|
* network calls, filesystem writes, or other external side effects. `CallToolResult.isError` on the return value
|
|
@@ -24,6 +37,7 @@ export interface LiveToolDefinition {
|
|
|
24
37
|
name: string;
|
|
25
38
|
description: string;
|
|
26
39
|
inputSchema: JsonSchemaObject;
|
|
40
|
+
annotations: typeof LIVE_TOOL_ANNOTATIONS;
|
|
27
41
|
/**
|
|
28
42
|
* Unlike ToolDefinition.handler, this MAY make network calls and read local files (e.g. an
|
|
29
43
|
* ADSP API call authenticated via a cached CLI login token) — it is not required to be a pure,
|
package/src/tools/types.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LIVE_TOOL_ANNOTATIONS = exports.OFFLINE_TOOL_ANNOTATIONS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* MCP tool annotations are hints for the client, not enforcement. Every tool here only reads, so all declare
|
|
6
|
+
* `readOnlyHint`. Offline tools answer from content bundled in the package, so they also declare a closed world;
|
|
7
|
+
* live tools call ADSP APIs and keep the spec's default open world.
|
|
8
|
+
*/
|
|
9
|
+
exports.OFFLINE_TOOL_ANNOTATIONS = { readOnlyHint: true, openWorldHint: false };
|
|
10
|
+
exports.LIVE_TOOL_ANNOTATIONS = { readOnlyHint: true };
|
|
3
11
|
//# sourceMappingURL=types.js.map
|
package/src/tools/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../libs/adsp-sdk-mcp-server/src/tools/types.ts"],"names":[],"mappings":";;;AAaA;;;;GAIG;AACU,QAAA,wBAAwB,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAW,CAAC;AACjF,QAAA,qBAAqB,GAAG,EAAE,YAAY,EAAE,IAAI,EAAW,CAAC"}
|