---
title: ToolRouter — Agent Use Case Guide
description: Step-by-step guide for completing a task with a specific AI agent using ToolRouter.
url: https://toolrouter.com/tools/diagram-generator/use-cases/create-entity-relationship-diagrams/claude
---
# How to Create ER Diagrams with Claude

Claude builds ER diagrams through an iterative data modeling conversation. Describe your entities and relationships, get the diagram, then refine by adding fields, adjusting cardinality, or including junction tables through follow-up questions. The conversation naturally covers edge cases in your data model that a single description would miss.

## Setup

claude mcp add toolrouter -- npx -y toolrouter-mcp

## Steps

1. Connect ToolRouter: claude mcp add toolrouter -- npx -y toolrouter-mcp
2. Ask Claude: "Create an ER diagram using diagram-generator" and describe your data model
3. Claude generates the diagram with tables, columns, and relationship lines
4. Download the diagram for your database documentation

## Example Prompt

```
Create an ER diagram for an e-commerce database: Users have many Orders, each Order has many OrderItems, OrderItems reference Products, Products belong to Categories. Show the key columns and foreign keys.
```

## Tips

- Specify cardinality explicitly -- "one user has many orders" vs "users and orders have a many-to-many relationship"
- Ask Claude to include data types and primary/foreign key indicators
