Skip to content

docs(client): reattach JSDoc to validateAuthorizationResponseIssuer and InsufficientScopeError - #3121

Open
shlee1223 wants to merge 1 commit into
modelcontextprotocol:mainfrom
shlee1223:docs/reattach-auth-jsdoc
Open

shlee1223 wants to merge 1 commit into
modelcontextprotocol:mainfrom
shlee1223:docs/reattach-auth-jsdoc

Conversation

@shlee1223

Copy link
Copy Markdown

Motivation and Context

Hi, thanks for maintaining the SDK!

In #2286, a declaration ended up between each of these doc blocks and the export it describes, so the docs attach to the wrong declaration:

  • validateAuthorizationResponseIssuer() → its doc attaches to isIssParameterSupported
  • InsufficientScopeError → its doc attaches to AuthorizationServerMismatchError

As a result, both exports have no docs in the published @modelcontextprotocol/[email protected] typings. This PR only moves the two inserted declarations above the doc blocks. No text or behavior changes.

How Has This Been Tested?

Built the client package and confirmed both docs now appear in dist/index.d.mts. Typecheck, lint, and the client tests pass.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Includes a patch changeset for @modelcontextprotocol/client, since the published typings change.

@shlee1223
shlee1223 requested a review from a team as a code owner October 29, 2026 07:17
@changeset-bot

changeset-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d85bbc2

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

This PR includes changesets to release 6 packages
Name Type
@modelcontextprotocol/client Patch
@modelcontextprotocol/codemod Patch
@modelcontextprotocol/core Patch
@modelcontextprotocol/server-legacy Patch
@modelcontextprotocol/server Patch
@modelcontextprotocol/core-internal Patch

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@3121

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@3121

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@3121

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@3121

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@3121

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@3121

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@3121

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@3121

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@3121

commit: d85bbc2

@claude claude Bot added the v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes label Oct 29, 2026
@arhancanli

Copy link
Copy Markdown

Read the diff against d85bbc2: both moves are pure relocations (the isIssParameterSupported helper goes above the validateAuthorizationResponseIssuer block, and the InsufficientScopeError block goes below AuthorizationServerMismatchError, directly above its class), and no comment text changes.

To check whether the same slip exists elsewhere, I scanned every non-test .ts under packages/{client,server,core}*/src at this head for a */ followed (after blank lines) by another /**. auth.ts and authErrors.ts now return nothing. The remaining hits I looked at are not the same bug: core-internal/src/types/types.ts:316 is a /* Tasks ... */ section comment (not JSDoc) in front of a @deprecated one-liner, and types.ts:588, spec.types.2026-07-28.ts:432 and errors/crossBundleBrand.ts:49 have a blank line between a section-style block and the next declaration's doc. I only inspected those four and did not open the other files in the list, so treat that as a spot check, not an audit.

Since the bug only shows in the emitted typings, a cheap guard would be a test that greps dist/index.d.mts for the two docs' first lines, but that may be more than a docs fix needs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants