set_workspace

Set the workspace root so relative paths resolve correctly.

Server Code Quality javier-morenosa/code-quality-mcp
Category Write
Risk class Medium
Parameters 00 required

What set_workspace does on Code Quality

AI agents use set_workspace to create or update resources in Code Quality — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Code Quality environment.

Why set_workspace needs a policy

Setting a workspace root is a reversible configuration change that does not delete data or execute arbitrary code. It's a Write operation because it modifies internal state. Severity is low because the blast radius is minimal—it only affects path resolution for subsequent analysis operations and can be easily changed back. This is a configuration setting rather than a destructive or executable operation.

From the tool's definition The tool "set_workspace" modifies configuration state by setting a workspace root parameter, which affects how subsequent operations resolve relative paths. This is a state-modifying operation that changes tool behavior.

Risk signalsAdmin/system-level operation

Questions about set_workspace

What does the set_workspace tool do? +

Set the workspace root so relative paths resolve correctly. It is categorised as a Write tool in the Code Quality MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

How do I enforce a policy on set_workspace? +

Register the Code Quality MCP server in PolicyLayer and add a rule for set_workspace: 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 Quality. Nothing to install.

What risk level is set_workspace? +

set_workspace is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit set_workspace? +

Yes. Add a rate_limit block to the set_workspace 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 set_workspace completely? +

Set action: deny in the PolicyLayer policy for set_workspace. 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 set_workspace? +

set_workspace is provided by the Code Quality MCP server (javier-morenosa/code-quality-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// THE FULL RECORD

set_workspace is one line of Code Quality'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.