Skip to content

Commit 6f36f97

Browse files
committed
Updated information about variables
1 parent c41b11f commit 6f36f97

File tree

8 files changed

+256
-148
lines changed

8 files changed

+256
-148
lines changed

docs/.vitepress/config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default withMermaid({
3434
{text: 'Installation', link: '/getting-started'},
3535
{text: 'Configuration', link: '/configuration'},
3636
{text: 'Command Reference', link: '/getting-started/command-reference'},
37-
{text: 'Environment Variables', link: '/environment-variables'},
37+
{text: 'Variables in Configuration', link: '/variables'},
3838
{text: 'IDE Integration', link: '/getting-started/ide-integration'},
3939
{text: 'Logging', link: '/advanced/logging'}
4040
]

docs/configuration.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,9 @@ documents:
209209
| `file` | Imports configuration from a local file | `path` |
210210
| `url` | Imports configuration (`prompts` section) from a remote URL | `url` |
211211

212-
## Using Environment Variables
212+
## Using variables in configuration
213213

214-
Context Generator supports configuration via environment variables, which provides a flexible way to override settings
215-
without modifying your main configuration files.
214+
Context Generator supports various types of variables throughout your configuration files, including environment
215+
variables, predefined system variables, and custom configuration variables.
216216

217-
### Setting Up
218-
219-
1. Create a `.env` file in your project root directory
220-
2. Add configuration variables using `KEY=VALUE` format
217+
Read more about [variables](./variables.md) in the documentation.

docs/environment-variables.md

Lines changed: 0 additions & 135 deletions
This file was deleted.

docs/mcp/tools.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# MCP Server Tools
2+
3+
The MCP Server provides several tools that can be enabled or disabled through environment variables. Below is a
4+
description of each tool.
5+
6+
## Environment Variables Configuration
7+
8+
### General Configuration
9+
10+
- `MCP_DOCUMENT_NAME_FORMAT`: Controls how documents are named in the system.
11+
- Default: `[{path}] {description}`
12+
- Example: A document might appear as `[src/file.php] Main controller file`
13+
14+
## Available Tool Categories
15+
16+
### File Operations (`MCP_FILE_OPERATIONS=true`)
17+
18+
Master switch for all file operation tools. When set to `false`, all below file tools are disabled regardless of their
19+
individual settings.
20+
21+
| Tool Key | Description | Environment Variable | Default |
22+
|--------------------|--------------------------------------------------------------|---------------------------------------------------|------------------------|
23+
| `file-info` | Get information about a file (size, type, modification date) | Always available when file operations are enabled | - |
24+
| `file-read` | Read content from a file | Always available when file operations are enabled | - |
25+
| `file-rename` | Rename a file | Always available when file operations are enabled | - |
26+
| `file-move` | Move a file from one location to another | Always available when file operations are enabled | - |
27+
| `directory-list` | List files and directories in a specified path | `MCP_FILE_DIRECTORIES_LIST` | `true` |
28+
| `file-write` | Create new files or modify existing ones | `MCP_FILE_WRITE` | `true` |
29+
| `file-apply-patch` | Apply git-style patches to files | `MCP_FILE_APPLY_PATCH` | `false` (experimental) |
30+
31+
### Context Operations (`MCP_CONTEXT_OPERATIONS=true`)
32+
33+
Tools for working with context information.
34+
35+
| Tool Key | Description | Environment Variable | Default |
36+
|-------------------|---------------------------------------------------------|------------------------------------------------------|---------|
37+
| `context-request` | Request context information using filters and modifiers | Always available when context operations are enabled | - |
38+
| `context-get` | Get a specific context document | Always available when context operations are enabled | - |
39+
| `context` | List all available contexts | Always available when context operations are enabled | - |
40+
41+
### Prompt Operations (`MCP_PROMPT_OPERATIONS=false`)
42+
43+
Experimental tools for working with prompts.
44+
45+
| Tool Key | Description | Environment Variable | Default |
46+
|----------------|----------------------------|-------------------------|------------------------|
47+
| `get-prompt` | Retrieve a specific prompt | `MCP_PROMPT_OPERATIONS` | `false` (experimental) |
48+
| `list-prompts` | List all available prompts | `MCP_PROMPT_OPERATIONS` | `false` (experimental) |
49+
50+
### Always Available Tools
51+
52+
These tools are always available regardless of environment configuration:
53+
54+
| Tool Key | Description |
55+
|-------------------------|--------------------------------------------------|
56+
| `project-structure` | Get information about the project structure |
57+
| `filesystem-operations` | Perform basic filesystem queries |
58+
| `list-resources` | List all available resources |
59+
| `json-schema` | Get JSON schema for various entities |
60+
| `document-content` | Get document content by ID |
61+
| `list-tools` | List all available tools (what you're using now) |
62+
63+
## Configuration Examples
64+
65+
### Developer Mode (All Features)
66+
67+
```
68+
MCP_FILE_OPERATIONS=true
69+
MCP_FILE_WRITE=true
70+
MCP_FILE_APPLY_PATCH=true
71+
MCP_FILE_DIRECTORIES_LIST=true
72+
MCP_CONTEXT_OPERATIONS=true
73+
MCP_PROMPT_OPERATIONS=true
74+
```
75+
76+
### Read-Only Mode (Safe for Production)
77+
78+
```
79+
MCP_FILE_OPERATIONS=true
80+
MCP_FILE_WRITE=false
81+
MCP_FILE_APPLY_PATCH=false
82+
MCP_FILE_DIRECTORIES_LIST=true
83+
MCP_CONTEXT_OPERATIONS=true
84+
MCP_PROMPT_OPERATIONS=false
85+
```
86+
87+
### Minimal Mode
88+
89+
```
90+
MCP_FILE_OPERATIONS=true
91+
MCP_FILE_WRITE=false
92+
MCP_FILE_APPLY_PATCH=false
93+
MCP_FILE_DIRECTORIES_LIST=true
94+
MCP_CONTEXT_OPERATIONS=false
95+
MCP_PROMPT_OPERATIONS=false
96+
```
97+
98+
This documentation provides users with a clear understanding of available tools, their purpose, and how to enable or
99+
disable them without requiring knowledge of the underlying class implementation.

docs/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ name from the `src/Models` directory.
6161
- Explore different source types like [GitHub](/sources/github-source), [Git Diff](/sources/git-diff-source),
6262
or [URL](/sources/url-source)
6363
- Apply [Modifiers](/modifiers) to transform your content (like extracting PHP signatures)
64-
- Discover how to use [Environment Variables](/environment-variables) in your config
64+
- Discover how to use [Variables](/variables) in your config
6565
- Use [IDE Integration](/getting-started/ide-integration) for autocompletion and validation
6666

6767
## 4. Build the Context

docs/sources/text-source.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ This document provides an overview of the API.
7171
----------------------------------------------------------
7272
```
7373

74-
## Environment variables
74+
## Using variables in configuration
75+
76+
Context Generator supports various types of variables throughout your configuration files, including environment
77+
variables, predefined system variables, and custom configuration variables.
78+
79+
Read more about [variables](./variables.md) in the documentation.
7580

7681
```yaml
7782
documents:
@@ -82,7 +87,7 @@ documents:
8287
description: API Configuration
8388
content: |
8489
# ${ENV_NAME} Environment
85-
90+
8691
Base URL: https://api.${ENV_NAME}.example.com
8792
8893
API Key: Please use the ${ENV_NAME}_API_KEY environment variable

docs/sources/url-source.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# URL Source
22

3-
Fetch content from websites with
3+
Fetch content from websites with
4+
45
- optional CSS selector support
56
- custom headers
67
- environment variable support
@@ -31,4 +32,11 @@ documents:
3132
| `urls` | array | required | URLs to fetch content from (support env variables) |
3233
| `selector` | string | `null` | CSS selector to extract specific content (null for full page) |
3334
| `headers` | object | `{}` | Custom headers to include in the request (support env variables) |
34-
| `tags` | array | [] | List of tags for this source |
35+
| `tags` | array | [] | List of tags for this source |
36+
37+
## Using variables in configuration
38+
39+
Context Generator supports various types of variables throughout your configuration files, including environment
40+
variables, predefined system variables, and custom configuration variables.
41+
42+
Read more about [variables](./variables.md) in the documentation.

0 commit comments

Comments
 (0)