@novorb/mcp-core 2.1.1 → 3.0.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 +82 -161
- package/bin/mcp-core-jest.mjs +112 -0
- package/dist/auth.d.ts +57 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +74 -0
- package/dist/auth.js.map +1 -0
- package/dist/bootstrap.d.ts +129 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +206 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/client-input.d.ts +72 -0
- package/dist/client-input.d.ts.map +1 -0
- package/dist/client-input.js +109 -0
- package/dist/client-input.js.map +1 -0
- package/dist/credential-checks.d.ts +80 -0
- package/dist/credential-checks.d.ts.map +1 -0
- package/dist/credential-checks.js +189 -0
- package/dist/credential-checks.js.map +1 -0
- package/dist/credential-health.d.ts +12 -0
- package/dist/credential-health.d.ts.map +1 -0
- package/dist/credential-health.js +12 -0
- package/dist/credential-health.js.map +1 -0
- package/dist/credential-report.d.ts +46 -0
- package/dist/credential-report.d.ts.map +1 -0
- package/dist/credential-report.js +135 -0
- package/dist/credential-report.js.map +1 -0
- package/dist/credential-status-tool.d.ts +20 -0
- package/dist/credential-status-tool.d.ts.map +1 -0
- package/dist/credential-status-tool.js +33 -0
- package/dist/credential-status-tool.js.map +1 -0
- package/dist/credentials.d.ts +288 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +652 -0
- package/dist/credentials.js.map +1 -0
- package/dist/express-peers.d.ts +29 -0
- package/dist/express-peers.d.ts.map +1 -0
- package/dist/express-peers.js +36 -0
- package/dist/express-peers.js.map +1 -0
- package/dist/express.d.ts +74 -0
- package/dist/express.d.ts.map +1 -0
- package/dist/express.js +164 -0
- package/dist/express.js.map +1 -0
- package/dist/http-client.d.ts +278 -43
- package/dist/http-client.d.ts.map +1 -1
- package/dist/http-client.js +620 -182
- package/dist/http-client.js.map +1 -1
- package/dist/index.d.ts +27 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -10
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +28 -0
- package/dist/limits.d.ts.map +1 -0
- package/dist/limits.js +37 -0
- package/dist/limits.js.map +1 -0
- package/dist/list-pagination.d.ts +41 -0
- package/dist/list-pagination.d.ts.map +1 -0
- package/dist/list-pagination.js +104 -0
- package/dist/list-pagination.js.map +1 -0
- package/dist/net.d.ts +112 -0
- package/dist/net.d.ts.map +1 -0
- package/dist/net.js +490 -0
- package/dist/net.js.map +1 -0
- package/dist/notifications.d.ts +78 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +173 -0
- package/dist/notifications.js.map +1 -0
- package/dist/pagination.d.ts +236 -5
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +393 -6
- package/dist/pagination.js.map +1 -1
- package/dist/prompts.d.ts +70 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +109 -0
- package/dist/prompts.js.map +1 -0
- package/dist/protocol-errors.d.ts +15 -0
- package/dist/protocol-errors.d.ts.map +1 -0
- package/dist/protocol-errors.js +28 -0
- package/dist/protocol-errors.js.map +1 -0
- package/dist/protocol-logging.d.ts +37 -0
- package/dist/protocol-logging.d.ts.map +1 -0
- package/dist/protocol-logging.js +77 -0
- package/dist/protocol-logging.js.map +1 -0
- package/dist/rate-limiter.d.ts +36 -0
- package/dist/rate-limiter.d.ts.map +1 -0
- package/dist/rate-limiter.js +79 -0
- package/dist/rate-limiter.js.map +1 -0
- package/dist/request-state.d.ts +74 -0
- package/dist/request-state.d.ts.map +1 -0
- package/dist/request-state.js +190 -0
- package/dist/request-state.js.map +1 -0
- package/dist/resources.d.ts +181 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +302 -0
- package/dist/resources.js.map +1 -0
- package/dist/result-limits.d.ts +80 -0
- package/dist/result-limits.d.ts.map +1 -0
- package/dist/result-limits.js +248 -0
- package/dist/result-limits.js.map +1 -0
- package/dist/retry.d.ts +79 -23
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +170 -57
- package/dist/retry.js.map +1 -1
- package/dist/sdk/client-stdio.d.ts +6 -0
- package/dist/sdk/client-stdio.d.ts.map +1 -0
- package/dist/sdk/client-stdio.js +6 -0
- package/dist/sdk/client-stdio.js.map +1 -0
- package/dist/sdk/client.d.ts +6 -0
- package/dist/sdk/client.d.ts.map +1 -0
- package/dist/sdk/client.js +6 -0
- package/dist/sdk/client.js.map +1 -0
- package/dist/sdk/express.d.ts +3 -0
- package/dist/sdk/express.d.ts.map +1 -0
- package/dist/sdk/express.js +11 -0
- package/dist/sdk/express.js.map +1 -0
- package/dist/sdk/node.d.ts +6 -0
- package/dist/sdk/node.d.ts.map +1 -0
- package/dist/sdk/node.js +6 -0
- package/dist/sdk/node.js.map +1 -0
- package/dist/sdk/server-stdio.d.ts +6 -0
- package/dist/sdk/server-stdio.d.ts.map +1 -0
- package/dist/sdk/server-stdio.js +6 -0
- package/dist/sdk/server-stdio.js.map +1 -0
- package/dist/sdk/server.d.ts +6 -0
- package/dist/sdk/server.d.ts.map +1 -0
- package/dist/sdk/server.js +6 -0
- package/dist/sdk/server.js.map +1 -0
- package/dist/server.d.ts +88 -36
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +98 -44
- package/dist/server.js.map +1 -1
- package/dist/task-request.d.ts +20 -0
- package/dist/task-request.d.ts.map +1 -0
- package/dist/task-request.js +43 -0
- package/dist/task-request.js.map +1 -0
- package/dist/task-store.d.ts +230 -0
- package/dist/task-store.d.ts.map +1 -0
- package/dist/task-store.js +459 -0
- package/dist/task-store.js.map +1 -0
- package/dist/task-tools.d.ts +115 -0
- package/dist/task-tools.d.ts.map +1 -0
- package/dist/task-tools.js +397 -0
- package/dist/task-tools.js.map +1 -0
- package/dist/testing/client.d.ts +25 -0
- package/dist/testing/client.d.ts.map +1 -0
- package/dist/testing/client.js +11 -0
- package/dist/testing/client.js.map +1 -0
- package/dist/testing/in-memory.d.ts +26 -0
- package/dist/testing/in-memory.d.ts.map +1 -0
- package/dist/testing/in-memory.js +41 -0
- package/dist/testing/in-memory.js.map +1 -0
- package/dist/testing/index.d.ts +20 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +20 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/isolated-dirs.d.ts +27 -0
- package/dist/testing/isolated-dirs.d.ts.map +1 -0
- package/dist/testing/isolated-dirs.js +67 -0
- package/dist/testing/isolated-dirs.js.map +1 -0
- package/dist/testing/logs.d.ts +61 -0
- package/dist/testing/logs.d.ts.map +1 -0
- package/dist/testing/logs.js +113 -0
- package/dist/testing/logs.js.map +1 -0
- package/dist/testing/raw-http.d.ts +25 -0
- package/dist/testing/raw-http.d.ts.map +1 -0
- package/dist/testing/raw-http.js +41 -0
- package/dist/testing/raw-http.js.map +1 -0
- package/dist/testing/raw-peer.d.ts +43 -0
- package/dist/testing/raw-peer.d.ts.map +1 -0
- package/dist/testing/raw-peer.js +101 -0
- package/dist/testing/raw-peer.js.map +1 -0
- package/dist/testing/recording-server.d.ts +38 -0
- package/dist/testing/recording-server.d.ts.map +1 -0
- package/dist/testing/recording-server.js +38 -0
- package/dist/testing/recording-server.js.map +1 -0
- package/dist/testing/server-process.d.ts +76 -0
- package/dist/testing/server-process.d.ts.map +1 -0
- package/dist/testing/server-process.js +241 -0
- package/dist/testing/server-process.js.map +1 -0
- package/dist/testing/tools.d.ts +53 -0
- package/dist/testing/tools.d.ts.map +1 -0
- package/dist/testing/tools.js +98 -0
- package/dist/testing/tools.js.map +1 -0
- package/dist/testing/unit.d.ts +52 -0
- package/dist/testing/unit.d.ts.map +1 -0
- package/dist/testing/unit.js +95 -0
- package/dist/testing/unit.js.map +1 -0
- package/dist/tools.d.ts +205 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +370 -0
- package/dist/tools.js.map +1 -0
- package/dist/transport.d.ts +144 -53
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +305 -122
- package/dist/transport.js.map +1 -1
- package/dist/url-path.d.ts +49 -0
- package/dist/url-path.d.ts.map +1 -0
- package/dist/url-path.js +165 -0
- package/dist/url-path.js.map +1 -0
- package/dist/utils/dataStore.d.ts +143 -0
- package/dist/utils/dataStore.d.ts.map +1 -0
- package/dist/utils/dataStore.js +429 -0
- package/dist/utils/dataStore.js.map +1 -0
- package/dist/utils/envLoader.d.ts +129 -0
- package/dist/utils/envLoader.d.ts.map +1 -0
- package/dist/utils/envLoader.js +399 -0
- package/dist/utils/envLoader.js.map +1 -0
- package/dist/utils/logger.d.ts +181 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +664 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/redact.d.ts +50 -0
- package/dist/utils/redact.d.ts.map +1 -0
- package/dist/utils/redact.js +318 -0
- package/dist/utils/redact.js.map +1 -0
- package/docs/api-reference.md +29 -0
- package/docs/building-a-server.md +63 -0
- package/docs/credentials.md +131 -0
- package/docs/data-store.md +37 -0
- package/docs/env.md +38 -0
- package/docs/features.md +28 -0
- package/docs/http-client.md +116 -0
- package/docs/logger.md +100 -0
- package/docs/migrating-to-v3.md +45 -0
- package/docs/outbound-urls.md +104 -0
- package/docs/pagination.md +45 -0
- package/docs/protocol-features.md +62 -0
- package/docs/resources-prompts-tasks.md +95 -0
- package/docs/sdk.md +33 -0
- package/docs/server.md +68 -0
- package/docs/testing-harness.md +139 -0
- package/docs/testing.md +151 -0
- package/docs/tools.md +88 -0
- package/docs/transport.md +85 -0
- package/examples/testing/tools.integration.test.example.ts +312 -0
- package/examples/testing/tools.unit.test.example.ts +149 -0
- package/package.json +140 -18
- package/dist/logger.d.ts +0 -80
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js +0 -236
- package/dist/logger.js.map +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @novorb/mcp-core/testing - in-process UNIT helpers: call a server's tools by name over the in-memory
|
|
3
|
+
* transport (no child process, no network) and assert on the outcome without a test-runner import.
|
|
4
|
+
*
|
|
5
|
+
* Observed SDK v2 behaviour for an McpServer (pinned by mcp-core's own tests):
|
|
6
|
+
* - arguments that fail the tool's inputSchema come back as a RESULT with `isError: true` and text
|
|
7
|
+
* starting `Input validation error:`;
|
|
8
|
+
* - an unknown tool name is a THROWN ProtocolError, code -32602 (InvalidParams), `Tool <name> not found`.
|
|
9
|
+
* Low-level `Server` consumers may surface either one either way, so the helpers accept both.
|
|
10
|
+
*/
|
|
11
|
+
import { connectInMemory } from './in-memory.js';
|
|
12
|
+
import { callToolJson } from './tools.js';
|
|
13
|
+
/** JSON-RPC InvalidParams: the code the SDK uses for unknown tools (and some schema rejections). */
|
|
14
|
+
export const INVALID_PARAMS_CODE = -32602;
|
|
15
|
+
/** Run `fn` with a client connected in memory to `factory`; always closes. */
|
|
16
|
+
export async function withInMemoryClient(factory, fn, options = {}) {
|
|
17
|
+
const conn = await connectInMemory(factory, options);
|
|
18
|
+
try {
|
|
19
|
+
return await fn(conn.client);
|
|
20
|
+
}
|
|
21
|
+
finally {
|
|
22
|
+
await conn.close();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Build a server from `factory`, call one tool in memory, decode the result, and close. */
|
|
26
|
+
export async function callToolInMemory(factory, name, args = {}, options = {}) {
|
|
27
|
+
return withInMemoryClient(factory, (client) => callToolJson(client, name, args), options);
|
|
28
|
+
}
|
|
29
|
+
/** Call a tool and capture a thrown protocol error as data instead of rethrowing it. */
|
|
30
|
+
export async function captureToolCall(client, name, args = {}) {
|
|
31
|
+
try {
|
|
32
|
+
return { kind: 'result', result: await callToolJson(client, name, args) };
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
const code = typeof e === 'object' && e !== null ? e.code : undefined;
|
|
36
|
+
return {
|
|
37
|
+
kind: 'protocol-error',
|
|
38
|
+
code: typeof code === 'number' ? code : undefined,
|
|
39
|
+
message: e instanceof Error ? e.message : String(e),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function matches(text, pattern) {
|
|
44
|
+
if (pattern === undefined)
|
|
45
|
+
return true;
|
|
46
|
+
return typeof pattern === 'string' ? text.includes(pattern) : pattern.test(text);
|
|
47
|
+
}
|
|
48
|
+
/** Throw unless `result.isError` is true (and its text matches `pattern`); returns the error text. */
|
|
49
|
+
export function expectToolError(result, pattern) {
|
|
50
|
+
if (!result.isError) {
|
|
51
|
+
throw new Error(`Expected an isError result, got success: ${result.text.slice(0, 200)}`);
|
|
52
|
+
}
|
|
53
|
+
if (!matches(result.text, pattern)) {
|
|
54
|
+
throw new Error(`isError text did not match ${String(pattern)}: ${result.text.slice(0, 200)}`);
|
|
55
|
+
}
|
|
56
|
+
return result.text;
|
|
57
|
+
}
|
|
58
|
+
/** Throw unless the result is a success; returns the decoded body. */
|
|
59
|
+
export function expectToolSuccess(result) {
|
|
60
|
+
if (result.isError)
|
|
61
|
+
throw new Error(`Expected success, got isError: ${result.text.slice(0, 200)}`);
|
|
62
|
+
return result.body;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Call a tool with arguments its schema must reject and throw unless it was rejected: an isError result
|
|
66
|
+
* (`Input validation error` on McpServer) or an InvalidParams protocol error.
|
|
67
|
+
*/
|
|
68
|
+
export async function expectSchemaRejection(client, name, args) {
|
|
69
|
+
const outcome = await captureToolCall(client, name, args);
|
|
70
|
+
if (outcome.kind === 'protocol-error') {
|
|
71
|
+
if (outcome.code !== INVALID_PARAMS_CODE) {
|
|
72
|
+
throw new Error(`Expected a schema rejection (code ${INVALID_PARAMS_CODE}), got code ${outcome.code}: ${outcome.message}`);
|
|
73
|
+
}
|
|
74
|
+
return { via: 'protocol-error', message: outcome.message };
|
|
75
|
+
}
|
|
76
|
+
if (!outcome.result.isError) {
|
|
77
|
+
throw new Error(`Expected ${name} to reject its arguments, but it succeeded`);
|
|
78
|
+
}
|
|
79
|
+
return { via: 'tool-error', message: outcome.result.text };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Call a tool name the server does not have and throw unless it was refused: a protocol error, or an
|
|
83
|
+
* isError result whose text says the tool is unknown / not found (any other error result, such as a
|
|
84
|
+
* schema rejection of an EXISTING tool, does not count).
|
|
85
|
+
*/
|
|
86
|
+
export async function expectUnknownTool(client, name) {
|
|
87
|
+
const outcome = await captureToolCall(client, name, {});
|
|
88
|
+
if (outcome.kind === 'protocol-error')
|
|
89
|
+
return { via: 'protocol-error', message: outcome.message };
|
|
90
|
+
if (outcome.result.isError && /unknown|not found/i.test(outcome.result.text)) {
|
|
91
|
+
return { via: 'tool-error', message: outcome.result.text };
|
|
92
|
+
}
|
|
93
|
+
throw new Error(`Expected unknown tool ${name} to be refused, got: ${outcome.result.text.slice(0, 200)}`);
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.js","sourceRoot":"","sources":["../../src/testing/unit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAuB,MAAM,YAAY,CAAC;AAE/D,oGAAoG;AACpG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAK,CAAC;AAE1C,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAsB,EACtB,EAAkC,EAClC,UAA6B,EAAE;IAE/B,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACrD,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;YAAS,CAAC;QACT,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;AACH,CAAC;AAED,4FAA4F;AAC5F,MAAM,CAAC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AC;IAC7D,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,YAAY,IAAI,4CAA4C,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC7D,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAc,EAAE,IAAY;IAClE,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACxD,IAAI,OAAO,CAAC,IAAI,KAAK,gBAAgB;QAAE,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;IAClG,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7E,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC7D,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,wBAAwB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAC5G,CAAC"}
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @novorb/mcp-core - Tools
|
|
3
|
+
*
|
|
4
|
+
* Register a server's tool definitions on an SDK v2 `McpServer` through `McpServer.registerTool`, so
|
|
5
|
+
* the SDK keeps doing what it does (tools/list from the schemas, input validation, output validation
|
|
6
|
+
* with the era projection, unknown tool = ProtocolError -32602) and mcp-core adds only what it lacks:
|
|
7
|
+
*
|
|
8
|
+
* - one central wrapper per tool: `logToolCall` / `logToolResult` with the duration (shape only,
|
|
9
|
+
* never values);
|
|
10
|
+
* - thrown errors become an `isError` result through `mapError` (default: a safe message, never a
|
|
11
|
+
* stack trace, never a raw error object); a thrown schema error (zod / Standard Schema issues) names
|
|
12
|
+
* the offending fields;
|
|
13
|
+
* - a returned legacy `{ success: false, error }` envelope becomes `isError: true`;
|
|
14
|
+
* - degraded mode: a tool whose `requires` env keys are not configured is still LISTED and answers one
|
|
15
|
+
* uniform error, `<server> is not configured: set <KEYS>`;
|
|
16
|
+
* - `enabled` filters what is registered at all.
|
|
17
|
+
*
|
|
18
|
+
* registerTools(server, [
|
|
19
|
+
* {
|
|
20
|
+
* name: 'lookup',
|
|
21
|
+
* description: 'Look up a value',
|
|
22
|
+
* inputSchema: z.object({ key: z.string() }),
|
|
23
|
+
* annotations: TOOL_ANNOTATIONS.readOnly,
|
|
24
|
+
* requires: ['API_TOKEN'],
|
|
25
|
+
* handler: async ({ key }, ctx) => toolResult(await client.get(key, { signal: ctx.signal })),
|
|
26
|
+
* },
|
|
27
|
+
* ], { env, serverName: 'my-mcp' });
|
|
28
|
+
*/
|
|
29
|
+
import { type AuthInfo, type CallToolResult, type ClientCapabilities, type Icon, type InputRequests, type InputRequiredResult, type RegisteredTool, type ScopeChallengeHandler, type ServerContext, type StandardSchemaWithJSON } from '@modelcontextprotocol/server';
|
|
30
|
+
import { type ClientInput, type RequestEra } from './client-input.js';
|
|
31
|
+
import { type CredentialRegistry, CredentialScope } from './credentials.js';
|
|
32
|
+
import { type RuntimeSurface } from './notifications.js';
|
|
33
|
+
import { type OversizeInfo, type ResultEnvelope, type ToolLimits } from './result-limits.js';
|
|
34
|
+
import { type McpServer, type McpToolAnnotations } from './server.js';
|
|
35
|
+
import type { LoadedEnv } from './utils/envLoader.js';
|
|
36
|
+
import { type Logger } from './utils/logger.js';
|
|
37
|
+
/** Re-exported so `ToolDefinition.envelope` is typable from this subpath alone. */
|
|
38
|
+
export type { ResultEnvelope } from './result-limits.js';
|
|
39
|
+
/** A `{ success, data, error }` tool body, which `normalizeOutcome` maps to a tool result. */
|
|
40
|
+
export interface LegacyEnvelope {
|
|
41
|
+
success: boolean;
|
|
42
|
+
data?: unknown;
|
|
43
|
+
error?: unknown;
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* What a tool handler may return: an MCP result, an SDK input-required result (elicitation, sampling,
|
|
48
|
+
* roots through `ctx.elicit` / `ctx.sample` / `ctx.listRoots` or the SDK's `inputRequired(...)`;
|
|
49
|
+
* passed through untouched), or a legacy envelope (mapped to a result).
|
|
50
|
+
*/
|
|
51
|
+
export type ToolOutcome = CallToolResult | InputRequiredResult | LegacyEnvelope;
|
|
52
|
+
/** Inferred handler arguments for an input schema. */
|
|
53
|
+
export type ToolArgs<I extends StandardSchemaWithJSON> = StandardSchemaWithJSON.InferOutput<I>;
|
|
54
|
+
/**
|
|
55
|
+
* Per-call context handed to every handler. The client input helpers (`elicit`, `elicitUrl`, `sample`,
|
|
56
|
+
* `listRoots`, see `client-input.ts`) answer a typed outcome and never throw.
|
|
57
|
+
*/
|
|
58
|
+
export interface ToolContext extends ClientInput {
|
|
59
|
+
/** The tool name. */
|
|
60
|
+
tool: string;
|
|
61
|
+
/** Aborted when the client cancels or disconnects; pass it to outbound calls. */
|
|
62
|
+
signal: AbortSignal;
|
|
63
|
+
/** Caller identity when the transport supplies one (HTTP with an auth layer); otherwise undefined. */
|
|
64
|
+
authInfo?: AuthInfo;
|
|
65
|
+
/** The `cursor` argument of a list tool, when it is a non-empty string. */
|
|
66
|
+
cursor?: string;
|
|
67
|
+
/** The protocol era of this request (undefined when a handler is invoked directly). */
|
|
68
|
+
era?: RequestEra;
|
|
69
|
+
/** The client's declared capabilities, when known (stdio and 2026-07-28 requests). */
|
|
70
|
+
clientCapabilities?: ClientCapabilities;
|
|
71
|
+
/** The mcp-core logger. */
|
|
72
|
+
logger: Logger;
|
|
73
|
+
/**
|
|
74
|
+
* This call's credential scope: `pick(pool)` / `require(pool)` / `candidates(pool)` /
|
|
75
|
+
* `withFallback(pool, fn)` choose a healthy key NAME, `record(key, outcome)` reports what a use
|
|
76
|
+
* showed. Every key touched here is reported on the result (see "Credential health").
|
|
77
|
+
*/
|
|
78
|
+
credentials: CredentialScope;
|
|
79
|
+
/**
|
|
80
|
+
* Send a progress notification when the client asked for progress (a `progressToken`); a no-op
|
|
81
|
+
* otherwise, once the request is cancelled, and when the send fails (progress never fails a tool).
|
|
82
|
+
*/
|
|
83
|
+
progress(progress: number, total?: number, message?: string): Promise<void>;
|
|
84
|
+
/** The raw SDK handler context (undefined when a handler is invoked directly, e.g. in unit tests). */
|
|
85
|
+
sdk?: ServerContext;
|
|
86
|
+
/**
|
|
87
|
+
* The VERIFIED requestState payload of a multi-step retry (the server's `requestStateCodec` has
|
|
88
|
+
* already authenticated it). Undefined on a first call, and always undefined when the server has no
|
|
89
|
+
* codec: a raw, unverified wire string is never handed out.
|
|
90
|
+
*/
|
|
91
|
+
requestState<T = unknown>(): T | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Ask for another round: seal `state` with the server's codec (bound to this caller) and return the
|
|
94
|
+
* input-required result to answer with; the handler is re-entered with `requestState()` = `state`
|
|
95
|
+
* and the client's answers to `inputRequests` (`ctx.elicit(...)` reads them by key). Throws
|
|
96
|
+
* `RequestStateKeyError` when the server has no codec (MCP_REQUEST_STATE_KEY not configured).
|
|
97
|
+
*/
|
|
98
|
+
continueWith<T>(state: T, inputRequests?: InputRequests): Promise<InputRequiredResult>;
|
|
99
|
+
}
|
|
100
|
+
export interface ToolDefinition<I extends StandardSchemaWithJSON = StandardSchemaWithJSON> {
|
|
101
|
+
name: string;
|
|
102
|
+
title?: string;
|
|
103
|
+
description: string;
|
|
104
|
+
/** A zod 4 object (or `fromJsonSchema(...)` for a JSON Schema). */
|
|
105
|
+
inputSchema: I;
|
|
106
|
+
/** Optional output schema; the SDK validates `structuredContent` against it. */
|
|
107
|
+
outputSchema?: StandardSchemaWithJSON;
|
|
108
|
+
/** Required: use a `TOOL_ANNOTATIONS` preset (an `*OpenWorld` one when the tool calls an external API). */
|
|
109
|
+
annotations: McpToolAnnotations;
|
|
110
|
+
/** Icons for clients that show them (SDK `Tool.icons`). */
|
|
111
|
+
icons?: Icon[];
|
|
112
|
+
/** Tool `_meta` (SDK `Tool._meta`), passed to the wire unchanged. */
|
|
113
|
+
_meta?: Record<string, unknown>;
|
|
114
|
+
/**
|
|
115
|
+
* SDK per-tool scope gate (for example `requireScopes('write')`), run by the SDK before input
|
|
116
|
+
* validation against the caller's `AuthInfo` scopes.
|
|
117
|
+
*/
|
|
118
|
+
scopeChallenge?: ScopeChallengeHandler;
|
|
119
|
+
/** Env keys that must be configured; otherwise the tool answers the uniform "not configured" error. */
|
|
120
|
+
requires?: readonly string[];
|
|
121
|
+
/**
|
|
122
|
+
* This tool returns a `PagedResult` (`{ items, nextCursor?, total? }`): its input schema must declare
|
|
123
|
+
* `cursor` and `limit`, and every cursor it receives must be one mcp-core issued (strict). Tools that
|
|
124
|
+
* return a `PagedResult` without declaring it are paged too, but accept foreign cursors.
|
|
125
|
+
*/
|
|
126
|
+
paginated?: boolean;
|
|
127
|
+
/** Per-tool result caps (override the server-wide ones). */
|
|
128
|
+
limits?: ToolLimits;
|
|
129
|
+
/** The result carries its payload under one `structuredContent` key; the caps apply to that payload. */
|
|
130
|
+
envelope?: ResultEnvelope;
|
|
131
|
+
handler: (args: ToolArgs<I>, ctx: ToolContext) => Promise<ToolOutcome>;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Any tool definition, for heterogeneous lists. Each definition is checked against its own schema when
|
|
135
|
+
* written with `defineTool`; the list type erases the per-tool argument type (`never` accepts every
|
|
136
|
+
* handler; the SDK has validated the arguments against the definition's own schema before the call).
|
|
137
|
+
*/
|
|
138
|
+
export type AnyToolDefinition = Omit<ToolDefinition, 'handler'> & {
|
|
139
|
+
handler: (args: never, ctx: ToolContext) => Promise<ToolOutcome>;
|
|
140
|
+
};
|
|
141
|
+
/** Identity helper that types a definition's handler arguments from its own input schema. */
|
|
142
|
+
export declare function defineTool<I extends StandardSchemaWithJSON>(definition: ToolDefinition<I>): AnyToolDefinition;
|
|
143
|
+
export interface MappedToolError {
|
|
144
|
+
message: string;
|
|
145
|
+
code?: string;
|
|
146
|
+
}
|
|
147
|
+
export interface RegisterToolsOptions {
|
|
148
|
+
/** The loaded env; required for `requires` (degraded mode). */
|
|
149
|
+
env?: LoadedEnv;
|
|
150
|
+
/** Register only these tool names (before any prefix). */
|
|
151
|
+
enabled?: readonly string[];
|
|
152
|
+
/** Prefix prepended to every registered tool name. */
|
|
153
|
+
prefix?: string;
|
|
154
|
+
/** Server name used in the degraded-mode message (default "this server"). */
|
|
155
|
+
serverName?: string;
|
|
156
|
+
/** Per-service wording for thrown errors. Never return a stack trace or a raw response. */
|
|
157
|
+
mapError?: (err: unknown) => MappedToolError;
|
|
158
|
+
/**
|
|
159
|
+
* Server-wide result caps (default MCP_MAX_RESULT_ITEMS / MCP_MAX_RESULT_BYTES, else 100 items and
|
|
160
|
+
* 256 KiB); a tool's own `limits` win.
|
|
161
|
+
*/
|
|
162
|
+
limits?: ToolLimits;
|
|
163
|
+
/**
|
|
164
|
+
* Called when a result cannot be brought under the byte cap; return a replacement (for example a
|
|
165
|
+
* resource link) or undefined for the default actionable isError.
|
|
166
|
+
*/
|
|
167
|
+
onOversize?: (info: OversizeInfo) => CallToolResult | undefined;
|
|
168
|
+
/** Runtime enable/disable state (see `createRuntimeSurface`); keyed by the registered name. */
|
|
169
|
+
surface?: RuntimeSurface;
|
|
170
|
+
/** The credential registry calls pick from and report on (default the process registry). */
|
|
171
|
+
credentials?: CredentialRegistry;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* A success result: the text block is `opts.text`, the string itself, or pretty JSON; a plain object
|
|
175
|
+
* is also sent as `structuredContent` (the spec requires an object there).
|
|
176
|
+
*/
|
|
177
|
+
export declare function toolResult(data: unknown, opts?: {
|
|
178
|
+
text?: string;
|
|
179
|
+
}): CallToolResult;
|
|
180
|
+
/**
|
|
181
|
+
* Text bound for a client in an error: secret query/userinfo/Basic parameters redacted and every
|
|
182
|
+
* registered secret value masked, exactly as the logger does for its lines.
|
|
183
|
+
*/
|
|
184
|
+
export declare function maskClientText(text: string): string;
|
|
185
|
+
/**
|
|
186
|
+
* An error result (`isError: true`): the message as text, optional details as a second JSON block.
|
|
187
|
+
* Both are passed through `maskClientText`.
|
|
188
|
+
*/
|
|
189
|
+
export declare function toolError(message: string, details?: Record<string, unknown>): CallToolResult;
|
|
190
|
+
/** The default `mapError`: the error message only (secret parameters redacted, bounded), never a stack. */
|
|
191
|
+
export declare function defaultMapError(err: unknown): MappedToolError;
|
|
192
|
+
/**
|
|
193
|
+
* Map a handler's return value onto a CallToolResult. An SDK input-required result
|
|
194
|
+
* (`resultType: 'input_required'`) is returned untouched: the SDK owns it (it skips output validation
|
|
195
|
+
* for it and drives the multi-round-trip flow, or the 2025 legacy shim).
|
|
196
|
+
*/
|
|
197
|
+
export declare function normalizeOutcome(outcome: unknown, hasOutputSchema?: boolean): CallToolResult | InputRequiredResult;
|
|
198
|
+
/** The uniform degraded-mode message. */
|
|
199
|
+
export declare function notConfiguredMessage(serverName: string, missing: readonly string[]): string;
|
|
200
|
+
/**
|
|
201
|
+
* Register `tools` on `server` with `McpServer.registerTool`. Returns the SDK handles by registered
|
|
202
|
+
* name (for `disable()` / `enable()` / `remove()`).
|
|
203
|
+
*/
|
|
204
|
+
export declare function registerTools(server: McpServer, tools: readonly AnyToolDefinition[], opts?: RegisterToolsOptions): Map<string, RegisteredTool>;
|
|
205
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2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