bricks-mcp-server 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +30 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -33,8 +33,15 @@ if (subcommand === "doctor" || subcommand === "diagnose") {
33
33
  if (process.env.WP_URL) {
34
34
  console.error(`[bricks-mcp] target WP_URL=${process.env.WP_URL} WP_USER=${process.env.WP_USER ?? "?"}`);
35
35
  }
36
- const server = new Server({ name: "bricks-mcp-server", version: "0.8.0" }, { capabilities: { tools: {} } });
36
+ const server = new Server({ name: "bricks-mcp-server", version: "0.9.0" }, { capabilities: { tools: {} } });
37
37
  const tools = [
38
+ {
39
+ name: "bricks_start_here",
40
+ description: "CALL THIS FIRST, once per session, before any other bricks_* tool. Returns everything needed to work on this site safely: site identity, capabilities (dry-run state, ACF, query filters), the content model (post types + taxonomies + ACF fields), a design-system summary, existing templates, and the working rules that prevent the classic Bricks failure modes (write conflicts, wrong template fields, un-indexed filters, clobbered global classes).",
41
+ inputSchema: { type: "object", properties: {}, additionalProperties: false },
42
+ schema: z.object({}),
43
+ handler: async () => wpRequest("/start-here"),
44
+ },
38
45
  {
39
46
  name: "bricks_ping",
40
47
  description: "Verify the WordPress connection and report which site you're connected to (wp_url + site that answered), Bricks + WP version.",
@@ -358,11 +365,33 @@ const tools = [
358
365
  handler: async () => wpRequest("/theme-styles"),
359
366
  },
360
367
  ];
368
+ // MCP tool annotations (readOnlyHint / destructiveHint / idempotentHint) so
369
+ // clients can calibrate approval prompts. "Destructive" here means the write
370
+ // overwrites or removes existing data (even though the plugin snapshots first);
371
+ // additive creates are non-destructive.
372
+ const TOOL_ANNOTATIONS = {
373
+ bricks_start_here: { readOnlyHint: true },
374
+ bricks_ping: { readOnlyHint: true },
375
+ bricks_get_schema: { readOnlyHint: true },
376
+ bricks_list_pages: { readOnlyHint: true },
377
+ bricks_get_page: { readOnlyHint: true },
378
+ bricks_list_templates: { readOnlyHint: true },
379
+ bricks_get_global_classes: { readOnlyHint: true },
380
+ bricks_get_theme_styles: { readOnlyHint: true },
381
+ bricks_list_media: { readOnlyHint: true },
382
+ bricks_create_page: { readOnlyHint: false, destructiveHint: false },
383
+ bricks_create_template: { readOnlyHint: false, destructiveHint: false },
384
+ bricks_reindex_query_filters: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
385
+ bricks_update_page: { readOnlyHint: false, destructiveHint: true },
386
+ bricks_update_global_classes: { readOnlyHint: false, destructiveHint: true },
387
+ bricks_delete_page: { readOnlyHint: false, destructiveHint: true },
388
+ };
361
389
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
362
390
  tools: tools.map(({ name, description, inputSchema }) => ({
363
391
  name,
364
392
  description,
365
393
  inputSchema,
394
+ annotations: TOOL_ANNOTATIONS[name],
366
395
  })),
367
396
  }));
368
397
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bricks-mcp-server",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Provider-agnostic MCP server that exposes Bricks Builder pages, templates, global classes and theme styles as tools. Works with any MCP-compatible client (Claude Code, Codex CLI, etc.).",
5
5
  "type": "module",
6
6
  "bin": {