Skip to content

refactor(mcp): describe schemas; keep search and checkout listed - #64

Merged
Kikobeats merged 4 commits into
masterfrom
refactor/mcp-schema-and-toolset
Sep 17, 2026
Merged

Kikobeats merged 4 commits into
masterfrom
refactor/mcp-schema-and-toolset

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Sep 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Put HOW on JSON Schema (screenshot/pdf/search/function fields and the shared browser keys agents actually use) now that tool descriptions are short.
  • Always register search and checkout together. Search needs a key; checkout is how you buy one. Hiding search when the key is missing kills that funnel: the model never picks the tool, never hits the missing-key error, never suggests checkout.
  • Server instructions and the search tool description point at checkout when the key is missing.

Did not merge video/videos or split billing into another package.

Test plan

  • pnpm --filter @microlink/mcp test
  • Start the server without MICROLINK_API_KEY and confirm both microlink_search and checkout tools are listed
  • In an MCP client, inspect microlink_screenshot input schema for fullPage / device descriptions
  • Call microlink_search without a key and confirm the model can route to checkout

Note

Low Risk
Documentation and schema metadata only; no runtime API or auth logic changes in the diff.

Overview
Moves how-to-use detail into MCP input JSON Schema by adding Zod .describe() text across screenshot/PDF, shared browser/visual options, content/collection tools, embed, Lighthouse, search, and function inputs—so agents can read field docs via microlink_docs/schema instead of long tool blurbs.

Search + API key funnel: default server instructions and the microlink_search tool text now say search requires an API key and to use checkout tools when the key is missing (aligned with keeping search visible alongside checkout).

CLI: --animated help now says it captures a short MP4/WebM video instead of a still (not GIF-focused wording).

Tests: assert screenshot schema exposes fullPage descriptions in JSON Schema; stdio-server expectations updated for the new instruction wording.

Reviewed by Cursor Bugbot for commit 837e71b. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Documentation
    • Clarified that animated screenshots are captured as short MP4/WebM videos instead of still images.
    • Added descriptive guidance across available screenshot, PDF, browser, visual, content, collection, embed, Lighthouse, search, and function inputs.
    • Clarified that search requires an API key and directs users without one to checkout tools.
  • Tests
    • Added coverage confirming that screenshot input documentation describes the fullPage option.
    • Updated checks for the revised search and checkout guidance.

HOW belongs on the JSON Schema after short tool prose. Checkout is how you get a key, so it registers without MICROLINK_API_KEY; search needs a key, so it registers when one is set.

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

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: cf938c64-a19b-45e6-83e6-78feb663ae43

📥 Commits

Reviewing files that changed from the base of the PR and between 77d1ead and e1c4188.

📒 Files selected for processing (6)
  • packages/core/bin/help.js
  • packages/mcp/src/index.js
  • packages/mcp/src/schemas.js
  • packages/mcp/src/tools/search.js
  • packages/mcp/test/schemas.test.js
  • packages/mcp/test/stdio-server.test.js
 __________________________
< Needle. Haystack. Found. >
 --------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@coveralls

coveralls commented Sep 17, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 35228153674

Warning

No base build found for commit 77d1ead 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: 80.92%

Details

  • Patch coverage: 183 of 183 lines across 4 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: 5718
Covered Lines: 4647
Line Coverage: 81.27%
Relevant Branches: 959
Covered Branches: 756
Branch Coverage: 78.83%
Branches in Coverage %: Yes
Coverage Strength: 27.84 hits per line

💛 - Coveralls

Hiding search when no API key kills the buy funnel: the model never
picks the tool, never hits the missing-key error, never suggests checkout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Kikobeats Kikobeats changed the title refactor(mcp): describe schemas and gate checkout vs search refactor(mcp): describe schemas; keep search and checkout listed Sep 17, 2026
@Kikobeats
Kikobeats merged commit d9ca069 into master Sep 17, 2026
8 checks passed
@Kikobeats
Kikobeats deleted the refactor/mcp-schema-and-toolset branch September 17, 2026 13:38
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