@armature-tech/mcp-analytics 0.6.40 → 0.6.41

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
@@ -441,6 +441,11 @@ description exactly:
441
441
 
442
442
  > 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.
443
443
 
444
+ It declares the annotations app directories such as ChatGPT's require:
445
+ `readOnlyHint: false` (it records an analytics event), `destructiveHint: false`
446
+ (it changes no user data) and `openWorldHint: false` (it contacts no one), plus
447
+ `idempotentHint: false` and the title "Request capability".
448
+
444
449
  Calls are recorded through the normal analytics pipeline and feed Armature's
445
450
  unmet-demand signals. Set **requestCapability: false** to disable it. It is also
446
451
  suppressed when **enabled: false** or no API key/custom **emit** delivery is
@@ -177,6 +177,7 @@ const createAnalyticsRecorder = (config = emit_js_1.defaultMcpAnalyticsConfig) =
177
177
  name: request_capability_js_1.REQUEST_CAPABILITY_TOOL_NAME,
178
178
  description: request_capability_js_1.REQUEST_CAPABILITY_DESCRIPTION,
179
179
  inputSchema: request_capability_js_1.REQUEST_CAPABILITY_INPUT_SCHEMA,
180
+ annotations: request_capability_js_1.REQUEST_CAPABILITY_ANNOTATIONS,
180
181
  });
181
182
  continue;
182
183
  }
@@ -206,6 +207,7 @@ const createAnalyticsRecorder = (config = emit_js_1.defaultMcpAnalyticsConfig) =
206
207
  name: request_capability_js_1.REQUEST_CAPABILITY_TOOL_NAME,
207
208
  description: request_capability_js_1.REQUEST_CAPABILITY_DESCRIPTION,
208
209
  inputSchema: request_capability_js_1.REQUEST_CAPABILITY_ZOD_SHAPE,
210
+ annotations: request_capability_js_1.REQUEST_CAPABILITY_ANNOTATIONS,
209
211
  },
210
212
  handler: request_capability_js_1.handleRequestCapability,
211
213
  telemetryMode: "scrub",
@@ -5,6 +5,13 @@ export declare const REQUEST_CAPABILITY_TOOL_NAME = "request_capability";
5
5
  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.";
6
6
  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.";
7
7
  export declare const REQUEST_CAPABILITY_INPUT_SCHEMA: JsonObjectSchema;
8
+ export declare const REQUEST_CAPABILITY_ANNOTATIONS: {
9
+ title: string;
10
+ readOnlyHint: boolean;
11
+ destructiveHint: boolean;
12
+ idempotentHint: boolean;
13
+ openWorldHint: boolean;
14
+ };
8
15
  export declare const REQUEST_CAPABILITY_ZOD_SHAPE: {
9
16
  capability: z.ZodString;
10
17
  };
@@ -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_INPUT_SCHEMA = exports.REQUEST_CAPABILITY_ARGUMENT_DESCRIPTION = exports.REQUEST_CAPABILITY_DESCRIPTION = exports.REQUEST_CAPABILITY_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.REQUEST_CAPABILITY_DESCRIPTION = exports.REQUEST_CAPABILITY_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");
@@ -20,6 +20,17 @@ exports.REQUEST_CAPABILITY_INPUT_SCHEMA = {
20
20
  required: ["capability"],
21
21
  additionalProperties: false,
22
22
  };
23
+ // Directories such as ChatGPT's reject tools without explicit readOnlyHint,
24
+ // destructiveHint and openWorldHint. The tool records an analytics event (not
25
+ // read-only), changes no user data and reaches no one outside the server.
26
+ // Matches the hosted Armature MCP (lib/mcp/index.js).
27
+ exports.REQUEST_CAPABILITY_ANNOTATIONS = {
28
+ title: "Request capability",
29
+ readOnlyHint: false,
30
+ destructiveHint: false,
31
+ idempotentHint: false,
32
+ openWorldHint: false,
33
+ };
23
34
  // McpServer.registerTool accepts a Zod raw shape, while custom dispatchers
24
35
  // consume the JSON Schema above from recorder.toolDefinitions().
25
36
  exports.REQUEST_CAPABILITY_ZOD_SHAPE = {
@@ -3,7 +3,7 @@ import { defaultMcpAnalyticsConfig } from "./emit.js";
3
3
  import { planToolTelemetry, TELEMETRY_PROPERTY_DESCRIPTION, USER_INTENT_DESCRIPTION, } from "./schema.js";
4
4
  import { isJsonObjectSchema, isRecord } from "./utils.js";
5
5
  import { getClientInfoForSessionId, installClientInfoCapture, } from "./client-info-cache.js";
6
- import { handleRequestCapability, isRequestCapabilityEnabled, isRequestCapabilityExplicit, REQUEST_CAPABILITY_DESCRIPTION, REQUEST_CAPABILITY_INPUT_SCHEMA, REQUEST_CAPABILITY_TOOL_NAME, REQUEST_CAPABILITY_ZOD_SHAPE, } from "./request-capability.js";
6
+ import { handleRequestCapability, isRequestCapabilityEnabled, isRequestCapabilityExplicit, REQUEST_CAPABILITY_ANNOTATIONS, REQUEST_CAPABILITY_DESCRIPTION, REQUEST_CAPABILITY_INPUT_SCHEMA, REQUEST_CAPABILITY_TOOL_NAME, REQUEST_CAPABILITY_ZOD_SHAPE, } from "./request-capability.js";
7
7
  import { createAnalyticsRecorderCore } from "./recorder-core.js";
8
8
  const nudgeTelemetryDescriptions = (schema) => {
9
9
  if (!isJsonObjectSchema(schema))
@@ -174,6 +174,7 @@ export const createAnalyticsRecorder = (config = defaultMcpAnalyticsConfig) => {
174
174
  name: REQUEST_CAPABILITY_TOOL_NAME,
175
175
  description: REQUEST_CAPABILITY_DESCRIPTION,
176
176
  inputSchema: REQUEST_CAPABILITY_INPUT_SCHEMA,
177
+ annotations: REQUEST_CAPABILITY_ANNOTATIONS,
177
178
  });
178
179
  continue;
179
180
  }
@@ -203,6 +204,7 @@ export const createAnalyticsRecorder = (config = defaultMcpAnalyticsConfig) => {
203
204
  name: REQUEST_CAPABILITY_TOOL_NAME,
204
205
  description: REQUEST_CAPABILITY_DESCRIPTION,
205
206
  inputSchema: REQUEST_CAPABILITY_ZOD_SHAPE,
207
+ annotations: REQUEST_CAPABILITY_ANNOTATIONS,
206
208
  },
207
209
  handler: handleRequestCapability,
208
210
  telemetryMode: "scrub",
@@ -5,6 +5,13 @@ export declare const REQUEST_CAPABILITY_TOOL_NAME = "request_capability";
5
5
  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.";
6
6
  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.";
7
7
  export declare const REQUEST_CAPABILITY_INPUT_SCHEMA: JsonObjectSchema;
8
+ export declare const REQUEST_CAPABILITY_ANNOTATIONS: {
9
+ title: string;
10
+ readOnlyHint: boolean;
11
+ destructiveHint: boolean;
12
+ idempotentHint: boolean;
13
+ openWorldHint: boolean;
14
+ };
8
15
  export declare const REQUEST_CAPABILITY_ZOD_SHAPE: {
9
16
  capability: z.ZodString;
10
17
  };
@@ -17,6 +17,17 @@ export const REQUEST_CAPABILITY_INPUT_SCHEMA = {
17
17
  required: ["capability"],
18
18
  additionalProperties: false,
19
19
  };
20
+ // Directories such as ChatGPT's reject tools without explicit readOnlyHint,
21
+ // destructiveHint and openWorldHint. The tool records an analytics event (not
22
+ // read-only), changes no user data and reaches no one outside the server.
23
+ // Matches the hosted Armature MCP (lib/mcp/index.js).
24
+ export const REQUEST_CAPABILITY_ANNOTATIONS = {
25
+ title: "Request capability",
26
+ readOnlyHint: false,
27
+ destructiveHint: false,
28
+ idempotentHint: false,
29
+ openWorldHint: false,
30
+ };
20
31
  // McpServer.registerTool accepts a Zod raw shape, while custom dispatchers
21
32
  // consume the JSON Schema above from recorder.toolDefinitions().
22
33
  export const REQUEST_CAPABILITY_ZOD_SHAPE = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armature-tech/mcp-analytics",
3
- "version": "0.6.40",
3
+ "version": "0.6.41",
4
4
  "type": "module",
5
5
  "description": "MCP analytics wrapper SDK that instruments MCP tool declarations with telemetry.",
6
6
  "license": "Apache-2.0",