You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- For patch bumps within the same minor (e.g. 4.4.1 → 4.4.3), use the **minor** release notes (e.g. v4.4.0) plus any patch-specific notes if present.
36
36
4. List **potentially breaking**, **other fixes**, **performance**, and **locales** sections from the release.
37
+
5.**Implementation Audit (Conditional)**: If the release notes are ambiguous or if the upgrade involves a minor/major version bump, perform a targeted search of `node_modules/zod/src/` to verify:
38
+
- Persistence of internal brands (`_def`, `_zod`).
39
+
- Stability of "loose" or "passthrough" logic.
40
+
- Compatibility of the `v3` interop layer within the `v4` package.
37
41
38
42
### Step 2: Repo guidelines
39
43
@@ -130,6 +134,7 @@ Reply with:
130
134
131
135
## Quick PF MCP facts
132
136
137
+
-**Zod is Required for SDK Routing**: Any tool registered with the MCP SDK MUST have a Zod instance for its `inputSchema` (even a minimal one like `z.any()`) to ensure the SDK passes user arguments correctly to the handler. Without it, handlers receive only a context object.
133
138
- Internal tools **require** Zod or raw Zod shapes; JSON Schema is converted via `src/server.schema.ts`.
134
139
- Core APIs: `fromJSONSchema`, `toJSONSchema`, `z.looseObject`, raw shapes with `.optional()` — not `z.undefined()`, `z.tuple()`, `.merge()`.
|**Metadata retention (round-trip preservation)**| Yes — `fromJSONSchema` / `toJSONSchema`| Low — snapshots may include extra keys | None | Update snapshots if custom keys are now preserved; no code change |
| Empty union construction | Indirect — via JSON Schema conversion | Low positive — safer conversion | None | None |
@@ -244,6 +253,11 @@ No release-note item maps to APIs used in PF MCP hot paths; unit, e2e, and audit
244
253
| Plugin authoring | Note in `docs/development.md`: prefer JSON Schema or Zod 4.x aligned with server |
245
254
```
246
255
256
+
## Architecture
257
+
258
+
### SDK Routing Trigger
259
+
The MCP SDK requires `inputSchema` to be a Zod instance to route `(args, context)` to tool handlers. We rehydrate minimal Zod in the parent process (via `normalizeInputSchema`) specifically to trigger this signature, while keeping genuine validation in the isolated child process.
260
+
247
261
## Compatibility Policy (Zod Detection)
248
262
249
263
To support a diverse plugin ecosystem, PatternFly MCP maintains a "Compatibility-First" approach for Zod schema detection.
0 commit comments