Skip to main content
Glama

Raw GraphQL Mutation

graphql_mutation
Destructive

Run arbitrary GraphQL mutations against the Unraid API to perform write operations not covered by dedicated tools, with confirmation and risk acknowledgement required.

Instructions

⚠ Advanced escape hatch. Runs an arbitrary GraphQL mutation against the Unraid API, reaching write operations no dedicated tool covers yet (server identity, SSH settings, system time, Docker folders, ...). Requires confirm: true on every call, and additionally acknowledge_risk: true when the mutation selects a known-dangerous field; without them the tool refuses and never touches your server. Prefer the dedicated gated tools when one exists: they encode server quirks (stale read-backs, replace-vs-merge semantics) this passthrough does not, so verify results with a follow-up read. Only mutation operations are accepted (use graphql_query for queries). Every document is validated against the vendored schema before the confirm gate (typos get did-you-mean hints); dry_run: true validates only. The schema is in this package's schema/unraid.graphql; results are subject to the API key's permissions.

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": {
      "mutation": "<mutation>"
    },
    "name": "graphql_mutation"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoSet `true` only after the user approves this specific change; otherwise the tool refuses or prompts them.
dry_runNo`true` validates the document against the vendored schema and returns without sending it; no `confirm` needed.
mutationYesGraphQL document containing exactly one `mutation` operation.
variablesNoValues for the variables the document declares, keyed by name without the `$`.
acknowledge_riskNoSet `true` only after the user accepts the risk; needed when the mutation selects `setState`, `forceStop`, `reset` or `configureUps`, ignored otherwise.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.3
    • addedInput schema / properties / acknowledge_risk / description
      Added value: +"Set `true` only after the user accepts the risk; needed when the mutation selects `setState`, `forceStop`, `reset` or `configureUps`, ignored otherwise."
    • addedInput schema / properties / confirm / description
      Added value: +"Set `true` only after the user approves this specific change; otherwise the tool refuses or prompts them."
    • addedInput schema / properties / dry_run / description
      Added value: +"`true` validates the document against the vendored schema and returns without sending it; no `confirm` needed."
    • addedInput schema / properties / mutation / description
      Added value: +"GraphQL document containing exactly one `mutation` operation."
    • addedInput schema / properties / variables / description
      Added value: +"Values for the variables the document declares, keyed by name without the `$`."
  2. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description goes well beyond them: it explains the two-stage confirm gate, the per-field acknowledge_risk escalation for named dangerous fields, schema validation with did-you-mean hints, dry_run validation-only mode, and that operations are bounded by the API key's permissions. It also warns that bypassing dedicated tools loses quirk handling, which is exactly the behavioral context an agent needs before a destructive call.

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?

Front-loads the escape-hatch warning and purpose, then layers gates, alternatives, and validation order. It is dense and the long parentheticals (vendored schema, did-you-mean hints, package path) add bulk, but nearly every clause carries decision-relevant information.

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

Completeness5/5

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

There is no output schema, so the description compensates by telling the agent to verify with a follow-up read and that results depend on API key permissions. Combined with validation ordering, the confirm gate, and sibling routing, nothing needed to call a destructive passthrough correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds semantics the schema does not: confirm is required on every call, acknowledge_risk is conditional and ignored otherwise, and dry_run suppresses the send. The only minor gap is that it does not elaborate on how variables are bound, leaving that entirely to the schema.

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?

States a specific verb and resource — runs an arbitrary GraphQL mutation against the Unraid API — and scopes it to write operations that no dedicated tool covers yet, with concrete examples (SSH settings, system time, Docker folders). It explicitly contrasts itself with graphql_query, so an agent can distinguish it from its nearest sibling without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-not: prefer the dedicated gated tools when one exists, with the reason (they encode stale read-back and replace-vs-merge quirks this passthrough does not). It also names the alternative for the query case and prescribes a follow-up read to verify results, so routing decisions are fully determined.

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