# list_workspace_directory

列出工作区中某个目录的内容。 返回文件和子目录列表（名称、绝对路径、大小、修改时间）。 自动跳过隐藏文件和 node_modules 等常见忽略目录。 路径必须在已绑定的工作区范围内。

Agent View of the PolicyLayer registry record for `list_workspace_directory`. HTML page: https://policylayer.com/tools/deepractice-promptx/list-workspace-directory

## Facts

- Tool: `list_workspace_directory`
- Server: PromptX (`deepractice/promptx`) — https://policylayer.com/tools/deepractice-promptx.md
- Homepage: https://github.com/Deepractice/PromptX
- Risk category: Read (Low risk)
- Registry record: grade F, 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": "list_workspace_directory",
    "arguments": {}
  }
}
```

## Why list_workspace_directory is rated Low

The tool performs a read-only directory listing operation. It retrieves metadata about files and directories within a workspace but does not create, modify, delete, or execute anything. The automatic skipping of hidden files and node_modules indicates a safe browsing mechanism. Confidence is high because the description clearly indicates data retrieval without modification capabilities.

From the tool's own definition: "Tool description states it 'lists contents of a directory' (列出工作区中某个目录的内容) returning 'file and subdirectory list with names, absolute paths, sizes, modification times.' This is a query/retrieval operation with no side effects."

## Use case

AI agents call list_workspace_directory to retrieve information from PromptX 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 PromptX:

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

## Other tools on PromptX (13)

- `delete_workspace_item` — Destructive — https://policylayer.com/tools/deepractice-promptx/delete-workspace-item.md
- `toolx` — Execute — https://policylayer.com/tools/deepractice-promptx/toolx.md
- `learn` — Read — https://policylayer.com/tools/deepractice-promptx/learn.md
- `list_workspaces` — Read — https://policylayer.com/tools/deepractice-promptx/list-workspaces.md
- `list_xlsx_sheets` — Read — https://policylayer.com/tools/deepractice-promptx/list-xlsx-sheets.md
- `read_docx` — Read — https://policylayer.com/tools/deepractice-promptx/read-docx.md
- `read_pdf` — Read — https://policylayer.com/tools/deepractice-promptx/read-pdf.md
- `read_pptx` — Read — https://policylayer.com/tools/deepractice-promptx/read-pptx.md
- `read_workspace_file` — Read — https://policylayer.com/tools/deepractice-promptx/read-workspace-file.md
- `read_xlsx` — Read — https://policylayer.com/tools/deepractice-promptx/read-xlsx.md
- `create_workspace_directory` — Write — https://policylayer.com/tools/deepractice-promptx/create-workspace-directory.md
- `project` — Write — https://policylayer.com/tools/deepractice-promptx/project.md
- `write_workspace_file` — Write — https://policylayer.com/tools/deepractice-promptx/write-workspace-file.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=deepractice-promptx · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/deepractice-promptx
