Skip to main content
Glama

apply_design_patch

Idempotent

Applies an atomic list of design graph operations to a Basecoat UI design, using expectedRevision and operationId for safe, idempotent updates; does not write source files.

Instructions

Apply one atomic list of design graph operations with expectedRevision and operationId. Replay with the same operationId returns the original receipt. A committed mutation always acknowledges success; oversized optional fields may be omitted with truncated:true. Does not write application source files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
designIdYes
operationsYes
operationIdYes
expectedRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.6.2
    • removedInput schema / properties / operations / items / additionalProperties
      Removed value: -{}
    • addedInput schema / properties / operations / items / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "op": {
      +        "const": "instantiate_recipe",
      +        "type": "string"
      +      },
      +      "pagePrefix": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "recipe": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "recipe",
      +      "pagePrefix"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "bindings": {
      +        "additionalProperties": {
      +          "maxLength": 64,
      +          "minLength": 1,
      +          "pattern": "^[a-z][a-z0-9-]*$",
      +          "type": "string"
      +        },
      +        "propertyNames": {
      +          "maxLength": 64,
      +          "minLength": 1,
      +          "pattern": "^[a-z][a-z0-9-]*$",
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "block": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "node": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "op": {
      +        "const": "attach_block",
      +        "type": "string"
      +      },
      +      "order": {
      +        "maximum": 10000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "page": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "parent": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "slot": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "page",
      +      "parent",
      +      "slot",
      +      "node",
      +      "block"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "block": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "node": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "op": {
      +        "const": "replace_block",
      +        "type": "string"
      +      },
      +      "page": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "page",
      +      "node",
      +      "block"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "node": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "op": {
      +        "const": "remove_block",
      +        "type": "string"
      +      },
      +      "page": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "removeSubtree": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "page",
      +      "node",
      +      "removeSubtree"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "from": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "node": {
      +            "maxLength": 64,
      +            "minLength": 1,
      +            "pattern": "^[a-z][a-z0-9-]*$",
      +            "type": "string"
      +          },
      +          "port": {
      +            "maxLength": 64,
      +            "minLength": 1,
      +            "pattern": "^[a-z][a-z0-9-]*$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "node",
      +          "port"
      +        ],
      +        "type": "object"
      +      },
      +      "id": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "op": {
      +        "const": "connect_ports",
      +        "type": "string"
      +      },
      +      "page": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "relation": {
      +        "enum": [
      +          "controls",
      +          "data"
      +        ],
      +        "type": "string"
      +      },
      +      "to": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "node": {
      +            "maxLength": 64,
      +            "minLength": 1,
      +            "pattern": "^[a-z][a-z0-9-]*$",
      +            "type": "string"
      +          },
      +          "port": {
      +            "maxLength": 64,
      +            "minLength": 1,
      +            "pattern": "^[a-z][a-z0-9-]*$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "node",
      +          "port"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "page",
      +      "id",
      +      "relation",
      +      "from",
      +      "to"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "connection": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "op": {
      +        "const": "disconnect_ports",
      +        "type": "string"
      +      },
      +      "page": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "page",
      +      "connection"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "key": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "op": {
      +        "const": "set_decision",
      +        "type": "string"
      +      },
      +      "page": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "scope": {
      +        "enum": [
      +          "project",
      +          "page"
      +        ],
      +        "type": "string"
      +      },
      +      "value": {
      +        "anyOf": [
      +          {
      +            "maxLength": 200,
      +            "type": "string"
      +          },
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "scope",
      +      "key",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "node": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "op": {
      +        "const": "record_written",
      +        "type": "string"
      +      },
      +      "page": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      },
      +      "planDigest": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "sourcePath": {
      +        "maxLength": 260,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "page",
      +      "node",
      +      "sourcePath",
      +      "planDigest"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "op": {
      +        "const": "mark_plan_ready",
      +        "type": "string"
      +      },
      +      "page": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[a-z][a-z0-9-]*$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "page"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / operations / items / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / operations / items / type
      Removed value: -"object"
  2. Addedv1.4.0

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly=false, idempotent=true, destructive=false, openWorld=false, so the safety profile is covered. The description adds real value beyond them: replay with the same operationId returns the original receipt, committed mutations always acknowledge success, and oversized optional fields may be omitted with truncated:true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the core action and the atomicity contract. Every sentence carries information; no filler or restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-complexity mutation tool with no output schema and 0% parameter documentation, the description covers idempotency, truncation, and the source-file boundary well. It omits revision-conflict behavior, permission requirements, and the contents of the receipt, leaving gaps an agent author would need to close.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It names expectedRevision and operationId and explains operationId's replay semantics, but says nothing about designId or the structure of the operations array, whose meaning rests entirely on the schema's const values and required-field shapes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: 'Apply one atomic list of design graph operations,' scoped with expectedRevision and operationId. It clearly distinguishes this as a mutation-style patch tool, though it never names or contrasts any sibling such as validate_design or begin_design.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Atomicity and the same-operationId replay rule imply when the tool is appropriate, and 'Does not write application source files' is a useful boundary. However, there is no explicit when-to-use/when-not guidance or reference to alternatives among the ten sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.