# get_project_files

Gets files and directories in a project path. Use empty path for root directory

Agent View of the PolicyLayer registry record for `get_project_files`. HTML page: https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-project-files

## Facts

- Tool: `get_project_files`
- Server: GitLab MCP Server (`ahmedbhl/mcp-server-gitlab`) — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab.md
- Homepage: https://github.com/ahmedbhl/mcp-server-gitlab
- Risk category: Read (Low risk)
- Registry record: grade B, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_project_files",
    "arguments": {}
  }
}
```

## Why get_project_files is rated Low

This tool queries and retrieves the file/directory structure of a GitLab project without creating, modifying, deleting, or executing anything. It is a straightforward read operation with minimal security impact—the blast radius is limited to potential information disclosure about project structure, which is typically accessible to authorized users anyway.

From the tool's own definition: "Tool name 'get_project_files' and description 'Gets files and directories in a project path' indicate a retrieval operation with no modification or side effects."

Risk signals: Admin/system-level operation

## Use case

AI agents call get_project_files to retrieve information from GitLab MCP Server without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches GitLab MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "get_project_files": {}
  }
}
```

## Other tools on GitLab MCP Server (18)

- `compare_branches` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/compare-branches.md
- `get_commit_details` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-commit-details.md
- `get_commit_diff` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-commit-diff.md
- `get_file_content` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-file-content.md
- `get_file_history` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-file-history.md
- `get_my_issues` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-my-issues.md
- `get_my_merge_requests` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-my-merge-requests.md
- `get_my_projects` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-my-projects.md
- `get_project_branches` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-project-branches.md
- `get_project_commits` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-project-commits.md
- `get_project_info` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-project-info.md
- `get_project_issues` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-project-issues.md
- `get_project_merge_requests` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-project-merge-requests.md
- `get_project_pipelines` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-project-pipelines.md
- `get_user_info` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/get-user-info.md
- `search_files_in_project` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/search-files-in-project.md
- `search_projects` — Read — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/search-projects.md
- `create_issue` — Write — https://policylayer.com/tools/ahmedbhl-mcp-server-gitlab/create-issue.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=ahmedbhl-mcp-server-gitlab · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/ahmedbhl-mcp-server-gitlab
