Skip to content

fix: strip unsupported regex patterns from tool schemas - #58

Merged
Siumauricio merged 1 commit into
Dokploy:mainfrom
ebbsanchez:codex/strip-lookaround-schema-patterns
Aug 7, 2026
Merged

Siumauricio merged 1 commit into
Dokploy:mainfrom
ebbsanchez:codex/strip-lookaround-schema-patterns

Conversation

@ebbsanchez

Copy link
Copy Markdown

Summary

  • remove provider-incompatible regex lookaround pattern fields from MCP tools/list JSON schemas
  • keep the existing Zod runtime validators unchanged for actual tool calls
  • add a regression test that walks every exposed tool schema and fails on lookaround patterns

Fixes #45.

Verification

  • npm exec --yes pnpm@10 -- install --frozen-lockfile
  • npm exec --yes pnpm@10 -- test src/server.test.ts
  • npm exec --yes pnpm@10 -- format
  • npm exec --yes pnpm@10 -- lint
  • npm exec --yes pnpm@10 -- test
  • npm exec --yes pnpm@10 -- type-check
  • git diff --check

Note: biome check still reports the existing ResponseFormatter static-only class warning, but exits successfully after formatting.

@ebbsanchez

Copy link
Copy Markdown
Author

Hi, gentle follow-up after a couple of weeks. This is still ready on my side; happy to adjust or close if it is not aligned with the project direction.

@Siumauricio
Siumauricio merged commit 886414b into Dokploy:main Aug 7, 2026
Siumauricio added a commit to franktronics/mcp-dokploy that referenced this pull request Aug 7, 2026
Extends the lookaround strip from Dokploy#58: any schema pattern that fails to
compile under the RegExp v flag (e.g. the database password pattern with
an unescaped '[' inside a character class) is now removed from the
advertised tool schemas. DeepSeek and other strict validators reject
these patterns, breaking tools/list for all database tools.

Server-side Zod validation is unchanged; only the JSON Schema exposed to
clients is sanitized.

Fixes Dokploy#43

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(schema): regex lookaround in bitbucketEmail/letsEncryptEmail/email patterns breaks OpenAI / Sonnet-strict validators

3 participants