Skip to content

fix(mcp): expose shared API query params on all URL tools - #8

Merged
Kikobeats merged 2 commits into
masterfrom
fix/mcp-shared-query-params
Aug 5, 2026
Merged

fix(mcp): expose shared API query params on all URL tools#8
Kikobeats merged 2 commits into
masterfrom
fix/mcp-shared-query-params

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Share Microlink API browser query params (javascript, waitUntil, waitForSelector, headers, proxy, …) across content, collection, function, metadata, and other URL tools — not only screenshot/pdf/extract.
  • Add missing documented params: top-level cacheKey and screenshot.quality.
  • Update tool descriptions so agents know they can combine content tools with browser options.

Why

microlink_markdown (and siblings) previously only accepted { url, selector, … }. Agents following playground prompts that mentioned JS rendering / waitUntil hit schema validation failures even though those are valid Microlink API query parameters on every URL fetch.

Test plan

  • pnpm --filter @microlink/mcp test (71 passing)
  • After publish: call microlink_markdown with waitUntil: "networkidle0" and confirm it reaches the API

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Added screenshot quality controls from 0–100.
    • Expanded browser options across visual, content, and function tools, including JavaScript execution, wait conditions, selectors, scrolling, headers, and proxy settings.
    • Added palette options for logo and metadata results.
    • Added cache key support for shared visual requests.
  • Documentation

    • Updated tool descriptions to document the newly supported browser options.
  • Bug Fixes

    • Improved validation and forwarding of screenshot and browser configuration options.

Content/collection tools only accepted selector fields, so agents could not
pass javascript/waitUntil even though the Microlink API supports them on
every URL fetch. Share visualSchema across URL tools and add cacheKey plus
screenshot quality from the public API docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Kikobeats, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 548a20b5-c1d0-49e7-bcb1-39f5559702b0

📥 Commits

Reviewing files that changed from the base of the PR and between fee45c3 and b9e18cf.

📒 Files selected for processing (4)
  • packages/core/src/index.js
  • packages/mcp/src/schemas.js
  • packages/mcp/test/schemas.test.js
  • packages/mcp/test/tools.test.js
📝 Walkthrough

Walkthrough

MCP schemas now support screenshot quality, shared visual parameters, palette fields, and browser options across more inputs. Tool descriptions document browser options. Tests validate schema bounds, option acceptance, and Markdown query forwarding.

Changes

Shared visual options

Layer / File(s) Summary
Shared schema contracts
packages/mcp/src/schemas.js
Adds screenshot quality, shared cacheKey and browser parameters, palette fields, and shared visual parameters across multiple input schemas.
Tool option documentation
packages/mcp/src/tools/function.js, packages/mcp/src/tools/html.js, packages/mcp/src/tools/markdown.js, packages/mcp/src/tools/text.js
Documents supported browser options for function and content extraction tools.
Schema and request validation
packages/mcp/test/schemas.test.js, packages/mcp/test/tools.test.js
Tests screenshot quality bounds, shared options, function and metadata fields, and Markdown query forwarding.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MCPClient
  participant microlink_markdown
  participant MicrolinkAPI
  MCPClient->>microlink_markdown: submit javascript and waitUntil options
  microlink_markdown->>MicrolinkAPI: forward options as query parameters
  MicrolinkAPI-->>microlink_markdown: return Markdown response
  microlink_markdown-->>MCPClient: return tool result
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: exposing shared API query parameters across MCP URL tools.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mcp-shared-query-params

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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fee45c3. Configure here.

Comment thread packages/mcp/src/schemas.js
Comment thread packages/mcp/src/schemas.js Outdated
@coveralls

coveralls commented Aug 5, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 31040976080

Warning

No base build found for commit 13e0818 on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 77.05%

Details

  • Patch coverage: 31 of 31 lines across 6 files are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 3679
Covered Lines: 2852
Line Coverage: 77.52%
Relevant Branches: 565
Covered Branches: 418
Branch Coverage: 73.98%
Branches in Coverage %: Yes
Coverage Strength: 11.32 hits per line

💛 - Coveralls

Add quality to SCREENSHOT_KEYS so microlink.io nests it under screenshot.
Drop top-level data from content/collection MCP schemas since those helpers
overwrite the data object with their fixed field rule.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Kikobeats
Kikobeats merged commit 7a7ccb0 into master Aug 5, 2026
9 checks passed
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