Skip to content

fix(mcp): add resource_link to McpToolCallResponse type union [fixes #351 compile]#387

Open
proyectoauraorg wants to merge 8 commits into
Zoo-Code-Org:renovate/npm-modelcontextprotocol-sdk-vulnerabilityfrom
proyectoauraorg:fix/mcp-sdk-resource-link-type
Open

fix(mcp): add resource_link to McpToolCallResponse type union [fixes #351 compile]#387
proyectoauraorg wants to merge 8 commits into
Zoo-Code-Org:renovate/npm-modelcontextprotocol-sdk-vulnerabilityfrom
proyectoauraorg:fix/mcp-sdk-resource-link-type

Conversation

@proyectoauraorg
Copy link
Copy Markdown
Contributor

Summary

Fixes the TypeScript compile failure in PR #351 caused by @modelcontextprotocol/sdk v1.26.0 introducing a new resource_link content type.

Root Cause

The SDK v1.26.0 adds { type: "resource_link", uri, name, description?, mimeType? } to the content union returned by tool calls. McpToolCallResponse in packages/types/src/mcp.ts only accepted text | image | audio | resource, causing TS2322 at McpHub.ts:2208 and :2253.

Fix

Added the resource_link variant to the McpToolCallResponse.content union type:

| {
    type: "resource_link"
    uri: string
    name: string
    description?: string
    mimeType?: string
  }

Testing

  • @roo-code/types check-types passes
  • zoo-code check-types passes
  • ✅ McpHub tests pass (60/60)

Related

proyectoauraorg and others added 4 commits May 26, 2026 00:05
…provider

Merging 12 new test cases covering completePrompt, streaming resilience, and edge cases.
Dependabot bump. Compatible: project requires node>=20.20.2, uuid v14 requires node>=20.
# Conflicts:
#	pnpm-lock.yaml
@modelcontextprotocol/sdk v1.26.0 introduced a new 'resource_link' content
type in tool call responses. Without this type in the McpToolCallResponse
union, TypeScript compilation fails at McpHub.ts:2208 and :2253 with TS2322.

The new type includes uri, name, optional description, and optional mimeType,
matching the SDK's ResourceLink definition.

Fixes compile failure in PR Zoo-Code-Org#351
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9687b4ff-7210-4a7e-9c2b-0a63a62f5639

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/integrations/openai-codex/oauth.ts 0.00% 1 Missing ⚠️
.../services/code-index/vector-store/qdrant-client.ts 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@taltas
Copy link
Copy Markdown
Contributor

taltas commented May 29, 2026

Screenshot 2026-05-29 at 11 12 40 am Again, I'm guessing you didn't mean to commit this?

An accidental uuid 11.1.0→14.0.0 bump leaked into this branch and broke the
Windows unit tests: uuid@14 drops the Math.random fallback and now requires
globalThis.crypto.getRandomValues, which the Vitest forks pool on Windows
(Node 20) does not provide. Reverting to ^11.1.0 matches upstream/main and
restores green CI.
@proyectoauraorg
Copy link
Copy Markdown
Contributor Author

You're right — tmp/README.md was accidentally committed from a local scratch directory and has now been removed (e7fa341).

I also reverted the unintended uuid 11→14 bump that was breaking the Windows tests. Thanks for catching it.

@renovate renovate Bot force-pushed the renovate/npm-modelcontextprotocol-sdk-vulnerability branch 2 times, most recently from be89dbe to 17b753c Compare June 1, 2026 14:16
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