promptlike-mcp 0.7.0 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.1 — 2026-11-01
4
+
5
+ - **`fill_variables` no longer ignores a wrong name silently.** Names you pass that the prompt does not have come back in
6
+ `unknown_variables`, with a `warning` that lists the names it does have. The filled text is unchanged.
7
+ - **`update_prompt` says why a tag failed.** `tags_failed_reason` carries the reason and the message includes it. On a rate
8
+ limit it stops trying the remaining tags, reports them all as failed and returns `retry_after` in seconds.
9
+ - Registry description: "No delete tool" instead of "Add-only saves" (`move_prompt` moves, and nothing is deleted). The
10
+ add-only rule for tags is unchanged: `update_prompt` never removes a tag (`ple untag` in the CLI does).
11
+
3
12
  ## 0.7.0 — 2026-10-31
4
13
 
5
14
  - **New tool: `move_prompt`** (the ninth). Moves ONE prompt to another repo (`to_project`) and/or folder (`folder`; `""` =
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # promptlike-mcp
2
2
 
3
- MCP (Model Context Protocol) server for [PromptLikeEngineer](https://promptlikeengineer.com) — gives AI agents your prompt library: read it, fill it, get suggestions from it, and save good prompts back to it (**add-only**: a new prompt or a new version, never a delete).
3
+ MCP (Model Context Protocol) server for [PromptLikeEngineer](https://promptlikeengineer.com) — gives AI agents your prompt library: read it, fill it, get suggestions from it, and save good prompts back to it (a new prompt or a new version, never a delete).
4
4
 
5
5
  Your prompts stay where you saved them; your agent pulls them by name at the moment it needs them. No copy-paste, no stale duplicates in system prompts.
6
6
 
@@ -49,16 +49,16 @@ Every prompt is also a resource, `promptlike://<repo>/<prompt>` (`text/markdown`
49
49
  | `list_prompts` | List your prompts (optional `tag`, `project` and `folder` filters). Includes each prompt's repo, folder and `{{variable}}` names. Paged: `limit` + `page`; the reply carries the real `total`, `total_pages` and `has_more`. |
50
50
  | `search_prompts` | Search by title/description. Same paging as `list_prompts`. |
51
51
  | `get_prompt` | Full content by name/id/short-id, optional `version` pin or deployment `label` (e.g. `production`). `via: "suggestion"` when fetching a suggested prompt. |
52
- | `fill_variables` | Fetch + substitute `{{variables}}` (and `{{#if var}}…{{/if}}` blocks; optional `version`/`label`), returns ready-to-use text (unfilled ones reported in `missing_variables`). |
52
+ | `fill_variables` | Fetch + substitute `{{variables}}` (and `{{#if var}}…{{/if}}` blocks; optional `version`/`label`), returns ready-to-use text (unfilled ones reported in `missing_variables`, names the prompt does not have in `unknown_variables`). |
53
53
  | `suggest_prompts` | Up to 3 prompts from your own library that fit a task (call once at the start of a non-trivial task). |
54
54
  | `save_prompt` | **Write.** New prompt: `title`, `content`, optional `description`, `project` (repo; default: your most recent repo you can edit), `folder` (e.g. `reviews/backend`), `tags`. |
55
55
  | `move_prompt` | **Write.** Move ONE prompt to another repo (`to_project`) and/or folder (`folder`; `""` = repo root); exact title or id. Versions, labels, stars, usage and the `/p/` link stay; tags are matched by name in the target repo. Refused, nothing moved, when the target has a prompt with that title or when the move changes who can see the prompt (public/private repo): the agent asks the user, then repeats with `confirm_visibility: true`. Deletes nothing. |
56
- | `update_prompt` | **Write.** Change an existing prompt (exact title or id). Pass any of: full new `content` → a **new version** (`changelog`, `bump` `patch`/`minor`/`major` go with it); `description` → overwrites the description; `tags` → replaces the tag list. A field you leave out is not touched; one you pass overwrites. |
56
+ | `update_prompt` | **Write.** Change an existing prompt (exact title or id). Pass any of: full new `content` → a **new version** (`changelog`, `bump` `patch`/`minor`/`major` go with it); `description` → overwrites the description; `tags` → adds these tags (none is ever removed; remove one in the web app or with `ple untag`). A field you leave out is not touched; `description` overwrites. |
57
57
  | `submit_feedback` | Tell the maker that a tool is missing, broken, confusing or answered wrong, or that a saved prompt did not work: `message` (one short factual sentence), optional `type` (`bug`/`missing`/`idea`/`prompt`), `prompt` (title or id, never its text), `email`. Works without a session. Not a write to your library. |
58
58
 
59
59
  ### How writes behave
60
60
 
61
- - **Add-only.** There is no delete tool; `update_prompt` keeps every earlier version (roll back on the web or with `ple rollback`). No prompt and no version is ever deleted.
61
+ - **Nothing is deleted.** There is no delete tool; `update_prompt` keeps every earlier version (roll back on the web or with `ple rollback`) and `move_prompt` changes where a prompt lives, not its versions. No prompt and no version is ever deleted.
62
62
  - **`update_prompt` touches only what you pass.** A field that is left out is not changed; a field that is passed overwrites (`description: ""` clears it). `content` is the only part that makes a **version**; the description and the tags are not part of a version, so changing only them opens none — and because the description is not versioned, the answer carries `previous_description` so an overwrite can be put back. **Tags are add-only:** `tags` adds the ones the prompt lacks; tags already on it, and tags you do not list, stay — `tags: []` changes nothing, and this server never sends a DELETE (remove a tag in the web app). Passing values that already match changes nothing; passing none of `content`, `description`, `tags` is an error.
63
63
  - **Safe to retry.** Same title + content → "already saved"; content, description and tags equal to what the prompt has → "unchanged", no new version. A title that exists with different content is reported instead of duplicated.
64
64
  - **Your account, your limits.** Writes use your `ple login` session and the same plan limits as the web; hitting one returns a plain message with the upgrade link and saves nothing. Viewer access to a shared repo cannot write.
@@ -221,13 +221,25 @@ async function updatePromptFlow(args) {
221
221
  const toAdd = tags.filter((t) => !haveNames.has(t.toLowerCase()));
222
222
  const added = [];
223
223
  const tagsFailed = [];
224
- for (const tag of toAdd) {
224
+ let tagError;
225
+ let retryAfter;
226
+ for (const [i, tag] of toAdd.entries()) {
225
227
  try {
226
228
  await (0, api_client_1.addPromptTag)(prompt.id, tag);
227
229
  added.push(tag);
228
230
  }
229
- catch {
231
+ catch (err) {
230
232
  tagsFailed.push(tag);
233
+ tagError ?? (tagError = err instanceof Error ? err.message : String(err));
234
+ // Hız sınırı: kalan etiketleri denemek yalnız sınırı uzatır; hepsi başarısız sayılır, süre ajana söylenir.
235
+ const limited = /^Rate limited\b/.test(tagError);
236
+ if (limited) {
237
+ tagsFailed.push(...toAdd.slice(i + 1));
238
+ const m = /Retry in (\d+)s/.exec(tagError);
239
+ if (m)
240
+ retryAfter = Number(m[1]);
241
+ break;
242
+ }
231
243
  }
232
244
  }
233
245
  metaChanged = metaChanged || added.length > 0;
@@ -236,7 +248,11 @@ async function updatePromptFlow(args) {
236
248
  payload.tags_added = added;
237
249
  if (tagsFailed.length > 0) {
238
250
  payload.tags_failed = tagsFailed;
239
- failures.push(`tags: could not add ${tagsFailed.join(', ')}`);
251
+ if (tagError)
252
+ payload.tags_failed_reason = tagError;
253
+ if (retryAfter !== undefined)
254
+ payload.retry_after = retryAfter;
255
+ failures.push(`tags: could not add ${tagsFailed.join(', ')}${tagError ? ` (${tagError})` : ''}`);
240
256
  }
241
257
  const wanted = new Set(tags.map((t) => t.toLowerCase()));
242
258
  if (have.some((t) => !wanted.has(t.name.toLowerCase()))) {
package/dist/server.js CHANGED
@@ -447,8 +447,9 @@ function createServer(options = {}) {
447
447
  server.registerTool('fill_variables', {
448
448
  title: 'Fill prompt variables',
449
449
  description: 'Fetch a prompt and substitute its {{variable}} placeholders with the given ' +
450
- 'values, returning ready-to-use text. Unknown/empty values stay as {{name}} ' +
451
- 'in the output (listed in missing_variables).',
450
+ 'values, returning ready-to-use text. Empty or unset ones stay as {{name}} in the ' +
451
+ 'output (missing_variables); names you passed that the prompt does not have are ' +
452
+ 'ignored and listed in unknown_variables, so check it before relying on the text.',
452
453
  inputSchema: {
453
454
  name: zod_1.z.string().min(1).describe('Prompt title, id, or unique title fragment'),
454
455
  variables: zod_1.z.record(zod_1.z.string()).describe('Variable name → value map'),
@@ -470,12 +471,19 @@ function createServer(options = {}) {
470
471
  const raw = (0, promptText_1.versionText)(picked);
471
472
  const filled = (0, promptVariables_1.fillVariables)(raw, variables);
472
473
  const missing = (0, promptVariables_1.extractVariables)(filled);
474
+ // Yanlış adla doldurup "doldurdum" denmesin: prompt'ta olmayan adlar sessizce yok sayılmaz.
475
+ const known = new Set((0, promptVariables_1.extractVariables)(raw));
476
+ const unknown = Object.keys(variables).filter((k) => !known.has(k));
473
477
  (0, api_client_1.recordPromptUse)(prompt.id, useOptions(server, 'mcp_tool', { version: picked.version_number }));
474
478
  return ok({
475
479
  id: prompt.id,
476
480
  title: prompt.title,
477
481
  version: picked.version_number ?? null,
478
482
  missing_variables: missing,
483
+ unknown_variables: unknown,
484
+ ...(unknown.length > 0
485
+ ? { warning: `Not in this prompt, so ignored: ${unknown.join(', ')}. Its variables: ${[...known].join(', ') || 'none'}.` }
486
+ : {}),
479
487
  content: filled,
480
488
  });
481
489
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptlike-mcp",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "mcpName": "io.github.zeynepaslierhan/promptlike-mcp",
5
5
  "description": "MCP server for PromptLikeEngineer - your prompt library as MCP tools, slash-command prompts and @-resources: list, search, get, fill {{variables}}, suggest, and save new prompts/versions (add-only).",
6
6
  "bin": {