list_directory_contents

Lists the files and subdirectories in a specific path. Useful for exploring the project structure.

Server Code Context Manager theraaz/code-context-manager-mcp
Category Read
Risk class Low
Parameters 00 required

What list_directory_contents does on Code Context Manager

AI agents call list_directory_contents to retrieve information from Code Context Manager without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

Why list_directory_contents needs a policy

This tool retrieves and queries directory structure information with no side effects or ability to modify, execute, or delete data. It falls squarely into the Read category as a passive exploration capability. The low severity reflects minimal blast radius if misused—an agent could enumerate sensitive paths but cannot access file contents, execute code, or alter the filesystem.

From the tool's definition Tool name 'list_directory_contents' and description 'Lists the files and subdirectories in a specific path' indicate a read-only operation that retrieves filesystem metadata without modification, deletion, or execution.

Questions about list_directory_contents

What does the list_directory_contents tool do? +

Lists the files and subdirectories in a specific path. Useful for exploring the project structure. It is categorised as a Read tool in the Code Context Manager MCP Server, which means it retrieves data without modifying state.

How do I enforce a policy on list_directory_contents? +

Register the Code Context Manager MCP server in PolicyLayer and add a rule for list_directory_contents: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Code Context Manager. Nothing to install.

What risk level is list_directory_contents? +

list_directory_contents is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit list_directory_contents? +

Yes. Add a rate_limit block to the list_directory_contents rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block list_directory_contents completely? +

Set action: deny in the PolicyLayer policy for list_directory_contents. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides list_directory_contents? +

list_directory_contents is provided by the Code Context Manager MCP server (theraaz/code-context-manager-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// THE FULL RECORD

list_directory_contents is one line of Code Context Manager's registry record.

The record carries the whole server: verified identity, auth posture, risk grade, every tool classified, recommended policy — re-checked continuously.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.