Skip to main content
Glama

plugin_patch

Write a source file into a plugin's editable tree to stage changes; then validate with plugin_reload and activate via plugin_install after consent.

Instructions

Write a source file inside a plugin's editable tree. This does not change installed/running code. Then plugin_reload validates and plugin_install activates after consent.

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": {
      "id": "<id>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "plugin_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesPlugin id from plugin_list, or the id being authored.
pathYes
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose the key trait that writing here 'does not change installed/running code' and that plugin_install requires consent. It never says whether an existing file is overwritten, whether parent directories are created, what a validation error looks like, or whether the write is reversible, which are significant gaps for a write tool.

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 short sentences, each earning its place: what it writes, what it does not affect, and the follow-up chain. The most important constraint is front-loaded in the first clause.

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 3-parameter mutation tool with no annotations and no output schema, the description covers the essential context: target scope, side-effect boundary, and the validate/install sequence. The remaining hole is file-level behavior (overwrite, path format, error handling), which is a real but secondary gap.

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 only 33% — just 'id' is documented. The phrase 'inside a plugin's editable tree' implies that path is a location relative to that tree and that content is the file body, which partially compensates. But it does not state the expected path format (relative vs absolute, extension handling) or overwrite semantics for path, so the low-coverage parameters remain ambiguous.

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: 'Write a source file inside a plugin's editable tree.' It scopes the target precisely (the editable tree, not installed code) and names the sibling tools that follow it, so an agent can tell it apart from plugin_install or plugin_reload without opening the schemas.

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 lays out the workflow explicitly: patch first, then plugin_reload validates, then plugin_install activates after consent. That tells the agent when to reach for this tool and what to call next. It doesn't state when NOT to use it (e.g. reading existing files via plugin_read, or direct edits outside the editable tree), which keeps it short of a 5.

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