Skip to content

Make McpSchema.InputRequired a schema class - #10368

Merged
tim-smart merged 2 commits into
v4/next-minorfrom
agent/bob/81a236248a23
Nov 4, 2026
Merged

tim-smart merged 2 commits into
v4/next-minorfrom
agent/bob/81a236248a23

Conversation

@tim-smart

@tim-smart tim-smart commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

McpSchema.InputRequired is now a Schema.TaggedClass, and McpSchema.McpInputRequest is now a schema. A toolkit tool can declare failure: McpSchema.InputRequired directly.

#10362 JSON-encodes "return"-mode tool failures, so a Schema.instanceOf(McpSchema.InputRequired) failure schema now fails with ToolResultEncodingError. That broke two ProtocolAdapters.test.ts tests from #10090 once both were on v4/next-minor. With the schema class, those tests declare failure: McpSchema.InputRequired.

Review notes

  • The InputRequired release note is in a new minor changeset (mcp-input-required-schema.md). Encode tool results with their JSON codec #10362's patch changeset is unchanged, so the note won't ship in a 4.0 patch release.
  • The InputRequired constructor now validates its fields and throws on invalid input, for example an unknown request method. The changeset's migration notes cover this.

Validation

  • pnpm vitest run packages/effect/test/ai/ (34 files, 1749 passed)
  • tstyche typetest/ai/McpServer.tst.ts
  • pnpm check

Closes EFF-3358

@changeset-bot

changeset-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 957615e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 33 packages
Name Type
effect Minor
@effect/opentelemetry Minor
@effect/vitest Minor
@effect/ai-anthropic Minor
@effect/ai-cloudflare Minor
@effect/ai-openai-compat Minor
@effect/ai-openai Minor
@effect/ai-openrouter Minor
@effect/ai-typesafe Minor
@effect/atom-react Minor
@effect/atom-solid Minor
@effect/atom-vue Minor
@effect/platform-browser Minor
@effect/platform-bun Minor
@effect/platform-deno Minor
@effect/platform-node-shared Minor
@effect/platform-node Minor
@effect/sql-clickhouse Minor
@effect/sql-d1 Minor
@effect/sql-libsql Minor
@effect/sql-mssql Minor
@effect/sql-mysql2 Minor
@effect/sql-pg Minor
@effect/sql-pglite Minor
@effect/sql-sqlite-bun Minor
@effect/sql-sqlite-do Minor
@effect/sql-sqlite-node Minor
@effect/sql-sqlite-react-native Minor
@effect/sql-sqlite-wasm Minor
@effect/docgen Minor
@effect/doctest Minor
@effect/graphql-generator Minor
@effect/openapi-generator Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 39.51 KB 39.51 KB 0.00 KB (0.00%)
basic.ts 7.27 KB 7.27 KB 0.00 KB (0.00%)
batching.ts 11.16 KB 11.16 KB 0.00 KB (0.00%)
brand.ts 6.87 KB 6.87 KB 0.00 KB (0.00%)
cache.ts 11.63 KB 11.63 KB 0.00 KB (0.00%)
config.ts 22.93 KB 22.93 KB 0.00 KB (0.00%)
differ.ts 22.09 KB 22.09 KB 0.00 KB (0.00%)
http-client.ts 27.27 KB 27.27 KB 0.00 KB (0.00%)
http-router.ts 37.17 KB 37.17 KB 0.00 KB (0.00%)
logger.ts 12.10 KB 12.10 KB 0.00 KB (0.00%)
metric.ts 9.56 KB 9.56 KB 0.00 KB (0.00%)
optic.ts 7.10 KB 7.10 KB 0.00 KB (0.00%)
pubsub.ts 16.14 KB 16.14 KB 0.00 KB (0.00%)
queue.ts 13.01 KB 13.01 KB 0.00 KB (0.00%)
schedule.ts 11.88 KB 11.88 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 14.18 KB 14.18 KB 0.00 KB (0.00%)
schema-binary.ts 42.09 KB 42.09 KB 0.00 KB (0.00%)
schema-class.ts 21.83 KB 21.83 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 29.69 KB 29.69 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 28.09 KB 28.09 KB 0.00 KB (0.00%)
schema-string-transformation.ts 15.45 KB 15.45 KB 0.00 KB (0.00%)
schema-string.ts 12.38 KB 12.38 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.36 KB 16.36 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 39.05 KB 39.05 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 26.25 KB 26.25 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 20.99 KB 20.99 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 21.15 KB 21.15 KB 0.00 KB (0.00%)
schema-toFormatter.ts 21.25 KB 21.25 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 26.26 KB 26.26 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 21.33 KB 21.33 KB 0.00 KB (0.00%)
schema.ts 20.92 KB 20.92 KB 0.00 KB (0.00%)
stm.ts 14.30 KB 14.30 KB 0.00 KB (0.00%)
stream.ts 10.47 KB 10.47 KB 0.00 KB (0.00%)
supervisor.ts 11.41 KB 11.41 KB 0.00 KB (0.00%)

@tim-smart
tim-smart force-pushed the agent/bob/81a236248a23 branch from 63105b4 to 957615e Compare November 4, 2026 03:09
@tim-smart
tim-smart enabled auto-merge (squash) November 4, 2026 03:10
@tim-smart
tim-smart merged commit b816dba into v4/next-minor Nov 4, 2026
14 checks passed
@tim-smart
tim-smart deleted the agent/bob/81a236248a23 branch November 4, 2026 03:17
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.

1 participant