add_project_context
Adds project context for a library using exact package names, with optional topic focus and token amount.
Instructions
Adds knowledge context for a library using EXACT package names from package.json or confirmed library names. If you're unsure about the exact library name, use the search workflow first: 1) Search GitHub for the library, 2) Confirm the correct repository, 3) Use this tool with the exact name. For example: Use 'remotion' (not '@remotion/captions'), 'react' (not 'react-dom'), '@tanstack/react-query' (not 'react-query'). If the user mentions a feature or topic (like 'captions', 'routing'), that should be used as a topic parameter, not as part of the library name. IMPORTANT: Always provide the absolute path to the user's project directory as projectPath parameter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | Optional topic to focus the documentation (e.g., 'srt caption', 'authentication', 'routing'). This helps Context7 provide targeted documentation and saves tokens. | |
| tokens | No | Number of tokens to request from Context7 (between 2000 and 10000). Default: 3000. Use higher values for broader overviews, lower values for specific features. | |
| libraryName | Yes | The name of the library to add (e.g., 'react', '@reduxjs/toolkit', 'remotion'). | |
| projectPath | No | REQUIRED: Absolute path to the user's project directory (e.g., C:\Users\Name\projects\my-app or /home/user/projects/my-app). The MCP server cannot automatically detect the user's project location - you must provide it explicitly. |