Skip to main content
Products -> ERDPricingDocsBlogSign in한국어Start with ERD

MCP Tool Reference

AI-ERD's MCP server defines 60 tools. The names below are what the server publishes — what you send in a tools/call.

Your MCP client adds its own prefix on top, built from the server name you registered. Register it as ai-erd and list_documents shows up in your assistant as mcp__ai-erd__list_documents. Only the client-side prefix changes; the names on this page do not.

The catalog is split into four groups:

GroupCountScope
Generic backbone38Workspaces, projects, folders, documents, versions, sharing, attachments, search, identity
ERD10ERD content: read tables, refs, table groups, enums; one batch apply; auto layout
Diagram10Diagram nodes, edges, groups; one batch apply; LLM request handoff
Markdown2Markdown append and AI generation helpers

Groups are opened gradually, so your server's tools/list may not show every group yet. tools/list is the machine-readable source for the exact tools and JSON Schemas available to you; this page summarizes the same catalog in a prompt-friendly form.


Naming Rules​

  • Tool names are plain snake_case — no server-side prefix.
  • Document types are erd, diagram, markdown, and openapi. Which types you can create through MCP is listed in the type enum of create_documents.
  • Top-level groups are called workspaces. Use workspaceUuid / workspaceId; do not use groupUuid for workspaces.
  • Documents of every type are created, listed, updated, and deleted with the generic document tools: create_documents, list_documents, get_document, update_documents, delete_documents.
  • ERD content tools use documentUuid for the parent ERD document.
  • Diagram content tools use diagramUuid for the parent diagram document.
  • Public sharing is unified: enable_shares(targetType=project|folder|document, targetUuids) and disable_shares(...).

Generic Backbone Tools (38)​

ToolMain input shapePurpose
list_workspacesnoneList workspaces visible to the user
get_workspaceuuidGet one workspace
create_workspacesitems[]Create workspaces
update_workspacesitems[].uuidRename/update workspaces
delete_workspacesuuids[]Archive workspaces
unarchive_workspacesuuids[]Restore archived workspaces
list_projectsworkspaceUuid?List projects
get_projectuuidGet one project
create_projectsitems[].workspaceUuid, items[].nameCreate projects
update_projectsitems[].uuidUpdate projects
delete_projectsuuids[]Archive projects
unarchive_projectsuuids[]Restore archived projects
list_foldersprojectUuid?, parentUuid?List folders
create_foldersitems[].projectUuid, items[].nameCreate folders
update_foldersitems[].uuidRename folders
move_foldersitems[].uuid, items[].parentUuid?Move folders
delete_foldersuuids[]Archive folders
unarchive_foldersuuids[]Restore archived folders
list_documentsprojectUuid?, folderUuid?, type?, q?, limit?List or search documents
get_documentuuidGet one document
create_documentsitems[].projectUuid, items[].type, items[].title, items[].typePayload?Create ERD, diagram, Markdown, or OpenAPI documents
update_documentsitems[].uuid, items[].title?, items[].typePayload?Update document metadata or type-specific payload
move_documentsitems[].uuid, items[].folderUuid?Move documents
delete_documentsuuids[]Archive documents
unarchive_documentsuuids[]Restore archived documents
list_trashoptional filtersList archived resources
list_versionsdocumentUuidList document versions
get_versiondocumentUuid, versionGet a version snapshot
restore_versionsitems[].documentUuid, items[].versionRestore previous versions
enable_sharestargetType, targetUuids[]Enable public sharing for projects, folders, or documents
disable_sharestargetType, targetUuids[]Disable public sharing
list_attachmentsprojectUuid?, documentUuid?List attachments
get_attachmentuuidGet attachment metadata
upload_attachmentsitems[]Upload attachment files
delete_attachmentsuuids[]Delete/archive attachments
request_upload_tokenpurpose, scopeJson?, maxBytes?, ttlSeconds?Issue an upload or one-shot MCP call token
search_documentsq, type?, projectUuid?, limit?, offset?Full-text search over documents
identity_get_selfnoneReturn the signed-in user

Document CUD Schema​

Use the plural document CUD tools. Each items[] element carries a document type and an optional typePayload.

{
"items": [
{
"projectUuid": "<project-uuid>",
"folderUuid": "<optional-folder-uuid>",
"type": "erd",
"title": "Production schema",
"typePayload": {}
}
]
}

Type-specific payloads:

TypetypePayload
erdUsually empty on create; ERD content is managed with erd_* tools
diagramdiagramSource?, sourceLanguage?, edgeStyle?, isModule?, metadata?
markdownbody
openapicontent — the OpenAPI / Swagger source (YAML or JSON), stored as written

For large bodies, issue request_upload_token with purpose=document.create, document.update, or document.append and upload the body directly instead of passing it through a chat prompt.


ERD Tools (10)​

ERD document lifecycle is generic. Use list_documents(type=erd) to find an ERD document, then pass its UUID as documentUuid to these tools.

ToolMain input shapePurpose
erd_apply_changesdocumentUuid, description, operations[], arrangeNewTables?The only create/update/delete path for ERD content
erd_arrange_tablesdocumentUuid, full?Auto-arrange new tables, or the whole ERD with full=true
erd_list_tablesdocumentUuidList tables
erd_get_tabledocumentUuid, tableUuidGet one table with its columns and indexes
erd_list_refsdocumentUuidList relationships
erd_get_refdocumentUuid, refUuidGet one relationship
erd_list_table_groupsdocumentUuidList table groups
erd_get_table_groupdocumentUuid, tableGroupUuidGet one table group
erd_list_enumsdocumentUuidList enums
erd_get_enumdocumentUuid, enumUuidGet one enum

erd_apply_changes.operations[] items are {op: create|update|delete, type, uuid?, data?}:

  • type is one of table, column, index, index_column, ref, ref_column, enum, enum_value, table_group, table_group_table, table_group_note, filter, note.
  • data field names are snake_case (table_uuid, is_pk, from_table_uuid, …).
  • On create, you may supply your own data.uuid; later operations in the same batch can reference it. uuid on the operation itself is only the update/delete target.
  • ref.relationship is >, <, or -. Foreign-key columns are mapped with explicit ref_column operations. Enum values are separate enum_value operations.

Diagram Tools (10)​

Diagram document lifecycle is generic. Use create_documents(type=diagram) or list_documents(type=diagram) for the document itself, then pass its UUID as diagramUuid.

ToolMain input shapePurpose
diagram_apply_changesdiagramUuid, description, nodes?, edges?, groups?The only create/update/delete path for nodes, edges, and groups
diagram_list_nodesdiagramUuidList nodes
diagram_get_nodenodeUuidGet one node
diagram_list_edgesdiagramUuidList edges
diagram_get_edgeedgeUuidGet one edge
diagram_list_groupsdiagramUuidList groups
diagram_get_groupgroupUuidGet one group
diagram_get_pending_llm_requestsnoneList pending LLM handoff requests
diagram_submit_llm_resultuuid, result, token countsSubmit an LLM handoff result
diagram_update_llm_request_statusuuid, status=FAILED, errorMessage?Mark an LLM handoff request as failed

diagram_apply_changes uses action: create|update|delete on each node, edge, or group item. Node fields include text, shape, x, y, width, height, groupUuid, fillColor, strokeColor, and textColor. Edge fields include fromUuid, toUuid, label, lineStyle, strokeColor, and strokeWidth. Group fields include name, color, parentGroupUuid, width, and height.


Markdown Tools (2)​

Markdown document create/update is generic. Use typePayload.body with create_documents(type=markdown) or update_documents for full-body writes.

ToolMain input shapePurpose
markdown_append_documentdocument append payloadAppend markdown to an existing Markdown document
markdown_generate_documentprompt/project payloadGenerate a Markdown document with AI

CLI command paths mirror the same public surface: documents create, documents update, markdown append-document, and markdown generate-document.


Examples​

Discover ERD documents​

{
"name": "list_documents",
"arguments": {
"type": "erd",
"q": "production schema",
"limit": 10
}
}

Create an ERD document​

{
"name": "create_documents",
"arguments": {
"items": [
{
"projectUuid": "<project-uuid>",
"type": "erd",
"title": "Billing schema"
}
]
}
}

Create tables and a foreign key in one call​

{
"name": "erd_apply_changes",
"arguments": {
"documentUuid": "<erd-document-uuid>",
"description": "Add notifications with a FK to users",
"operations": [
{"op": "create", "type": "table", "data": {"uuid": "tbl_notifications", "name": "notifications"}},
{"op": "create", "type": "column", "data": {"uuid": "col_n_id", "table_uuid": "tbl_notifications", "name": "id", "type": "bigint", "is_pk": true, "is_not_null": true}},
{"op": "create", "type": "column", "data": {"uuid": "col_n_user_id", "table_uuid": "tbl_notifications", "name": "user_id", "type": "bigint", "is_not_null": true}},
{"op": "create", "type": "ref", "data": {"uuid": "ref_n_user", "from_table_uuid": "tbl_notifications", "to_table_uuid": "<users-table-uuid>", "relationship": ">", "on_delete": "CASCADE"}},
{"op": "create", "type": "ref_column", "data": {"ref_uuid": "ref_n_user", "from_column_uuid": "col_n_user_id", "to_column_uuid": "<users-id-column-uuid>"}}
]
}
}

Get existing table and column UUIDs with erd_get_table.

Create a Markdown document​

{
"name": "create_documents",
"arguments": {
"items": [
{
"projectUuid": "<project-uuid>",
"type": "markdown",
"title": "API notes",
"typePayload": {
"body": "# API notes\n\nInitial draft."
}
}
]
}
}

Share a document​

{
"name": "enable_shares",
"arguments": {
"targetType": "document",
"targetUuids": ["<document-uuid>"]
}
}

Error Handling​

Tools return standard JSON-RPC error responses. Common cases:

ErrorCause
401 UnauthorizedToken missing or expired; re-authenticate
403 ForbiddenYour account lacks view or edit access
404 Not FoundWorkspace, project, folder, document, or entity UUID is wrong
409 ConflictConcurrent edit conflict; read current state and retry
429 Too Many RequestsRate limit hit; back off and retry