@ekoindia/eps-context-mcp 0.1.23 → 0.1.25
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 +10 -1
- package/data/eps.json +1107 -99
- package/dist/index.js +45 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66,6 +66,19 @@ var searchApis = (bundle, query, limit) => {
|
|
|
66
66
|
var getApi = (bundle, slug) => bundle.apis.find((a) => a.slug === slug);
|
|
67
67
|
var getTopic = (bundle, topic) => bundle.topics[topic];
|
|
68
68
|
var getRecipe = (bundle, id) => bundle.recipes.find((r) => r.id === id);
|
|
69
|
+
var listSdks = (bundle) => (bundle.sdks ?? []).map((s) => ({
|
|
70
|
+
lang: s.lang,
|
|
71
|
+
slug: s.slug,
|
|
72
|
+
title: s.title,
|
|
73
|
+
packageName: s.packageName,
|
|
74
|
+
installCommand: s.installCommand,
|
|
75
|
+
registry: s.registry,
|
|
76
|
+
minRuntime: s.minRuntime,
|
|
77
|
+
docsUrl: s.docsUrl
|
|
78
|
+
}));
|
|
79
|
+
var listSdkLanguages = (bundle) => (bundle.sdks ?? []).map((s) => s.lang);
|
|
80
|
+
var listSdkSlugs = (bundle) => (bundle.sdks ?? []).map((s) => s.slug);
|
|
81
|
+
var getSdk = (bundle, language) => (bundle.sdks ?? []).find((s) => s.lang === language || s.slug === language);
|
|
69
82
|
|
|
70
83
|
// src/auth-debug.ts
|
|
71
84
|
var MS_DIGITS = 13;
|
|
@@ -322,6 +335,9 @@ var createEpsServer = (bundle, source, versionState) => {
|
|
|
322
335
|
const categories = listCategories(bundle);
|
|
323
336
|
const categorySchema = categories.length ? z.enum(categories) : z.string();
|
|
324
337
|
const limitSchema = z.number().int().positive().optional();
|
|
338
|
+
const sdkLanguages = listSdkLanguages(bundle);
|
|
339
|
+
const sdkAliases = [.../* @__PURE__ */ new Set([...sdkLanguages, ...listSdkSlugs(bundle)])];
|
|
340
|
+
const sdkLanguageSchema = sdkAliases.length ? z.enum(sdkAliases) : z.string();
|
|
325
341
|
server.registerTool(
|
|
326
342
|
"list_apis",
|
|
327
343
|
{
|
|
@@ -436,6 +452,35 @@ var createEpsServer = (bundle, source, versionState) => {
|
|
|
436
452
|
content: [{ type: "text", text: getSigningSnippet(language) }]
|
|
437
453
|
})
|
|
438
454
|
);
|
|
455
|
+
server.registerTool(
|
|
456
|
+
"list_sdks",
|
|
457
|
+
{
|
|
458
|
+
title: "List EPS SDKs",
|
|
459
|
+
description: "The backend SDKs that wrap every EPS endpoint (language, package, install command, minimum runtime, docs URL). Prefer an SDK over hand-written HTTP: signing, param validation and the error contract are built in. Call get_sdk for the full surface of one.",
|
|
460
|
+
inputSchema: {},
|
|
461
|
+
annotations: READ_ONLY
|
|
462
|
+
},
|
|
463
|
+
async () => json(listSdks(bundle))
|
|
464
|
+
);
|
|
465
|
+
server.registerTool(
|
|
466
|
+
"get_sdk",
|
|
467
|
+
{
|
|
468
|
+
title: "Get an EPS SDK",
|
|
469
|
+
description: "Everything needed to integrate with one EPS SDK: install command and requirements, client config options with their units, every public class/method/type, file-upload values, the error and timeout contract, and a worked call() example. Signing is built in \u2014 NEVER hand-roll the HMAC secret-key when an SDK exists for the language.",
|
|
470
|
+
inputSchema: {
|
|
471
|
+
language: sdkLanguageSchema.describe(
|
|
472
|
+
`One of: ${sdkLanguages.join(", ")} (the guide slug, e.g. "nodejs", also works)`
|
|
473
|
+
)
|
|
474
|
+
},
|
|
475
|
+
annotations: READ_ONLY
|
|
476
|
+
},
|
|
477
|
+
async ({ language }) => {
|
|
478
|
+
const sdk = getSdk(bundle, language);
|
|
479
|
+
return sdk ? json(sdk) : notFound(
|
|
480
|
+
`No EPS SDK for "${language}". Available: ${sdkLanguages.join(", ")}. For other languages call the REST API directly and use get_signing_snippet.`
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
);
|
|
439
484
|
server.registerTool(
|
|
440
485
|
"debug_auth",
|
|
441
486
|
{
|