| name | finwiz-context7 |
| description | Automatically uses Context7 MCP tools to fetch up-to-date library documentation when working with external libraries. Use when implementing code with CrewAI, Pydantic, pytest, or any external library to ensure accuracy and compatibility. |
| allowed-tools | ["mcp_context7_resolve_library_id","mcp_context7_get_library_docs","Read","Edit"] |
FinWiz Context7 Integration
Key Principle: Proactively use Context7 MCP tools to fetch current library documentation. Don't wait for explicit requests - if you're implementing something with an external library, automatically get the docs.
When to Use Context7
Use Context7 tools automatically for:
- Code generation involving external libraries (CrewAI, Pydantic, pytest, etc.)
- Setup and configuration steps for dependencies
- Library/API documentation lookups for accurate implementation
- Version-specific features to ensure compatibility
- Best practices for library usage patterns
Context7 Workflow
Step 1: Resolve Library ID
mcp_context7_resolve_library_id("crewai")
Step 2: Get Library Documentation
mcp_context7_get_library_docs(
"/joaomdmoura/crewai",
topic="flow state management",
tokens=5000
)
Step 3: Implement Using Current Patterns
Use the fetched documentation to implement code with:
- Current API methods (not deprecated ones)
- Proper parameter names and types
- Best practices from the library maintainers
- Version-compatible features
FinWiz-Specific Libraries
Common libraries that benefit from Context7 lookup:
| Library | Context7 ID | Common Topics |
|---|
| CrewAI | /joaomdmoura/crewai | flow, agents, tasks, crews |
| Pydantic | /pydantic/pydantic | validation, strict mode, v2 |
| pytest | /pytest-dev/pytest | fixtures, markers, parametrize |
| pytest-mock | /pytest-dev/pytest-mock | mocker fixture, patching |
| httpx | /encode/httpx | async client, authentication |
| pandas | /pandas-dev/pandas | dataframes, operations |
| FastAPI | /tiangolo/fastapi | endpoints, dependencies |
Example Usage Patterns
CrewAI Flow Implementation
mcp_context7_resolve_library_id("crewai")
mcp_context7_get_library_docs(
"/joaomdmoura/crewai",
topic="flow state management pydantic models",
tokens=7000
)
Pydantic Model Validation
mcp_context7_get_library_docs(
"/pydantic/pydantic",
topic="strict mode validation extra forbid",
tokens=4000
)
Testing with pytest-mock
mcp_context7_get_library_docs(
"/pytest-dev/pytest-mock",
topic="mocker fixture patching best practices",
tokens=3000
)
Benefits
Accuracy
- Current APIs: Use latest library methods, not deprecated ones
- Correct Parameters: Get proper parameter names and types
- Version Compatibility: Ensure code works with installed versions
Efficiency
- Avoid Errors: Prevent using outdated or incorrect patterns
- Best Practices: Follow library maintainer recommendations
- Faster Development: Get accurate info immediately
Compliance
- Library Standards: Follow official library patterns
- FinWiz Standards: Combine with existing FinWiz steering rules
- Quality Assurance: Reduce bugs from incorrect usage
Integration with FinWiz Standards
Context7 documentation should be used in conjunction with FinWiz steering rules:
- Validate patterns against
finwiz-crewai skill
- Ensure testing follows
finwiz-testing skill
- Apply validation per
finwiz-validation skill
- Maintain quality per
finwiz-development skill
Proactive Usage Examples
When You See These Patterns, Use Context7:
class MyFlow(Flow[StateModel]):
class MyModel(BaseModel):
def test_example(mocker):
async with httpx.AsyncClient() as client:
Token Management
Adjust token limits based on complexity:
- Simple lookups: 3000 tokens
- Standard usage: 5000 tokens (default)
- Complex implementations: 7000-10000 tokens
- Comprehensive guides: 15000+ tokens
Error Handling
If Context7 lookup fails:
- Continue with existing knowledge but note the limitation
- Use FinWiz steering rules as fallback guidance
- Document the assumption in code comments
- Suggest manual verification if critical
Quality Assurance
After using Context7:
- Verify patterns match FinWiz standards
- Test implementation thoroughly
- Document any deviations from standard patterns
- Update FinWiz skills if new patterns emerge
Remember: Context7 provides the what (current library APIs), FinWiz skills provide the how (project-specific patterns and standards).