Package Evaluation (Finding the Best Modern Library)
When the task involves choosing a library (e.g., "what's the best PDF library", "recommend a date picker"), use this workflow:
Step 1: Check Org Docs First
A best library may have already been found and documented! Query the "docs" MCP server for library-specific documentation:
- •Use
ListMcpResourcesToolwithserver: "docs"to list available resources - •Look for matching library docs in
org://docs/libraries/(e.g.,org://docs/libraries/tanstack-query.md) or docs that have a similar category to the user prompt. - •Use
ReadMcpResourceToolto read the org docs and see if there is a preferred library mentioned.
Step 2: Search Community Forums
Use WebSearch with queries like:
- •
"best [purpose] library typescript reddit 2024"or current year - •
"[purpose] npm package recommendations reddit" - •
"[library-name] vs [alternative] typescript"
Reddit and forums reveal real-world issues that docs won't show—maintenance problems, hidden gotchas, and migration pain.
Step 3: Verify Library Health
ALWAYS fetch and include these metrics for each candidate (use WebFetch on
GitHub repo and npm pages):
- •GitHub Stars: Indicates community adoption and trust
- •Last Update Date: When the library was last published/committed
- •Weekly Downloads: npm download count (indicates active usage)
For each candidate, also check:
- •
Last Update Health:
- •Red flag: >2 years ago (likely abandoned)
- •Yellow flag: 6-24 months ago
- •Green flag: Within 6 months
- •
TypeScript Support:
- •Built-in types (best): Ships with the package
- •
@types/package: Acceptable but may lag - •No types: Avoid for TypeScript projects
- •
Maintenance Signals: Open issues, response time, release frequency
Step 4: Check for Modern Alternatives
- •Search
"[old-library] alternative 2024"or"modern [purpose] library" - •Check for deprecation notices
- •Prefer libraries with ESM support and tree-shaking
Library Recommendation Output
## Library Recommendation: [Purpose] ### Recommended [library-name] - GitHub Stars: [count] - Last updated: [date] - TypeScript: [Built-in / @types / None] - Weekly downloads: [count] - Why: [1-2 sentence justification] ### Alternatives Considered - [alt-1]: [why not - e.g., "last updated 2019"] - [alt-2]: [why not - e.g., "no TypeScript support"] ### Community Sentiment **Summary of Forum 1 (XXX upvotes)**\ https://reddit.com/r/foo/bar.md **Summary of Forum 2 (XXX upvotes)**\ https://reddit.com/r/foo/baz.md <answer-goes-here>
Examples
Example 1: User needs to choose a library
Query: "What's the best PDF generation library for TypeScript?"
Process:
- •Check org docs → Not found in any docs in
org://docs/libraries/ - •Search Reddit/forums →
WebSearch: "best pdf library typescript reddit 2024" - •Identify candidates (e.g., pdf-lib, pdfkit, jspdf, puppeteer)
- •Verify each candidate:
- •Check npm for last update date
- •Check for built-in TypeScript types
- •Look at GitHub stars/issues
- •Return:
### Library Recommendation: PDF Generation **Recommended**: pdf-lib - Last updated: 2024-01 - TypeScript: Built-in - Weekly downloads: 1.2M - Why: Pure JS, no native deps, great TS support, actively maintained **Alternatives Considered**: - pdfkit: Good but requires @types package, less TS-native - jspdf: Last major update 2022, community reports maintenance slowdown - puppeteer: Overkill for simple PDF generation, heavy dependency **Community Sentiment**: Reddit consensus favors pdf-lib for new TypeScript projects due to modern API and zero native dependencies.