feat: expose product docs through MCP - #60
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (13)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesProduct documentation access
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant MCPClient
participant microlink_docs
participant docsInputSchema
participant productDocs
participant microlink.io
MCPClient->>microlink_docs: submit product
microlink_docs->>docsInputSchema: validate product
docsInputSchema-->>microlink_docs: return validated product
microlink_docs->>productDocs: load product markdown
productDocs->>microlink.io: fetch documentation
microlink.io-->>productDocs: return markdown
productDocs-->>microlink_docs: return markdown
microlink_docs-->>MCPClient: return docs output
Merge Risk: ⚪ Minimal · up to The new documentation tool’s validated product catalog and README are consistent, with no identified merge-blocking issue. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 13 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Coverage Report for CI Build 35202926339Warning No base build found for commit Coverage: 80.79%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
MCP was importing the CLI runner just to fetch markdown. Co-authored-by: Cursor <cursoragent@cursor.com>
Goal
Add a
microlink_docsMCP tool so agents can fetch the complete parameter documentation for a Microlink product before calling a product tool they do not know well.Design
microlink.io/clientry point.microlink_docs({ product })in@microlink/mcp.productto the 20 products supported by the CLI.One source of truth
The new tool does not copy or generate product documentation. It calls the same loader used by
microlink <product> docs, which fetcheshttps://microlink.io/docs/sdk/methods/<product>.md. This keeps microlink.io as the canonical documentation source and prevents the MCP package from drifting.Tool contract
Valid products:
metadata,logo,markdown,html,text,video,audio,emails,links,images,videos,audios,extract,screenshot,pdf,embed,technologies,lighthouse,search,function.The tool is read-only and declares a string output schema.
How to verify
The MCP tests mock
fetchand cover the happy path, unknown products, and fetch failures.Note
Low Risk
Read-only documentation fetch with no API-key or billing path; main risk is runtime dependency on microlink.io doc URLs staying available.
Overview
Adds
microlink_docsto the MCP server so agents can pull canonical parameter documentation for a Microlink product before calling other product tools.Core (
microlink.io): Publishes a newmicrolink.io/docsexport with the existing docs loader, a fixedproductslist (20 names), and a test thatproductsstays aligned with library method keys.MCP: Registers
microlink_docs({ product }), which fetches the same markdown asmicrolink <product> docsfromhttps://microlink.io/docs/sdk/methods/<product>.md.productis validated via the sharedproductsenum (unknown values get an error listing valid choices). Output is a markdown string; default server instructions and README document the tool. Tests cover success, validation, and fetch failures.Reviewed by Cursor Bugbot for commit f4f14d1. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
microlink_docstool for retrieving canonical Markdown documentation for supported products.Documentation