Skip to content

Commit 05d326b

Browse files
committed
Merge remote-tracking branch 'origin/v2/main' into v2/fix/4741-docker-non-root-user
Signed-off-by: cliffhall <[email protected]> # Conflicts: # src/memory/README.md
2 parents 2b9740a + 44616d7 commit 05d326b

28 files changed

Lines changed: 3899 additions & 1389 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@modelcontextprotocol/server-filesystem": patch
3+
"@modelcontextprotocol/server-memory": patch
4+
"@modelcontextprotocol/server-everything": patch
5+
---
6+
7+
Describe every tool input property in tools/list (#3669). Every filesystem path argument now says how it is resolved and that it must stay inside the allowed directories, and `excludePatterns` says how its globs match (which differs between `directory_tree` and `search_files`). The memory server's top-level array arguments, and the everything server's `resourceType`, gain descriptions, and `get-resource-reference`'s `resourceId` no longer claims to fetch only text resources.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-everything": patch
3+
---
4+
5+
Raise the `express` dependency floor to `^5.3.0` and `jszip` to `^3.10.2` (monthly dependency refresh).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-filesystem": patch
3+
---
4+
5+
The `list_directory` and `list_directory_with_sizes` descriptions now say when to use each one and name the other: `list_directory` for the names directly inside a path (and `directory_tree` for a recursive view), `list_directory_with_sizes` when sizes matter, sorted by name or by size, largest first, with the totals at the end.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-memory": patch
3+
---
4+
5+
The `delete_entities` and `delete_relations` descriptions now say when to use each one and name the other: `delete_entities` removes whole entities with their observations and every relation that touches them, while `delete_relations` removes a link and keeps both entities. `delete_relations` also states that a relation is deleted only on an exact match of `from`, `to` and `relationType`, and points to `open_nodes` for reading the stored type first.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-memory": patch
3+
---
4+
5+
Fix the file lock's heartbeat refreshing a lock file this process no longer owns: once a lock is broken as stale and re-taken by another process, the previous holder stops refreshing it, so a crashed new owner's lock can still go stale and be broken.

‎.github/workflows/release.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
steps:
140140
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
141141

142-
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
142+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
143143
with:
144144
node-version: 24
145145
cache: npm
@@ -180,7 +180,7 @@ jobs:
180180
touch "release-artifact/$PACKAGE/SKIP"
181181
182182
- name: Upload the artifact for the publish job
183-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
183+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
184184
with:
185185
name: npm-${{ matrix.package }}
186186
path: release-artifact/${{ matrix.package }}/
@@ -221,7 +221,7 @@ jobs:
221221
# and a range would let whatever 24.x is current at release time in.
222222
# The build jobs take the current 24.x; this job only reads a manifest and runs
223223
# `npm publish` on the verified tarball.
224-
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
224+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
225225
with:
226226
node-version: 24.21.0
227227
registry-url: "https://registry.npmjs.org"
@@ -242,7 +242,7 @@ jobs:
242242
' "$NPM_VERSION"
243243
244244
- name: Download the artifact built by the build job
245-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
245+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
246246
with:
247247
name: npm-${{ matrix.package }}
248248
path: release-artifact
@@ -384,11 +384,11 @@ jobs:
384384
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
385385

386386
- name: Set up Python
387-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
387+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
388388
with:
389389
python-version-file: "src/${{ matrix.package }}/.python-version"
390390

391-
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
391+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
392392
with:
393393
node-version: 24
394394
cache: npm
@@ -412,7 +412,7 @@ jobs:
412412
run: npm run pack:verify -- "$PACKAGE" --out release-artifact
413413

414414
- name: Upload the artifact for the publish job
415-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
415+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
416416
with:
417417
name: pypi-${{ matrix.package }}
418418
path: release-artifact/${{ matrix.package }}/
@@ -435,7 +435,7 @@ jobs:
435435
runs-on: ubuntu-latest
436436
steps:
437437
- name: Download the artifact built by the build job
438-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
438+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
439439
with:
440440
name: pypi-${{ matrix.package }}
441441
path: dist
@@ -472,7 +472,7 @@ jobs:
472472
# `skip-existing` is the PyPI side of the registry-diff guard: an
473473
# already-published version is skipped, not failed.
474474
- name: Publish package to PyPI
475-
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
475+
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
476476
with:
477477
packages-dir: dist
478478
skip-existing: true

‎.github/workflows/sdk-watch.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
ref: v2/main
6565

6666
- name: Setup Node.js
67-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
67+
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
6868
with:
6969
node-version: 24
7070
cache: npm
@@ -137,7 +137,7 @@ jobs:
137137
138138
- name: Review the SDK changes with Claude
139139
id: analysis
140-
uses: anthropics/claude-code-action@12dd8d74c712f5f3669365b2369b558c495b1104 # v1.0.238
140+
uses: anthropics/claude-code-action@d535f5172dec02b204866b393d6b20b9b2aaf98d # v1.0.266
141141
with:
142142
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
143143
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -261,7 +261,7 @@ jobs:
261261
# the job, rather than relying on step-failure ordering alone.
262262
- name: Upload the analysis
263263
if: ${{ hashFiles('analysis.md') != '' }}
264-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
264+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
265265
with:
266266
name: sdk-watch-analysis-${{ matrix.target.issue }}
267267
path: analysis.md
@@ -289,7 +289,7 @@ jobs:
289289
- name: Download the analysis
290290
id: download
291291
continue-on-error: true
292-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
292+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
293293
with:
294294
name: sdk-watch-analysis-${{ matrix.target.issue }}
295295

‎package-lock.json‎

Lines changed: 30 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Every property of every tool input schema the server advertises in
2+
// tools/list carries a description (#3669). A model reads these to decide what
3+
// to pass, and with no description it guesses from the property name alone.
4+
// This is the reference implementation other server authors copy, so the rule
5+
// is pinned for every tool, existing or added later, and for nested
6+
// properties (array items, object fields) as well as top-level ones.
7+
8+
import { afterEach, describe, expect, it } from "vitest";
9+
import {
10+
ALL_CAPABILITIES,
11+
connect,
12+
connectModern,
13+
MODERN_CAPABILITIES,
14+
type Session,
15+
} from "./harness.js";
16+
17+
/** A JSON Schema node, as much of it as the walk reads. */
18+
type SchemaNode = {
19+
description?: unknown;
20+
properties?: Record<string, SchemaNode>;
21+
items?: SchemaNode | SchemaNode[];
22+
anyOf?: SchemaNode[];
23+
oneOf?: SchemaNode[];
24+
allOf?: SchemaNode[];
25+
};
26+
27+
/**
28+
* The path of every property under `node`, at any depth, that has no
29+
* non-empty description: the properties of nested objects and of array
30+
* items count, since a model fills those in too.
31+
*/
32+
function undescribed(node: SchemaNode, path: string): string[] {
33+
const missing: string[] = [];
34+
for (const [key, child] of Object.entries(node.properties ?? {})) {
35+
const at = `${path}.${key}`;
36+
if (
37+
typeof child.description !== "string" ||
38+
child.description.trim() === ""
39+
) {
40+
missing.push(at);
41+
}
42+
missing.push(...undescribed(child, at));
43+
}
44+
const items = node.items;
45+
for (const item of Array.isArray(items) ? items : items ? [items] : []) {
46+
missing.push(...undescribed(item, `${path}[]`));
47+
}
48+
for (const branch of [
49+
...(node.anyOf ?? []),
50+
...(node.oneOf ?? []),
51+
...(node.allOf ?? []),
52+
]) {
53+
missing.push(...undescribed(branch, path));
54+
}
55+
return missing;
56+
}
57+
58+
let session: Session | undefined;
59+
60+
afterEach(async () => {
61+
await session?.close();
62+
session = undefined;
63+
});
64+
65+
// Each era lists some tools the other does not (the task tools only on
66+
// 2026-07-28, the toggle-* tools only on the 2025 era), so both are checked.
67+
// Every capability is declared, so the tools gated on one are listed too.
68+
describe.each([
69+
{
70+
era: "2025-era",
71+
open: () => connect({ capabilities: ALL_CAPABILITIES }),
72+
},
73+
{
74+
era: "2026-07-28",
75+
open: () => connectModern({ capabilities: MODERN_CAPABILITIES }),
76+
},
77+
])("tool input descriptions on the $era surface (#3669)", ({ open }) => {
78+
it("describes every input property of every tool", async () => {
79+
session = await open();
80+
const { tools } = await session.client.listTools();
81+
expect(tools.length).toBeGreaterThan(0);
82+
const missing = tools.flatMap((tool) =>
83+
undescribed(tool.inputSchema as SchemaNode, tool.name),
84+
);
85+
expect(missing).toEqual([]);
86+
});
87+
});

‎src/everything/__tests__/surface.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,12 @@ describe("tools/list", () => {
509509
"properties": {
510510
"resourceId": {
511511
"default": 1,
512-
"description": "ID of the text resource to fetch",
512+
"description": "ID of the text or blob resource to fetch, a positive integer",
513513
"type": "number",
514514
},
515515
"resourceType": {
516516
"default": "Text",
517+
"description": "Whether to reference a text resource or a blob resource",
517518
"enum": [
518519
"Text",
519520
"Blob",

0 commit comments

Comments
 (0)