@modootoday/pmcp 0.5.0 → 0.5.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.
@@ -1009,6 +1009,10 @@ var readOnly = {
1009
1009
  idempotentHint: true,
1010
1010
  openWorldHint: false
1011
1011
  };
1012
+ var readOnlyTool = (title) => ({
1013
+ title,
1014
+ annotations: { ...readOnly, title }
1015
+ });
1012
1016
  var kindInput = z2.enum(["skill", "agent", "hook", "mcp", "any"]).optional().describe(
1013
1017
  "skill (default), agent, hook, mcp, or any. Commands are skills; agents, hooks and MCP servers are installed with pmcp add rather than read."
1014
1018
  );
@@ -1019,22 +1023,21 @@ function registerSkillTools(server, tools) {
1019
1023
  server.registerTool(
1020
1024
  "skill_catalog",
1021
1025
  {
1022
- title: "List installed skills without their bodies",
1026
+ ...readOnlyTool("List skills"),
1023
1027
  description: "Every skill the installed packages and marketplaces ship, grouped by package or plugin, with names, one-line descriptions and tier, and no bodies. Paged by group. Use it to see what exists, or when skill_find returns nothing. Pass kind to list agents, hooks or MCP servers instead.",
1024
1028
  inputSchema: z2.object({
1025
1029
  page: z2.number().int().min(1).optional(),
1026
1030
  pageSize: z2.number().int().min(1).max(20).optional(),
1027
1031
  tier: z2.enum(["open", "free", "paid", "internal"]).optional(),
1028
1032
  kind: kindInput
1029
- }),
1030
- annotations: readOnly
1033
+ })
1031
1034
  },
1032
1035
  async (request) => asText(tools.catalog(request))
1033
1036
  );
1034
1037
  server.registerTool(
1035
1038
  "skill_find",
1036
1039
  {
1037
- title: "Find skills by describing the problem",
1040
+ ...readOnlyTool("Find skills"),
1038
1041
  description: "Ranked skill names for an intent. Describe the problem in a full sentence in English rather than a keyword: a single word matches far worse, and the ranking is over descriptions. Returns names only -- read one with skill_call.",
1039
1042
  inputSchema: z2.object({
1040
1043
  intent: z2.string().min(1).max(256).describe("What you are trying to do, as an English sentence."),
@@ -1047,20 +1050,18 @@ function registerSkillTools(server, tools) {
1047
1050
  domain: z2.string().optional(),
1048
1051
  medium: z2.string().optional()
1049
1052
  }).optional().describe("Exact-match filters over the catalog before ranking.")
1050
- }),
1051
- annotations: readOnly
1053
+ })
1052
1054
  },
1053
1055
  async ({ intent, limit, filters }) => asText(await tools.find(intent, limit, filters))
1054
1056
  );
1055
1057
  server.registerTool(
1056
1058
  "skill_describe",
1057
1059
  {
1058
- title: "Check one skill's properties before loading it",
1060
+ ...readOnlyTool("Describe a skill"),
1059
1061
  description: "Frontmatter, metadata (tier, level, requirements, licence, approval), and the files the skill carries with sizes and sha256, without any body. Use it to decide between candidates before skill_call.",
1060
1062
  inputSchema: z2.object({
1061
1063
  name: z2.string().min(1).describe("The skill name skill_find or skill_catalog returned.")
1062
- }),
1063
- annotations: readOnly
1064
+ })
1064
1065
  },
1065
1066
  async ({ name }) => {
1066
1067
  const described = tools.describe(name);
@@ -1080,15 +1081,14 @@ function registerSkillTools(server, tools) {
1080
1081
  server.registerTool(
1081
1082
  "skill_read",
1082
1083
  {
1083
- title: "Read one file a skill carries",
1084
- description: "A reference or script file inside one skill's directory, as text, with its sha256. Read only when the skill body points at the file. Scripts are returned, never run. Files over 256 KiB and paths outside the skill are refused.",
1084
+ ...readOnlyTool("Read a skill file"),
1085
+ description: "A reference or script file inside one skill's directory in this catalog, as text, with its sha256. It reads only files the catalog ships and calls no external API; path is relative to the skill, as skill_describe lists it (layout: https://pmcp.build). Read only when the skill body points at the file. Scripts are returned, never run. Files over 256 KiB and paths outside the skill are refused.",
1085
1086
  inputSchema: z2.object({
1086
1087
  name: z2.string().min(1),
1087
1088
  path: z2.string().min(1).optional().describe(
1088
1089
  "Path relative to the skill directory, as skill_describe lists it. Defaults to SKILL.md."
1089
1090
  )
1090
- }),
1091
- annotations: readOnly
1091
+ })
1092
1092
  },
1093
1093
  async ({ name, path }) => {
1094
1094
  const result = tools.read(name, path);
@@ -1105,12 +1105,11 @@ function registerSkillTools(server, tools) {
1105
1105
  server.registerTool(
1106
1106
  "skill_call",
1107
1107
  {
1108
- title: "Read one skill",
1108
+ ...readOnlyTool("Read a skill"),
1109
1109
  description: "The body of a single skill, by the name skill_find or skill_catalog returned. This is the only call that costs a document.",
1110
1110
  inputSchema: z2.object({
1111
1111
  name: z2.string().min(1).describe("The skill name, as <package>/<slug>.")
1112
- }),
1113
- annotations: readOnly
1112
+ })
1114
1113
  },
1115
1114
  async ({ name }) => {
1116
1115
  const found = tools.call(name);
@@ -1130,7 +1129,7 @@ function registerSkillTools(server, tools) {
1130
1129
  return server;
1131
1130
  }
1132
1131
  function createSkillServer(options) {
1133
- const server = new McpServer({ name: SERVER_NAME, version: "0.5.0" });
1132
+ const server = new McpServer({ name: SERVER_NAME, version: "0.5.1" });
1134
1133
  const tools = createSkillTools(options);
1135
1134
  registerSkillsExtension(server, tools.skills);
1136
1135
  return registerSkillTools(server, tools);
@@ -1168,4 +1167,4 @@ export {
1168
1167
  registerSkillTools,
1169
1168
  createSkillServer
1170
1169
  };
1171
- //# sourceMappingURL=chunk-JOQTOVTJ.js.map
1170
+ //# sourceMappingURL=chunk-76UKXVUE.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSkillServer
3
- } from "./chunk-JOQTOVTJ.js";
3
+ } from "./chunk-76UKXVUE.js";
4
4
 
5
5
  // src/stdio.ts
6
6
  import { serveStdio } from "@modelcontextprotocol/server/stdio";
@@ -35,4 +35,4 @@ export {
35
35
  serve,
36
36
  main
37
37
  };
38
- //# sourceMappingURL=chunk-X4LYYULW.js.map
38
+ //# sourceMappingURL=chunk-ICHBC5FM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normaliseIntent
3
- } from "./chunk-JOQTOVTJ.js";
3
+ } from "./chunk-76UKXVUE.js";
4
4
 
5
5
  // src/cache.ts
6
6
  async function openDatabase(path) {
@@ -190,4 +190,4 @@ export {
190
190
  findConfig,
191
191
  readConfig
192
192
  };
193
- //# sourceMappingURL=chunk-PUGLIJYM.js.map
193
+ //# sourceMappingURL=chunk-XTLANVRL.js.map
package/dist/cli.js CHANGED
@@ -4,13 +4,13 @@ import {
4
4
  findConfig,
5
5
  openDatabase,
6
6
  readConfig
7
- } from "./chunk-PUGLIJYM.js";
7
+ } from "./chunk-XTLANVRL.js";
8
8
  import {
9
9
  serve
10
- } from "./chunk-X4LYYULW.js";
10
+ } from "./chunk-ICHBC5FM.js";
11
11
  import {
12
12
  readCatalog
13
- } from "./chunk-JOQTOVTJ.js";
13
+ } from "./chunk-76UKXVUE.js";
14
14
 
15
15
  // src/cli/command.ts
16
16
  var ArgumentError = class extends Error {
@@ -2135,7 +2135,7 @@ function dispatch(argv, options = {}) {
2135
2135
  }
2136
2136
  return run(command, rest, { ui, env, cwd });
2137
2137
  }
2138
- var VERSION = "0.5.0";
2138
+ var VERSION = "0.5.1";
2139
2139
  async function run(command, argv, context) {
2140
2140
  try {
2141
2141
  return await command.run({
package/dist/http.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createSkillServer,
3
3
  readCatalog
4
- } from "./chunk-JOQTOVTJ.js";
4
+ } from "./chunk-76UKXVUE.js";
5
5
 
6
6
  // src/http.ts
7
7
  import {
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  findConfig,
6
6
  openIntentCache,
7
7
  readConfig
8
- } from "./chunk-PUGLIJYM.js";
8
+ } from "./chunk-XTLANVRL.js";
9
9
  import {
10
10
  ASSET_KINDS,
11
11
  CATALOG_PAGE_MAX,
@@ -37,7 +37,7 @@ import {
37
37
  registerSkillsExtension,
38
38
  skillUri,
39
39
  withoutBody
40
- } from "./chunk-JOQTOVTJ.js";
40
+ } from "./chunk-76UKXVUE.js";
41
41
  export {
42
42
  ASSET_KINDS,
43
43
  CATALOG_PAGE_MAX,
package/dist/stdio.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  main,
4
4
  resolveRoots,
5
5
  serve
6
- } from "./chunk-X4LYYULW.js";
7
- import "./chunk-JOQTOVTJ.js";
6
+ } from "./chunk-ICHBC5FM.js";
7
+ import "./chunk-76UKXVUE.js";
8
8
  export {
9
9
  main,
10
10
  resolveRoots,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modootoday/pmcp",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "license": "Elastic-2.0",
5
5
  "author": "modootoday",
6
6
  "description": "An MCP server that finds the skills your installed packages already ship. Reads SKILL.md out of node_modules by shape rather than by path, so it sees the skills, .agent, .claude, .gemini and .codex conventions alike, and keeps session startup flat as the number of installed skills grows.",