Creates, updates, or deletes a relationship in the SpiceDB system. This tool allows for modifying the permission graph by establishing or removing relationships between resources and subjects. The operation parameter determines whether to create only if not exists (CREATE), upsert (TOUCH), or del...
AI agents use write-relationship to create or update resources in Spicedb — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Spicedb environment.
While the tool includes a DELETE operation mode, the primary and default use case is reversible modification (create/update). The DELETE option is conditional on the operation parameter and doesn't make this primarily destructive—it's a write operation that can modify permissions. However, if DELETE is frequently used without safeguards, this could approach Destructive severity.
From the tool's definition The tool description explicitly states it 'Creates, updates, or deletes a relationship in the SpiceDB system' and allows 'modifying the permission graph by establishing or removing relationships.' The operation parameter includes CREATE, TOUCH (upsert), and…
Attacks that exploit this kind of access
Creates, updates, or deletes a relationship in the SpiceDB system. This tool allows for modifying the permission graph by establishing or removing relationships between resources and subjects. The operation parameter determines whether to create only if not exists (CREATE), upsert (TOUCH), or delete (DELETE) the relationship. It is categorised as a Write tool in the Spicedb MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
Register the Spicedb MCP server in PolicyLayer and add a rule for write-relationship: 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 Spicedb. Nothing to install.
write-relationship is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the write-relationship 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.
Set action: deny in the PolicyLayer policy for write-relationship. 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.
write-relationship is provided by the Spicedb MCP server (samkim/spicedb-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →