@thotischner/observability-mcp 3.6.0 → 3.6.1
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.
|
@@ -439,3 +439,13 @@ test("E2E: initialize advertises non-empty instructions pointing at the usage gu
|
|
|
439
439
|
assert.match(r.instructions, /omcp:\/\/guide\/agent-usage/, "must point at the usage-guide resource");
|
|
440
440
|
assert.match(r.instructions, /aggregate/i, "must carry the filter+aggregate golden rule");
|
|
441
441
|
});
|
|
442
|
+
test("E2E: enrich_ips advertises IPv6 in its description + ips param (issue #476)", opts, async () => {
|
|
443
|
+
const session = await newSession();
|
|
444
|
+
const { response } = await jsonRpc("tools/list", {}, { id: 40, session });
|
|
445
|
+
const r = response.result;
|
|
446
|
+
const tool = r.tools?.find((t) => t.name === "enrich_ips");
|
|
447
|
+
assert.ok(tool, "enrich_ips must be advertised");
|
|
448
|
+
assert.match(tool.description ?? "", /IPv6/, "description must mention IPv6 (not IPv4-only)");
|
|
449
|
+
const ipsDesc = tool.inputSchema?.properties?.ips?.description ?? "";
|
|
450
|
+
assert.match(ipsDesc, /IPv6/, "the ips param must mention IPv6");
|
|
451
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -781,14 +781,14 @@ async function main() {
|
|
|
781
781
|
return withToolMetrics("get_blast_radius", () => getBlastRadiusHandler(registry, args, ctx));
|
|
782
782
|
});
|
|
783
783
|
registerTool("enrich_ips", [
|
|
784
|
-
"Resolve a batch of IPv4 addresses to geo (country/city), ASN/org, and a hosting/proxy flag.",
|
|
785
|
-
"When to use: answering 'where are these visitors from?' or 'which of these IPs are bots / datacenter / VPN exit nodes?' over access logs, without an out-of-band geo-API call per IP.",
|
|
784
|
+
"Resolve a batch of IPv4 or IPv6 addresses to geo (country/city), ASN/org, and a hosting/proxy flag.",
|
|
785
|
+
"When to use: answering 'where are these visitors from?' or 'which of these IPs are bots / datacenter / VPN exit nodes?' over access logs, without an out-of-band geo-API call per IP. Both IPv4 and IPv6 clients are resolved — don't pre-filter v6 out.",
|
|
786
786
|
"Behavior: read-only. Looks each IP up in a LOCAL offline dataset the operator configured (OMCP_IP_ENRICH_FILE) — there is no external network call, so it is safe in air-gapped deployments. Returns one row per input IP with found=true/false plus any known fields. If no dataset is configured it returns a clear notice explaining how to enable it.",
|
|
787
787
|
"Related: pull the IPs from `query_logs` (use `labels`/`aggregate` to find the IPs of interest first).",
|
|
788
788
|
].join(" "), {
|
|
789
789
|
ips: z
|
|
790
790
|
.array(z.string())
|
|
791
|
-
.describe("Required. IPv4 address strings to enrich (e.g. ['203.0.113.5','
|
|
791
|
+
.describe("Required. IPv4 or IPv6 address strings to enrich (e.g. ['203.0.113.5','2001:db8::1']). Max 1000 per call; invalid entries are returned with found=false rather than failing the batch."),
|
|
792
792
|
}, { title: "Enrich IPs", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }, async (args) => {
|
|
793
793
|
await enforceEntitledAccess(ctx, { tool: "enrich_ips" });
|
|
794
794
|
return withToolMetrics("enrich_ips", async () => enrichIpsHandler(ipEnrichment, args, ctx));
|
package/package.json
CHANGED