@baitong-dev/skills-mcp 0.0.3 → 0.0.4
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 +12 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const mcp_helpers_1 = require("@baitong-dev/mcp-helpers");
|
|
|
12
12
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
13
13
|
const yamlFront = require('yaml-front-matter');
|
|
14
14
|
const MCP_NAME = 'Skills MCP';
|
|
15
|
-
const MCP_VERSION = '0.0.
|
|
15
|
+
const MCP_VERSION = '0.0.4';
|
|
16
16
|
function getSkillsRootDir() {
|
|
17
17
|
const dir = path_1.default.join(mcp_helpers_1.MCP_HOME_DIR, 'skills');
|
|
18
18
|
if (!fs_1.default.existsSync(dir)) {
|
|
@@ -120,15 +120,19 @@ ${metadata.map(skill => `- ${skill.name}: ${skill.description}`).join('\n')}`,
|
|
|
120
120
|
const skillCwd = getSkillCwd(skillName);
|
|
121
121
|
const skillFilePath = getSkillFilePath(skillName);
|
|
122
122
|
const json = readSkillJson(skillFilePath);
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
const result = {
|
|
124
|
+
title: `Loaded skill: ${skillName}`,
|
|
125
|
+
metadata: {
|
|
126
|
+
name: skillName,
|
|
127
|
+
dir: skillCwd
|
|
128
|
+
},
|
|
129
|
+
output: `Base directory for this skill: ${skillCwd}
|
|
128
130
|
|
|
129
131
|
${json.__content}`
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
};
|
|
133
|
+
return {
|
|
134
|
+
content: [{ type: 'text', text: result.output }],
|
|
135
|
+
structuredContent: result
|
|
132
136
|
};
|
|
133
137
|
});
|
|
134
138
|
}
|