Skip to main content
Glama
@particlr/mcp
by brac

Patch Effect

patch_effect

Apply RFC 6902 add, replace, or remove operations to a stored effect and revalidate it, enabling diff-based iteration with rollback and failing-op reporting on any error.

Instructions

Apply a small list of RFC 6902 ops (replace/add/remove) to a stored effect, then re-validate. Iterate by sending only the diff, not the whole document. Any failure — bad path/index or a post-patch validation error — rolls back: the stored doc is left unchanged and the failing op index is named. Handles live only for this session (server process); they do not survive a reconnect.

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": {
      "handle": "<handle>",
      "ops": "<ops>"
    },
    "name": "patch_effect"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYesRestricted RFC 6902 ops (replace/add/remove) applied IN ORDER (max 64). Any failure — bad path, bad index, or a post-patch validation error — rolls back: the stored doc is unchanged.
handleYesA handle from open_effect.

Output Schema

NameRequiredDescriptionDefault
okYes
errorsYes
handleYesA session handle ("fx-1", …) to pass as `handle` to patch/validate/simulate/render; null on failure.
warningsYes
migratedFromYesThe doc's ORIGINAL schemaVersion if it was migrated up, else null.
schemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.4/5.0
Behavior5/5

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

With annotations present, the description still adds substantial behavior beyond them: it states atomicity and rollback semantics ("the stored doc is left unchanged and the failing op index is named"), tells where errors surface, and warns that handles are process-scoped and die on reconnect. That last point is critical operational context that no annotation or schema expresses.

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

Conciseness5/5

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

Three sentences, front-loaded with the action, then the efficiency rationale, then failure semantics and the handle lifetime caveat. Every sentence earns its place, with no restating of the title or schema.

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 two-parameter mutation tool with annotations and an output schema, the description covers the essentials: atomicity, error reporting, and handle lifetime. Minor gap: it does not say what the success response contains (e.g., new version or validation result), though the output schema likely covers that.

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 100%, so the handle and ops parameters, the JSON Pointer syntax, and the max-64 cap are already documented in structured fields, which sets the baseline at 3. The description reinforces ordering and error behavior but adds no new syntax or format meaning for either parameter.

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

Purpose5/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 a small list of RFC 6902 ops ... to a stored effect") plus the follow-on step ("then re-validate"), and it distinguishes itself from whole-document replacement by saying "Iterate by sending only the diff, not the whole document." That gives an agent enough to tell this apart from the sibling validate/render/simulate tools without opening any schema.

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

Usage Guidelines4/5

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

It clearly implies when to reach for this tool: incremental edits after an open_effect handle exists, sending diffs rather than full documents. It stops short of naming an alternative for whole-document replacement or stating exclusions (e.g., when to prefer re-opening or validating separately), so it is clear guidance but not a full when/when-not matrix.

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