@armature-tech/mcp-analytics 0.6.42 → 0.6.44

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 CHANGED
@@ -445,7 +445,7 @@ tool. Releases before 2026-10 named it `request_capability`; the earlier
445
445
  both are set. The tool accepts one required `capability` string and uses this
446
446
  description exactly:
447
447
 
448
- > Records that the user asked for something these tools cannot do, so the developers of this server can add it. It changes no data and contacts no one. Call it whenever you cannot do what the user asked with these tools, including when you send them to an app, a website or a manual step instead. Then answer them as usual.
448
+ > Use this when the user asks for something these tools can't do. It records the request so the developers of this server can add it. It changes no data and contacts no one.
449
449
 
450
450
  It declares the annotations app directories such as ChatGPT's require:
451
451
  `readOnlyHint: false` (it records an analytics event), `destructiveHint: false`
@@ -187,11 +187,13 @@ exports.classifyToolInstrumentation = classifyToolInstrumentation;
187
187
  // registered without a telemetry block on purpose (its input is already
188
188
  // conversation-derived), so the
189
189
  // wrapping check must not count it as an unwrapped customer tool. Match on
190
- // the exact advertised description as well as the reserved name so a
191
- // customer-defined tool that merely shadows the name is still checked.
190
+ // the exact advertised description (any release's) as well as the reserved
191
+ // name so a customer-defined tool that merely shadows the name is still
192
+ // checked.
193
+ const SDK_CAPABILITY_DESCRIPTIONS = new Set([request_capability_js_1.REQUEST_CAPABILITY_DESCRIPTION, ...request_capability_js_1.PAST_REQUEST_CAPABILITY_DESCRIPTIONS]);
192
194
  const isSdkOwnedCapabilityTool = (tool) => (tool.name === request_capability_js_1.REQUEST_CAPABILITY_TOOL_NAME
193
195
  || tool.name === request_capability_js_1.LEGACY_REQUEST_CAPABILITY_TOOL_NAME)
194
- && (tool.description || "") === request_capability_js_1.REQUEST_CAPABILITY_DESCRIPTION;
196
+ && SDK_CAPABILITY_DESCRIPTIONS.has(tool.description || "");
195
197
  exports.isSdkOwnedCapabilityTool = isSdkOwnedCapabilityTool;
196
198
  const inspectToolCoverage = (tools) => {
197
199
  const current = [];
@@ -4,7 +4,8 @@ import type { JsonObjectSchema, McpAnalyticsConfig } from "./types.js";
4
4
  export declare const SEND_FEEDBACK_TOOL_NAME = "send_feedback";
5
5
  export declare const LEGACY_REQUEST_CAPABILITY_TOOL_NAME = "request_capability";
6
6
  export declare const REQUEST_CAPABILITY_TOOL_NAME = "send_feedback";
7
- export declare const REQUEST_CAPABILITY_DESCRIPTION = "Records that the user asked for something these tools cannot do, so the developers of this server can add it. It changes no data and contacts no one. Call it whenever you cannot do what the user asked with these tools, including when you send them to an app, a website or a manual step instead. Then answer them as usual.";
7
+ export declare const REQUEST_CAPABILITY_DESCRIPTION = "Use this when the user asks for something these tools can't do. It records the request so the developers of this server can add it. It changes no data and contacts no one.";
8
+ export declare const PAST_REQUEST_CAPABILITY_DESCRIPTIONS: readonly string[];
8
9
  export declare const REQUEST_CAPABILITY_ARGUMENT_DESCRIPTION = "One English sentence describing the missing capability needed for the user's task. Translate the summary into English even when the user writes in another language. Describe generic actions and roles. Omit names, contacts, IDs, credentials and all tool argument values.";
9
10
  export declare const REQUEST_CAPABILITY_INPUT_SCHEMA: JsonObjectSchema;
10
11
  export declare const REQUEST_CAPABILITY_ANNOTATIONS: {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleRequestCapability = exports.isRequestCapabilityExplicit = exports.isRequestCapabilityEnabled = exports.REQUEST_CAPABILITY_ZOD_SHAPE = exports.REQUEST_CAPABILITY_ANNOTATIONS = exports.REQUEST_CAPABILITY_INPUT_SCHEMA = exports.REQUEST_CAPABILITY_ARGUMENT_DESCRIPTION = exports.REQUEST_CAPABILITY_DESCRIPTION = exports.REQUEST_CAPABILITY_TOOL_NAME = exports.LEGACY_REQUEST_CAPABILITY_TOOL_NAME = exports.SEND_FEEDBACK_TOOL_NAME = void 0;
3
+ exports.handleRequestCapability = exports.isRequestCapabilityExplicit = exports.isRequestCapabilityEnabled = exports.REQUEST_CAPABILITY_ZOD_SHAPE = exports.REQUEST_CAPABILITY_ANNOTATIONS = exports.REQUEST_CAPABILITY_INPUT_SCHEMA = exports.REQUEST_CAPABILITY_ARGUMENT_DESCRIPTION = exports.PAST_REQUEST_CAPABILITY_DESCRIPTIONS = exports.REQUEST_CAPABILITY_DESCRIPTION = exports.REQUEST_CAPABILITY_TOOL_NAME = exports.LEGACY_REQUEST_CAPABILITY_TOOL_NAME = exports.SEND_FEEDBACK_TOOL_NAME = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const emit_js_1 = require("./emit.js");
6
6
  const utils_js_1 = require("./utils.js");
@@ -11,7 +11,14 @@ const utils_js_1 = require("./utils.js");
11
11
  exports.SEND_FEEDBACK_TOOL_NAME = "send_feedback";
12
12
  exports.LEGACY_REQUEST_CAPABILITY_TOOL_NAME = "request_capability";
13
13
  exports.REQUEST_CAPABILITY_TOOL_NAME = exports.SEND_FEEDBACK_TOOL_NAME;
14
- exports.REQUEST_CAPABILITY_DESCRIPTION = "Records that the user asked for something these tools cannot do, so the developers of this server can add it. It changes no data and contacts no one. Call it whenever you cannot do what the user asked with these tools, including when you send them to an app, a website or a manual step instead. Then answer them as usual.";
14
+ exports.REQUEST_CAPABILITY_DESCRIPTION = "Use this when the user asks for something these tools can't do. It records the request so the developers of this server can add it. It changes no data and contacts no one.";
15
+ // Descriptions earlier releases gave the feedback tool, newest first. The
16
+ // doctor inspects servers on any release, so it recognizes all of them.
17
+ exports.PAST_REQUEST_CAPABILITY_DESCRIPTIONS = [
18
+ "Call this before you tell the user that these tools can't do what they asked. It records the request so the developers of this server can add it. It changes no data and contacts no one. Then answer the user as usual.",
19
+ "Records that the user asked for something these tools cannot do, so the developers of this server can add it. It changes no data and contacts no one. Call it whenever you cannot do what the user asked with these tools, including when you send them to an app, a website or a manual step instead. Then answer them as usual.",
20
+ "Request a capability that is not provided by the currently available tools. Use this when a capability is required to complete the user’s request and no existing tool can perform it.",
21
+ ];
15
22
  exports.REQUEST_CAPABILITY_ARGUMENT_DESCRIPTION = "One English sentence describing the missing capability needed for the user's task. Translate the summary into English even when the user writes in another language. Describe generic actions and roles. Omit names, contacts, IDs, credentials and all tool argument values.";
16
23
  exports.REQUEST_CAPABILITY_INPUT_SCHEMA = {
17
24
  type: "object",
@@ -4,7 +4,7 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
4
4
  import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
5
5
  import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
6
6
  import { SDK_IDENTITY, SDK_USER_AGENT } from "./emit.js";
7
- import { REQUEST_CAPABILITY_DESCRIPTION, REQUEST_CAPABILITY_TOOL_NAME, LEGACY_REQUEST_CAPABILITY_TOOL_NAME, } from "./request-capability.js";
7
+ import { PAST_REQUEST_CAPABILITY_DESCRIPTIONS, REQUEST_CAPABILITY_DESCRIPTION, REQUEST_CAPABILITY_TOOL_NAME, LEGACY_REQUEST_CAPABILITY_TOOL_NAME, } from "./request-capability.js";
8
8
  const DEFAULT_INGEST_URL = "https://app.armature.tech/api/mcp-analytics/ingest";
9
9
  const DEFAULT_TIMEOUT_MS = 10_000;
10
10
  const CURRENT_TELEMETRY_MARKER = "Optional task context for usage analytics";
@@ -180,11 +180,13 @@ export const classifyToolInstrumentation = (tool) => {
180
180
  // registered without a telemetry block on purpose (its input is already
181
181
  // conversation-derived), so the
182
182
  // wrapping check must not count it as an unwrapped customer tool. Match on
183
- // the exact advertised description as well as the reserved name so a
184
- // customer-defined tool that merely shadows the name is still checked.
183
+ // the exact advertised description (any release's) as well as the reserved
184
+ // name so a customer-defined tool that merely shadows the name is still
185
+ // checked.
186
+ const SDK_CAPABILITY_DESCRIPTIONS = new Set([REQUEST_CAPABILITY_DESCRIPTION, ...PAST_REQUEST_CAPABILITY_DESCRIPTIONS]);
185
187
  export const isSdkOwnedCapabilityTool = (tool) => (tool.name === REQUEST_CAPABILITY_TOOL_NAME
186
188
  || tool.name === LEGACY_REQUEST_CAPABILITY_TOOL_NAME)
187
- && (tool.description || "") === REQUEST_CAPABILITY_DESCRIPTION;
189
+ && SDK_CAPABILITY_DESCRIPTIONS.has(tool.description || "");
188
190
  export const inspectToolCoverage = (tools) => {
189
191
  const current = [];
190
192
  const legacy = [];
@@ -4,7 +4,8 @@ import type { JsonObjectSchema, McpAnalyticsConfig } from "./types.js";
4
4
  export declare const SEND_FEEDBACK_TOOL_NAME = "send_feedback";
5
5
  export declare const LEGACY_REQUEST_CAPABILITY_TOOL_NAME = "request_capability";
6
6
  export declare const REQUEST_CAPABILITY_TOOL_NAME = "send_feedback";
7
- export declare const REQUEST_CAPABILITY_DESCRIPTION = "Records that the user asked for something these tools cannot do, so the developers of this server can add it. It changes no data and contacts no one. Call it whenever you cannot do what the user asked with these tools, including when you send them to an app, a website or a manual step instead. Then answer them as usual.";
7
+ export declare const REQUEST_CAPABILITY_DESCRIPTION = "Use this when the user asks for something these tools can't do. It records the request so the developers of this server can add it. It changes no data and contacts no one.";
8
+ export declare const PAST_REQUEST_CAPABILITY_DESCRIPTIONS: readonly string[];
8
9
  export declare const REQUEST_CAPABILITY_ARGUMENT_DESCRIPTION = "One English sentence describing the missing capability needed for the user's task. Translate the summary into English even when the user writes in another language. Describe generic actions and roles. Omit names, contacts, IDs, credentials and all tool argument values.";
9
10
  export declare const REQUEST_CAPABILITY_INPUT_SCHEMA: JsonObjectSchema;
10
11
  export declare const REQUEST_CAPABILITY_ANNOTATIONS: {
@@ -8,7 +8,14 @@ import { isRecord } from "./utils.js";
8
8
  export const SEND_FEEDBACK_TOOL_NAME = "send_feedback";
9
9
  export const LEGACY_REQUEST_CAPABILITY_TOOL_NAME = "request_capability";
10
10
  export const REQUEST_CAPABILITY_TOOL_NAME = SEND_FEEDBACK_TOOL_NAME;
11
- export const REQUEST_CAPABILITY_DESCRIPTION = "Records that the user asked for something these tools cannot do, so the developers of this server can add it. It changes no data and contacts no one. Call it whenever you cannot do what the user asked with these tools, including when you send them to an app, a website or a manual step instead. Then answer them as usual.";
11
+ export const REQUEST_CAPABILITY_DESCRIPTION = "Use this when the user asks for something these tools can't do. It records the request so the developers of this server can add it. It changes no data and contacts no one.";
12
+ // Descriptions earlier releases gave the feedback tool, newest first. The
13
+ // doctor inspects servers on any release, so it recognizes all of them.
14
+ export const PAST_REQUEST_CAPABILITY_DESCRIPTIONS = [
15
+ "Call this before you tell the user that these tools can't do what they asked. It records the request so the developers of this server can add it. It changes no data and contacts no one. Then answer the user as usual.",
16
+ "Records that the user asked for something these tools cannot do, so the developers of this server can add it. It changes no data and contacts no one. Call it whenever you cannot do what the user asked with these tools, including when you send them to an app, a website or a manual step instead. Then answer them as usual.",
17
+ "Request a capability that is not provided by the currently available tools. Use this when a capability is required to complete the user’s request and no existing tool can perform it.",
18
+ ];
12
19
  export const REQUEST_CAPABILITY_ARGUMENT_DESCRIPTION = "One English sentence describing the missing capability needed for the user's task. Translate the summary into English even when the user writes in another language. Describe generic actions and roles. Omit names, contacts, IDs, credentials and all tool argument values.";
13
20
  export const REQUEST_CAPABILITY_INPUT_SCHEMA = {
14
21
  type: "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armature-tech/mcp-analytics",
3
- "version": "0.6.42",
3
+ "version": "0.6.44",
4
4
  "type": "module",
5
5
  "description": "MCP analytics wrapper SDK that instruments MCP tool declarations with telemetry.",
6
6
  "license": "Apache-2.0",