Skip to main content
Glama

OpenFactory

apply_fix

Apply a patch to a deployed app and restart its systemd unit. M1 is local-vm only: writes the file via the guest agent, then systemctl restart of-app-<slug>. github-pr / provider-redeploy modes return 501 until M2.5 / M3.

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": {
      "intent_id": "<intent_id>",
      "patch": "<patch>",
      "target_file": "<target_file>",
      "vm_name": "<vm_name>"
    },
    "name": "apply_fix"
  }
}

Input Schema

NameRequiredDescriptionDefault
patchYesThe FULL new file content (NOT a unified diff in M1).
api_keyNoMCP API key
vm_nameYesTester VM name from the App entity. Required in M1.
intent_idYesFixIntent id from propose_fix.
target_fileYesRelative path under /opt/of-apps/<slug>/ (or absolute).
session_tokenNoSession token

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the two side effects: the file is written through the guest agent and the systemd unit is restarted. It also honestly flags unimplemented modes returning 501, but omits whether the write overwrites prior content irreversibly, whether a backup exists, and what restart downtime or failure looks like.

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 tight sentences, front-loaded with the action and its side effects, with zero filler. The milestone labels M1 / M2.5 / M3 are used without definition, which costs a little clarity for an outside agent.

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 tool with an output schema and no annotations, the description covers the key risk surface: where the write lands, what it restarts, and which modes are unavailable. Authentication expectations and rollback behavior on a failed restart remain undocumented.

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 baseline is 3. The description reinforces that patch is full replacement content and that target_file is written by the guest agent, but it adds little beyond the schema's own per-parameter text.

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 concrete verb and resource pair: apply a patch to a deployed app and restart its systemd unit, then narrows the M1 behavior to local-vm writes via the guest agent plus `systemctl restart of-app-<slug>`. It does not name the sibling tools it should be sequenced with (propose_fix, get_fix_intent), so differentiation is by mode rather than by alternative tool.

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?

Gives explicit scope guidance: M1 is local-vm only, and github-pr / provider-redeploy modes return 501 until M2.5 / M3, which tells the agent when this tool will fail. It does not explicitly say an intent must first be created via propose_fix, leaving that inference to the intent_id parameter description in the schema.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.