telique-mcp 1.0.25 → 1.0.26

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.
@@ -0,0 +1,5 @@
1
+ export declare const READ_ONLY_ANNOTATIONS: {
2
+ readonly readOnlyHint: true;
3
+ readonly openWorldHint: false;
4
+ readonly destructiveHint: false;
5
+ };
@@ -0,0 +1,5 @@
1
+ export const READ_ONLY_ANNOTATIONS = {
2
+ readOnlyHint: true,
3
+ openWorldHint: false,
4
+ destructiveHint: false,
5
+ };
package/dist/lib.d.ts CHANGED
@@ -10,4 +10,5 @@ export { registerStatusTools } from "./tools/status.js";
10
10
  export { registerKnowledge, TELIQUE_KNOWLEDGE } from "./knowledge.js";
11
11
  export { ICONS, ICON_LIGHT_DATA_URI, ICON_DARK_DATA_URI } from "./icons.js";
12
12
  export { VERSION } from "./version.js";
13
+ export { READ_ONLY_ANNOTATIONS } from "./annotations.js";
13
14
  export type { ToolRegistrar } from "./types.js";
package/dist/lib.js CHANGED
@@ -14,3 +14,5 @@ export { registerKnowledge, TELIQUE_KNOWLEDGE } from "./knowledge.js";
14
14
  // Metadata
15
15
  export { ICONS, ICON_LIGHT_DATA_URI, ICON_DARK_DATA_URI } from "./icons.js";
16
16
  export { VERSION } from "./version.js";
17
+ // Annotations
18
+ export { READ_ONLY_ANNOTATIONS } from "./annotations.js";
@@ -1,12 +1,13 @@
1
1
  import { z } from "zod";
2
2
  import { formatResponse } from "../utils/formatting.js";
3
+ import { READ_ONLY_ANNOTATIONS } from "../annotations.js";
3
4
  export function registerCnamTools(server, client) {
4
5
  server.tool("cnam_lookup", "Look up the Caller Name (CNAM) for a phone number via TransUnion LIDB. Returns the calling_name (up to 15 characters), calling_name_status (available/unavailable), and presentation_indicator (allowed/restricted). Results are cached server-side for 24 hours.", {
5
6
  phone_number: z
6
7
  .string()
7
8
  .regex(/^\d{10,15}$/)
8
9
  .describe("10-15 digit phone number to look up"),
9
- }, async ({ phone_number }) => {
10
+ }, READ_ONLY_ANNOTATIONS, async ({ phone_number }) => {
10
11
  const result = await client.get(`/v1/telique/cnam/${phone_number}`);
11
12
  return formatResponse(result);
12
13
  });
@@ -1,12 +1,13 @@
1
1
  import { z } from "zod";
2
2
  import { formatResponse } from "../utils/formatting.js";
3
+ import { READ_ONLY_ANNOTATIONS } from "../annotations.js";
3
4
  export function registerCompositeTools(server, client) {
4
5
  server.tool("lookup_tn", "Composite phone number lookup across multiple Telique services. Dips LRN, CNAM, DNO, and LERG (NPA-NXX from lerg_6) in parallel and returns a consolidated view. Use this for a quick, comprehensive profile of any phone number.", {
5
6
  phone_number: z
6
7
  .string()
7
8
  .regex(/^\d{10}$/)
8
9
  .describe("10-digit US phone number"),
9
- }, async ({ phone_number }) => {
10
+ }, READ_ONLY_ANNOTATIONS, async ({ phone_number }) => {
10
11
  const npa = phone_number.substring(0, 3);
11
12
  const nxx = phone_number.substring(3, 6);
12
13
  const [lrn, cnam, dno, lerg] = await Promise.all([
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { formatResponse } from "../utils/formatting.js";
3
+ import { READ_ONLY_ANNOTATIONS } from "../annotations.js";
3
4
  export function registerGraphqlTools(server, client) {
4
5
  server.tool("graphql_query", `Execute GraphQL queries against LSMS or LERG. These are DISTINCT APIs with different schemas — do not mix their syntax.
5
6
 
@@ -14,7 +15,7 @@ LERG (service='lerg'): Static telecom reference. Uses FilterInput with operators
14
15
  .record(z.unknown())
15
16
  .optional()
16
17
  .describe("Optional GraphQL variables"),
17
- }, async ({ service, query, variables }) => {
18
+ }, READ_ONLY_ANNOTATIONS, async ({ service, query, variables }) => {
18
19
  const path = service === "lsms"
19
20
  ? "/v1/telique/lsms/gql"
20
21
  : "/v1/telique/lerg/gql";
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { formatResponse } from "../utils/formatting.js";
3
+ import { READ_ONLY_ANNOTATIONS } from "../annotations.js";
3
4
  const LERG_TABLES = [
4
5
  "lerg_1",
5
6
  "lerg_1_con",
@@ -35,7 +36,7 @@ export function registerLergTools(server, client) {
35
36
  .string()
36
37
  .optional()
37
38
  .describe("Specific table name (e.g. lerg_1, lerg_6, lerg_7_sha). Omit to list all tables."),
38
- }, async ({ table_name }) => {
39
+ }, READ_ONLY_ANNOTATIONS, async ({ table_name }) => {
39
40
  if (table_name) {
40
41
  const result = await client.get(`/v1/telique/lerg/tables/${table_name}`);
41
42
  return formatResponse(result);
@@ -64,7 +65,7 @@ export function registerLergTools(server, client) {
64
65
  .min(0)
65
66
  .default(0)
66
67
  .describe("Pagination offset (default 0)"),
67
- }, async ({ table_name, fields, query, limit, offset }) => {
68
+ }, READ_ONLY_ANNOTATIONS, async ({ table_name, fields, query, limit, offset }) => {
68
69
  // Encode & as %26 so multi-filters stay in the path segment
69
70
  const encodedQuery = query.replace(/&/g, "%26");
70
71
  const result = await client.get(`/v1/telique/lerg/${table_name}/${fields}/${encodedQuery}`, { limit, offset });
@@ -127,7 +128,7 @@ export function registerLergTools(server, client) {
127
128
  .min(0)
128
129
  .default(0)
129
130
  .describe("Pagination offset (default 0)"),
130
- }, async ({ table, fields, filters, join, limit, offset }) => {
131
+ }, READ_ONLY_ANNOTATIONS, async ({ table, fields, filters, join, limit, offset }) => {
131
132
  const body = {
132
133
  table,
133
134
  filters,
@@ -177,7 +178,7 @@ export function registerLergTools(server, client) {
177
178
  .min(0)
178
179
  .default(0)
179
180
  .describe("Pagination offset (default 0)"),
180
- }, async ({ npa, nxx, switch_clli, tandem, name, limit, offset }) => {
181
+ }, READ_ONLY_ANNOTATIONS, async ({ npa, nxx, switch_clli, tandem, name, limit, offset }) => {
181
182
  const params = {
182
183
  limit,
183
184
  offset,
package/dist/tools/lrn.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import { z } from "zod";
2
2
  import { formatResponse, errorResult } from "../utils/formatting.js";
3
+ import { READ_ONLY_ANNOTATIONS } from "../annotations.js";
3
4
  export function registerLrnTools(server, client) {
4
5
  server.tool("lrn_lookup", "Look up the Local Routing Number (LRN) for a phone number. Returns the LRN, SPID (Service Provider ID), LNP type, and activation timestamp. LRN identifies the switch that serves a ported phone number. This queries live LSMS/NPAC porting data.", {
5
6
  phone_number: z
6
7
  .string()
7
8
  .regex(/^\d{10}$/)
8
9
  .describe("10-digit US phone number"),
9
- }, async ({ phone_number }) => {
10
+ }, READ_ONLY_ANNOTATIONS, async ({ phone_number }) => {
10
11
  const result = await client.get(`/v1/telique/lrn/${phone_number}`, {
11
12
  format: "json",
12
13
  });
@@ -26,7 +27,7 @@ export function registerLrnTools(server, client) {
26
27
  value: z
27
28
  .string()
28
29
  .describe("The LRN, SPID, or phone number to query by (depends on query_type)"),
29
- }, async ({ query_type, value }) => {
30
+ }, READ_ONLY_ANNOTATIONS, async ({ query_type, value }) => {
30
31
  const routeMap = {
31
32
  phones_by_lrn: { resource: "phone_number", param: "lrn" },
32
33
  phones_by_spid: { resource: "phone_number", param: "spid" },
@@ -47,7 +48,7 @@ export function registerLrnTools(server, client) {
47
48
  .string()
48
49
  .regex(/^\d{10}$/)
49
50
  .describe("10-digit US phone number to check"),
50
- }, async ({ phone_number }) => {
51
+ }, READ_ONLY_ANNOTATIONS, async ({ phone_number }) => {
51
52
  const result = await client.get(`/v1/telique/dno/${phone_number}`, {
52
53
  format: "json",
53
54
  });
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { formatResponse, errorResult } from "../utils/formatting.js";
3
+ import { READ_ONLY_ANNOTATIONS } from "../annotations.js";
3
4
  export function registerRoutelinkTools(server, client) {
4
5
  server.tool("routelink_lookup", "Look up toll-free number routing. Resolves a CRN (toll-free number) to its carrier (CIC), Responsible Organization (ROR), or both. CIC lookup interprets the CPR decision tree using the caller's ANI and LATA to determine which carrier handles the call.", {
5
6
  crn: z
@@ -19,7 +20,7 @@ export function registerRoutelinkTools(server, client) {
19
20
  .regex(/^\d{3}$/)
20
21
  .optional()
21
22
  .describe("3-digit LATA code (required for cic and cicror lookups)"),
22
- }, async ({ crn, lookup_type, ani, lata }) => {
23
+ }, READ_ONLY_ANNOTATIONS, async ({ crn, lookup_type, ani, lata }) => {
23
24
  if ((lookup_type === "cic" || lookup_type === "cicror") &&
24
25
  (!ani || !lata)) {
25
26
  return errorResult("ani and lata are required for cic and cicror lookups");
@@ -55,7 +56,7 @@ export function registerRoutelinkTools(server, client) {
55
56
  .min(0)
56
57
  .default(0)
57
58
  .describe("Pagination offset (default 0)"),
58
- }, async ({ ror, resource_type, limit, offset }) => {
59
+ }, READ_ONLY_ANNOTATIONS, async ({ ror, resource_type, limit, offset }) => {
59
60
  const result = await client.get(`/v1/telique/ror/${ror}/${resource_type}`, { format: "json", limit, offset });
60
61
  return formatResponse(result);
61
62
  });
@@ -68,7 +69,7 @@ export function registerRoutelinkTools(server, client) {
68
69
  .boolean()
69
70
  .default(true)
70
71
  .describe("Recursively resolve and inline template decision trees (default true)"),
71
- }, async ({ crn, expand }) => {
72
+ }, READ_ONLY_ANNOTATIONS, async ({ crn, expand }) => {
72
73
  // NOTE: /v1/telique/cpr/* path pending frontend URL map addition.
73
74
  // Falls back to /cpr/ which routes to routelink via default backend.
74
75
  const result = await client.get(`/v1/telique/cpr/${crn}`, {
@@ -1,7 +1,8 @@
1
1
  import { VERSION } from "../version.js";
2
2
  import { formatResponse } from "../utils/formatting.js";
3
+ import { READ_ONLY_ANNOTATIONS } from "../annotations.js";
3
4
  export function registerStatusTools(server, client) {
4
- server.tool("telique_status", "Returns the Telique MCP server version, authentication mode, and API connectivity status. Use this when asked about the server version or connection status.", {}, async () => {
5
+ server.tool("telique_status", "Returns the Telique MCP server version, authentication mode, and API connectivity status. Use this when asked about the server version or connection status.", {}, READ_ONLY_ANNOTATIONS, async () => {
5
6
  let apiReachable = false;
6
7
  try {
7
8
  const result = await client.get("/health");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telique-mcp",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "MCP server for Telique telecom APIs (RouteLink, LRN, CNAM, LERG)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",