summaryrefslogtreecommitdiff
path: root/servers/gitlab_glab/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'servers/gitlab_glab/README.md')
-rw-r--r--servers/gitlab_glab/README.md13
1 files changed, 11 insertions, 2 deletions
diff --git a/servers/gitlab_glab/README.md b/servers/gitlab_glab/README.md
index 19b6cd7..cef74c2 100644
--- a/servers/gitlab_glab/README.md
+++ b/servers/gitlab_glab/README.md
@@ -151,7 +151,7 @@ The function returns a dictionary containing:
### get_mr_diff
-Get the diff for a merge request using `glab mr diff`.
+Get the diff for a merge request using `glab mr diff` with optional content filtering.
```python
result = use_mcp_tool(
@@ -164,12 +164,14 @@ result = use_mcp_tool(
"color": "never", # Use color in diff output: always, never, auto (default: never)
"raw": True, # Use raw diff format (default: False)
"repo": "group/project", # Project path with namespace
- "max_size_kb": 100 # Maximum size in KB before saving to temp file (default: 100)
+ "max_size_kb": 100, # Maximum size in KB before saving to temp file (default: 100)
+ "filter_extensions": [".lock", ".log"] # File extensions to exclude from diff (default: [".lock", ".log"])
}
)
```
The function returns a dictionary containing:
+
- `diff`: The diff content (if small enough)
- `size_kb`: The size of the diff in KB
- `temp_file_path`: Path to temporary file if diff is too large (None otherwise)
@@ -178,6 +180,13 @@ The function returns a dictionary containing:
- `message`: Human-readable message about temp file creation (if applicable)
- `error`: Error message if the operation failed
+**Content Filtering**: By default, this tool filters out changes to files with `.lock` and `.log` extensions to reduce noise in diffs. This includes:
+
+- Lock files: `package-lock.json`, `yarn.lock`, `composer.lock`, etc.
+- Log files: `debug.log`, `error.log`, `application.log`, etc.
+
+You can customize the filtering by providing a `filter_extensions` list, or disable filtering entirely by passing an empty list `[]`.
+
**Note on Large Diffs**: To prevent overwhelming LLMs with extremely large diffs, this tool automatically saves diffs larger than `max_size_kb` (default: 100KB) to a temporary file and returns the file path instead of the content. This allows you to process large merge request diffs without hitting token limits.
### run_ci_pipeline