Skip to content

Commit 7488f5c

Browse files
committed
Expand MCP tools documentation:
- Add "Project Operations" section with examples for listing and switching projects. - Update "Docs Tools" and related tool parameters for improved clarity and structure. - Revise "File Operations" section by enhancing descriptions and removing outdated tools. - Add cross-links to related sections for better navigation.
1 parent 1f6ee01 commit 7488f5c

File tree

2 files changed

+62
-20
lines changed

2 files changed

+62
-20
lines changed

docs/mcp/projects.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,8 @@ In your Claude app configuration, set up the MCP Server without specifying a pro
168168

169169
This configuration allows the MCP server to automatically use the currently active project from your project registry
170170
without requiring a specific path at startup time.
171+
172+
## MCP Tools for Project Management
173+
174+
In addition to the command-line interface, CTX provides MCP tools that AI assistants can use to manage projects
175+
programmatically. Read more about [MCP Tools](./tools.md#project-operations-mcp_project_operationstrue).

docs/mcp/tools.md

Lines changed: 57 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,24 @@ The tools system can be configured using environment variables to enable or disa
1717
| `MCP_TOOL_COMMAND_EXECUTION` | Enable/disable command execution | `true` |
1818
| `MCP_FILE_OPERATIONS` | Master switch for all file operation tools | `true` |
1919
| `MCP_FILE_WRITE` | Enable/disable file write operations | `true` |
20-
| `MCP_FILE_APPLY_PATCH` | Enable/disable applying patches to files | `false` |
2120
| `MCP_FILE_DIRECTORIES_LIST` | Enable/disable directory listing | `true` |
2221
| `MCP_DOCS_TOOLS_ENABLED` | Enable/disable Context7 documentation tools | `true` |
22+
| `MCP_PROJECT_OPERATIONS` | Enable/disable project operations | `true` |
2323

2424
## Available Tool Categories
2525

26-
### File Operations (`MCP_FILE_OPERATIONS=true`)
26+
### File Operations
2727

2828
Master switch for all file operation tools. When set to `false`, all below file tools are disabled regardless of their
2929
individual settings.
3030

31-
| Tool Key | Description | Environment Variable | Default |
32-
|--------------------|--------------------------------------------------------------|---------------------------------------------------|------------------------|
33-
| `file-info` | Get information about a file (size, type, modification date) | Always available when file operations are enabled | - |
34-
| `file-read` | Read content from a file | Always available when file operations are enabled | - |
35-
| `file-rename` | Rename a file | Always available when file operations are enabled | - |
36-
| `file-move` | Move a file from one location to another | Always available when file operations are enabled | - |
37-
| `directory-list` | List files and directories in a specified path | `MCP_FILE_DIRECTORIES_LIST` | `true` |
38-
| `file-write` | Create new files or modify existing ones | `MCP_FILE_WRITE` | `true` |
39-
| `file-apply-patch` | Apply git-style patches to files | `MCP_FILE_APPLY_PATCH` | `false` (experimental) |
31+
| Tool Key | Description | Environment Variable | Default |
32+
|------------------|------------------------------------------------|---------------------------------------------------|---------|
33+
| `file-read` | Read content from a file | Always available when file operations are enabled | - |
34+
| `directory-list` | List files and directories in a specified path | `MCP_FILE_DIRECTORIES_LIST` | `true` |
35+
| `file-write` | Create new files or modify existing ones | `MCP_FILE_WRITE` | `true` |
4036

41-
### Context Operations (`MCP_CONTEXT_OPERATIONS=true`)
37+
### Context Operations
4238

4339
Tools for working with context information.
4440

@@ -48,7 +44,7 @@ Tools for working with context information.
4844
| `context-get` | Get a specific context document | Always available when context operations are enabled | - |
4945
| `context` | List all available contexts | Always available when context operations are enabled | - |
5046

51-
### Prompt Operations (`MCP_PROMPT_OPERATIONS=false`)
47+
### Prompt Operations
5248

5349
Experimental tools for working with prompts.
5450

@@ -57,16 +53,57 @@ Experimental tools for working with prompts.
5753
| `prompt-get` | Retrieve a specific prompt | `MCP_PROMPT_OPERATIONS` | `false` (experimental) |
5854
| `prompts-list` | List all available prompts | `MCP_PROMPT_OPERATIONS` | `false` (experimental) |
5955

60-
### Docs Tools (`MCP_DOCS_TOOLS_ENABLED`)
56+
### Docs Tools
6157

62-
Search for documentation libraries available on the Context7 service.
58+
Tools for searching and retrieving documentation from the Context7 service.
6359

64-
#### Parameters
60+
| Tool Key | Description | Environment Variable | Default |
61+
|------------------|----------------------------------------------------------|--------------------------|---------|
62+
| `library-search` | Search for available documentation libraries in Context7 | `MCP_DOCS_TOOLS_ENABLED` | `true` |
63+
| `find-docs` | Find and retrieve documentation for a specific library | `MCP_DOCS_TOOLS_ENABLED` | `true` |
6564

66-
| Parameter | Type | Required | Default | Description |
67-
|-----------|---------|----------|---------|----------------------------------------------|
68-
| `query` | string | Yes | - | Search query to find documentation libraries |
69-
| `limit` | integer | No | 5 | Maximum number of results to return |
65+
#### library-search Tool
66+
67+
Search for available documentation libraries in the Context7 service.
68+
69+
**Parameters:**
70+
71+
| Parameter | Type | Required | Default | Description |
72+
|--------------|---------|----------|---------|----------------------------------|
73+
| `query` | string | Yes | - | Search query to find libraries |
74+
| `maxResults` | integer | No | 5 | Maximum number of results (1-10) |
75+
76+
**Response:** Returns a JSON array of matching libraries with their IDs, names, and descriptions.
77+
78+
#### find-docs Tool
79+
80+
Retrieve documentation content for a specific library from Context7.
81+
82+
**Parameters:**
83+
84+
| Parameter | Type | Required | Default | Description |
85+
|-----------|---------|----------|---------|-----------------------------------------------|
86+
| `id` | string | Yes | - | Library ID (obtained from library-search) |
87+
| `tokens` | integer | No | - | Maximum number of tokens to retrieve |
88+
| `topic` | string | No | - | Specific topic within the library to focus on |
89+
90+
**Response:** Returns the documentation content as text, filtered by the specified topic and token limit if provided.
91+
92+
### Project Operations
93+
94+
Tools for managing and switching between different project contexts.
95+
96+
| Tool Key | Description | Environment Variable | Default |
97+
|------------------|---------------------------------------------------------------|--------------------------|---------|
98+
| `projects-list` | List all registered projects with their configuration details | `MCP_PROJECT_OPERATIONS` | `true` |
99+
| `project-switch` | Switch to a different project by path or alias | `MCP_PROJECT_OPERATIONS` | `true` |
100+
101+
- Projects must be registered using the `project:add` command before they can be switched to
102+
- The tool validates project existence before attempting to switch
103+
- Provides helpful error messages with available options when a project is not found
104+
- Supports both absolute and relative paths, with automatic path normalization
105+
106+
> **Note:** Read more about project management in the [Project Management](./projects.md) section.
70107
71108
### Always Available Tools
72109

0 commit comments

Comments
 (0)