{ "description": "Query and modify your Logseq knowledge graph via the built-in MCP server.", "prompt": "## logseq\n\nQuery and modify your Logseq DB graph via the built-in MCP server.\n\n**Args**: `command` (required), plus any tool parameters as top-level keys.\n\n### Available commands\n\n```\nlogseq(command=\"listPages\")\nlogseq(command=\"listPages\", expand=true)\nlogseq(command=\"getPage\", pageName=\"My Page\")\nlogseq(command=\"searchBlocks\", searchTerm=\"keyword\")\nlogseq(command=\"listTags\")\nlogseq(command=\"listTags\", expand=true)\nlogseq(command=\"listProperties\")\nlogseq(command=\"listProperties\", expand=true)\nlogseq(command=\"upsertNodes\", operations=[...], dry-run=true)\n```\n\n### upsertNodes operations format\n\nEach operation is an object with:\n- `operation`: \"add\" or \"edit\"\n- `entityType`: \"block\", \"page\", \"tag\", or \"property\"\n- `id`: UUID string (required for edit), temp string for add (if referenced later)\n- `data`: object with fields to set:\n - `title`: page/tag/property name or block content\n - `page-id`: page UUID (required when adding a block)\n - `tags`: list of tag UUIDs\n\nExample: add a block to a page:\n```\nlogseq(command=\"upsertNodes\", operations=[{\"operation\":\"add\",\"entityType\":\"block\",\"id\":null,\"data\":{\"page-id\":\"\",\"title\":\"New block text\"}}])\n```\n\n- Use `dry-run=true` to validate without committing.\n- Before creating a page/tag/property, check if it exists with `getPage`.\n- Every key except `command` becomes a `--key=value` flag.", "args": { "type": "object", "required": ["command"], "properties": { "command": { "type": "string", "description": "Logseq MCP tool name (listPages, getPage, searchBlocks, listTags, listProperties, upsertNodes)" } }, "additionalProperties": true }, "tier": "hot", "readOnly": false }