Skip to content

test(tool): pin the MCP server's input rule keywords through every adapter - #417

Merged
glebedel merged 2 commits into
mainfrom
test/rule-keywords-passthrough
Nov 19, 2026
Merged

glebedel merged 2 commits into
mainfrom
test/rule-keywords-passthrough

Conversation

@glebedel

@glebedel glebedel commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The StackOne MCP server now advertises each connector input's validation rules as JSON Schema keywords: minLength/maxLength, format, pattern and minimum/maximum, including on array items. They appear in individual-mode tools/list and in search results.
  • The SDK already passes the served schema through unchanged, so users get these with no code change. This adds a test that pins it: a fixture shaped like what tools/list now serves goes through each provider adapter (toOpenAI, toAnthropic, toOpenAIResponses strict and non-strict, toAISDK), and the test asserts every keyword and the required list arrive intact. toClaudeAgentSdk serves the toAnthropic schema, so it is covered too.
  • The adapter list moves into adaptersFor(tool), shared with the existing root pass-through tests.

Test plan

  • vitest run src/tool.test.ts: 159 pass, including the 5 new cases and the type test.
  • oxfmt --check and oxlint are clean on the changed file.
  • Checked by hand against the live APIs: OpenAI normal mode, OpenAI strict mode (with every field required, as strict mode needs) and Gemini all accept every keyword in the fixture.

🤖 Generated with Claude Code

Review gates and proof

Recorded by s2d2 on 014f3db.

gate result
forge ran
security_scan not run
codex_security not run
security_review not run
code_review ran
demo not run

…apter

The MCP server now advertises each connector input's validation rules as JSON
Schema keywords (minLength/maxLength, format, pattern, minimum/maximum, also on
array items). Every adapter already passes the served schema through; this pins
that each one keeps those keywords, so a later schema cleanup cannot drop them
without a failing test.

The adapter list is shared with the root pass-through tests through adaptersFor().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
@glebedel
glebedel requested a review from a team as a code owner November 19, 2026 12:24
@glebedel glebedel self-assigned this Nov 19, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@417

commit: 014f3db

Review: the served required list is part of what reaches the model, and a
re-sorted or dropped required list has shipped before in the Python SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
@glebedel
glebedel merged commit e7c3a0f into main Nov 19, 2026
21 checks passed
@glebedel
glebedel deleted the test/rule-keywords-passthrough branch November 19, 2026 12:48
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.

2 participants