@oneentry/mcp-server 1.1.0 → 1.1.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.
package/dist/index.js CHANGED
@@ -80,6 +80,37 @@ for (const skill of SKILLS) {
80
80
  }
81
81
  }
82
82
  // ---------------------------------------------------------------------------
83
+ // Tools
84
+ // ---------------------------------------------------------------------------
85
+ server.registerTool("get-rule", {
86
+ description: "Fetch the content of a specific OneEntry SDK rule by name",
87
+ inputSchema: { name: z.string().describe(`Rule name. Available: ${RULES.map((r) => r.name).join(", ")}`) },
88
+ }, async ({ name }) => {
89
+ const rule = RULES.find((r) => r.name === name);
90
+ if (!rule) {
91
+ return { content: [{ type: "text", text: `Unknown rule: ${name}. Available: ${RULES.map((r) => r.name).join(", ")}` }], isError: true };
92
+ }
93
+ const text = await fetchContent(rule.path);
94
+ return { content: [{ type: "text", text }] };
95
+ });
96
+ server.registerTool("get-skill", {
97
+ description: "Fetch the content of a specific OneEntry skill/slash-command by name",
98
+ inputSchema: {
99
+ name: z.string().describe(`Skill name. Available: ${SKILLS.map((s) => s.name).join(", ")}`),
100
+ arguments: z.string().optional().describe("Optional arguments passed to the skill (replaces $ARGUMENTS placeholder)"),
101
+ },
102
+ }, async (args) => {
103
+ const skill = SKILLS.find((s) => s.name === args.name);
104
+ if (!skill) {
105
+ return { content: [{ type: "text", text: `Unknown skill: ${args.name}. Available: ${SKILLS.map((s) => s.name).join(", ")}` }], isError: true };
106
+ }
107
+ let text = await fetchContent(skill.path);
108
+ if (args.arguments) {
109
+ text = text.replace(/\$ARGUMENTS/g, args.arguments);
110
+ }
111
+ return { content: [{ type: "text", text }] };
112
+ });
113
+ // ---------------------------------------------------------------------------
83
114
  // Start
84
115
  // ---------------------------------------------------------------------------
85
116
  async function main() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneentry/mcp-server",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "MCP server for OneEntry SDK — rules and skills for Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -111,6 +111,48 @@ for (const skill of SKILLS) {
111
111
  }
112
112
  }
113
113
 
114
+ // ---------------------------------------------------------------------------
115
+ // Tools
116
+ // ---------------------------------------------------------------------------
117
+
118
+ server.registerTool(
119
+ "get-rule",
120
+ {
121
+ description: "Fetch the content of a specific OneEntry SDK rule by name",
122
+ inputSchema: { name: z.string().describe(`Rule name. Available: ${RULES.map((r) => r.name).join(", ")}`) },
123
+ },
124
+ async ({ name }) => {
125
+ const rule = RULES.find((r) => r.name === name);
126
+ if (!rule) {
127
+ return { content: [{ type: "text" as const, text: `Unknown rule: ${name}. Available: ${RULES.map((r) => r.name).join(", ")}` }], isError: true };
128
+ }
129
+ const text = await fetchContent(rule.path);
130
+ return { content: [{ type: "text" as const, text }] };
131
+ }
132
+ );
133
+
134
+ server.registerTool(
135
+ "get-skill",
136
+ {
137
+ description: "Fetch the content of a specific OneEntry skill/slash-command by name",
138
+ inputSchema: {
139
+ name: z.string().describe(`Skill name. Available: ${SKILLS.map((s) => s.name).join(", ")}`),
140
+ arguments: z.string().optional().describe("Optional arguments passed to the skill (replaces $ARGUMENTS placeholder)"),
141
+ },
142
+ },
143
+ async (args) => {
144
+ const skill = SKILLS.find((s) => s.name === args.name);
145
+ if (!skill) {
146
+ return { content: [{ type: "text" as const, text: `Unknown skill: ${args.name}. Available: ${SKILLS.map((s) => s.name).join(", ")}` }], isError: true };
147
+ }
148
+ let text = await fetchContent(skill.path);
149
+ if (args.arguments) {
150
+ text = text.replace(/\$ARGUMENTS/g, args.arguments);
151
+ }
152
+ return { content: [{ type: "text" as const, text }] };
153
+ }
154
+ );
155
+
114
156
  // ---------------------------------------------------------------------------
115
157
  // Start
116
158
  // ---------------------------------------------------------------------------