list_diagrams
List diagrams across a workspace before creating a new one to avoid duplicates; search titles, descriptions, or code, and sort by creation, update, title, or relevance.
Instructions
List diagrams in the configured Space (every folder, newest first by default). Use this BEFORE create_diagram to check whether a diagram with the target purpose already exists — if it does, prefer update_diagram over creating a duplicate. Filter with q (case-insensitive substring on title, description, or code) when looking for a named diagram (e.g. q: 'schema' or q: 'infra'). Sort with sort: 'updated' to find the most recently changed diagrams, or sort: 'relevance' when q is set so a title hit ranks above a description or code hit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Case-insensitive substring search on title, description, or code. Use when looking for a named diagram (e.g. 'schema', 'infra'). | |
| sort | No | Sort order. 'created' (default) = newest-first by creation; 'updated' = newest-first by last edit (use this to find the most recently changed diagram); 'title' = alphabetical; 'relevance' = title hits first, then description, then code (only when `q` is set; otherwise same as 'updated'). | |
| owner | No | Filter to diagrams created by this user (Clerk user id, e.g. 'user_abc'). Rarely needed; omit unless the caller already has the user id. | |
| space | No | Which workspace to act in: its id, its slug, or its exact name (case-insensitive). Omit to use this token's default workspace. Call list_spaces to see what this token can reach. A name that matches more than one workspace is refused — pass the id or slug instead. | |
| folderId | No | Optional UUID — narrow to diagrams in this folder. Use list_folders to look up folder ids. Omit to see every folder (the default). |