@storelayer/mcp-server 0.4.0 → 0.5.0
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/dist/index.js +4 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13658,7 +13658,6 @@ class StdioServerTransport {
|
|
|
13658
13658
|
// src/index.ts
|
|
13659
13659
|
var API_URL = (process.env.STORE_LAYER_API_URL || "https://api.storelayer.io").replace(/\/$/, "");
|
|
13660
13660
|
var API_KEY = process.env.STORE_LAYER_API_KEY;
|
|
13661
|
-
var PROJECT_ID = process.env.STORE_LAYER_PROJECT_ID;
|
|
13662
13661
|
var SKILLS_REPO = "storelayer/skills";
|
|
13663
13662
|
var SKILLS_BASE_PATH = "skills/storelayer";
|
|
13664
13663
|
var SKILL_REFERENCES = [
|
|
@@ -13749,8 +13748,8 @@ function apiHeaders() {
|
|
|
13749
13748
|
};
|
|
13750
13749
|
}
|
|
13751
13750
|
async function fetchToolManifest() {
|
|
13752
|
-
const url = `${API_URL}/
|
|
13753
|
-
const res = await fetch(url
|
|
13751
|
+
const url = `${API_URL}/public/tools`;
|
|
13752
|
+
const res = await fetch(url);
|
|
13754
13753
|
if (!res.ok) {
|
|
13755
13754
|
const body = await res.text().catch(() => "");
|
|
13756
13755
|
throw new Error(`Failed to fetch tool manifest (${res.status}): ${body}`);
|
|
@@ -13759,7 +13758,7 @@ async function fetchToolManifest() {
|
|
|
13759
13758
|
return json.data.tools;
|
|
13760
13759
|
}
|
|
13761
13760
|
async function executeTool(toolName, params, userId) {
|
|
13762
|
-
const url = `${API_URL}/
|
|
13761
|
+
const url = `${API_URL}/public/tools/${toolName}/execute`;
|
|
13763
13762
|
const body = { params };
|
|
13764
13763
|
if (userId)
|
|
13765
13764
|
body.userId = userId;
|
|
@@ -13830,10 +13829,6 @@ async function main() {
|
|
|
13830
13829
|
console.error("Error: STORE_LAYER_API_KEY environment variable is required");
|
|
13831
13830
|
process.exit(1);
|
|
13832
13831
|
}
|
|
13833
|
-
if (!PROJECT_ID) {
|
|
13834
|
-
console.error("Error: STORE_LAYER_PROJECT_ID environment variable is required");
|
|
13835
|
-
process.exit(1);
|
|
13836
|
-
}
|
|
13837
13832
|
console.error(`Connecting to Store Layer API at ${API_URL}...`);
|
|
13838
13833
|
const [manifest, skillGuide] = await Promise.all([
|
|
13839
13834
|
fetchToolManifest(),
|
|
@@ -13853,7 +13848,7 @@ async function main() {
|
|
|
13853
13848
|
...SKILL_AGENTS.map((f) => ({ ...f, category: "agent" })),
|
|
13854
13849
|
...SKILL_TOOLS.map((f) => ({ ...f, category: "tool" }))
|
|
13855
13850
|
];
|
|
13856
|
-
const server = new Server({ name: "store-layer", version: "0.
|
|
13851
|
+
const server = new Server({ name: "store-layer", version: "0.5.0" }, { capabilities: { tools: {}, prompts: {}, resources: {} } });
|
|
13857
13852
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
13858
13853
|
tools: manifest.map((tool) => ({
|
|
13859
13854
|
name: toMcpName(tool.name),
|
package/package.json
CHANGED