Skip to main content
Glama

patch_composition

Applies an RFC 6902 JSON Patch (add, replace, remove, test) to a MOGA composition, including id-based list paths, to update elements and nested transitions precisely.

Instructions

Apply an RFC 6902 JSON Patch (add, replace, remove, test) to a composition. In a list, a path step may be an item's id instead of its index: /elements/team/elements/card1/props/x (the element ids get_composition and layers_at show). A nested composition's transition in is { type, dur } on it: type cut, fade, push, zoom, blur, iris or ink (taste says what each does on the frame).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "patch": "<patch>"
    },
    "name": "patch_composition"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesComposition name
basisNoWhat you read and followed to make this change, as refs from search or lookup: rule:<lint or taste rule>, taste, feedback:<id> (earlier feedback this follows; what it answers goes in feedback), commit:<id> (an earlier change it builds on), asset:, template:, skill:… The person sees them under the change, so they know why it is this way. Name only what shaped it.
patchYes
messageNoOne line saying why, kept with the change in the history
feedbackNoIds of the feedback this change answers (notes and marks from list_notes, list_examples or the conversation). When the person keeps the change it joins the record of that feedback, and when they then mark the feedback resolved it is the fix; when they take it back, the feedback opens again.
confidenceNoHow sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.2
    • addedInput schema / properties / confidence
      Added value: +{
      +  "description": "How sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change.",
      +  "enum": [
      +    "high",
      +    "medium",
      +    "low"
      +  ]
      +}
    • addedInput schema / properties / name / description
      Added value: +"Composition name"
  2. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent mutation, so the safety profile is covered. The description adds genuinely useful behavior detail about id-based path resolution and the shape of a nested transition, but says nothing about atomicity (does a failing `test` op abort the whole patch?), permissions, or what the caller gets back. Nothing contradicts the annotations.

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?

Three dense sentences, front-loaded with the operation and followed by the two non-obvious mechanics an agent needs before calling. The transition-type enumeration is slightly tangential to patching, but it prevents a malformed value and earns its place.

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

Completeness4/5

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

For a six-parameter mutation with no output schema, the description covers the hard part — how to construct paths and values — and the schema covers the metadata parameters. The remaining gap is the return value and error/atomicity behavior, which an agent would want before issuing a destructive-ish multi-op patch.

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 coverage is 83%, so the schema already carries most parameter meaning, including the rich basis/feedback/confidence descriptions; baseline is therefore 3. The description does add real value for the one gap — the `patch` array's inner `path` and `value` fields have no schema descriptions, and the id-vs-index path rule and transition object shape are explained only here — but it says nothing about name, message, or the confidence threshold behavior beyond what the schema states.

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?

States a specific verb and resource: apply an RFC 6902 JSON Patch to a composition, and enumerates the supported ops (add, replace, remove, test). The RFC 6902 framing makes it distinguishable from a whole-document writer like put_composition, though it never names that sibling explicitly.

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?

Usage is implied through the path-syntax guidance and the note that element ids come from get_composition and layers_at, which tells an agent how to build a valid call. There is no explicit when-to-use-this-vs-put_composition guidance and no statement of preconditions or failure modes.

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

Deploy Server

Other Tools