Skip to main content
Glama

Raw GraphQL Query

graphql_query
Read-onlyIdempotent

Run an arbitrary GraphQL query against the Unraid API and return raw JSON for fields not covered by dedicated tools; documents are schema-validated before sending.

Instructions

Advanced escape hatch. Runs an arbitrary GraphQL query operation against the Unraid API and returns the raw JSON data, for API fields no dedicated tool covers yet (registration, the flash drive, rclone remotes, Unraid Connect, share details, ...). Prefer the dedicated tools when one exists: they encode server quirks this passthrough does not. Only query operations are accepted; mutations must go through graphql_mutation and subscriptions are unsupported. Every document is validated against the vendored schema before it is sent (typos get did-you-mean hints); pass dry_run: true to validate only. The schema is in this package's schema/unraid.graphql. Results are subject to the API key's permissions; oversized results are head-truncated, so narrow the selection or page.

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": {
      "query": "<query>"
    },
    "name": "graphql_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesGraphQL document containing exactly one `query` operation.
dry_runNo`true` validates the document against the vendored schema and returns without sending it.
variablesNoValues for the variables the document declares, keyed by name without the `$`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.3
    • addedInput schema / properties / dry_run / description
      Added value: +"`true` validates the document against the vendored schema and returns without sending it."
    • addedInput schema / properties / query / description
      Added value: +"GraphQL document containing exactly one `query` 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.9/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, it discloses pre-send schema validation with did-you-mean error hints, the schema's file location, permission scoping by API key, and head-truncation of oversized results with the remedy. That truncation and validation behavior are non-obvious traits an agent must know to interpret results correctly.

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-loaded with the framing ("Advanced escape hatch") followed by scope, alternatives, constraints, and failure modes in a logical order. Dense but every sentence carries operational information; the parenthetical field list is the only mildly expendable element.

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?

For an open-ended passthrough with no output schema, the description covers what is returned (raw JSON), what limits apply (permissions, truncation), how to validate safely, and where the schema lives — everything needed to invoke it correctly and interpret the response.

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

Parameters5/5

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

Schema coverage is already 100%, so the baseline would be 3, but the description adds real meaning: the document must be validated against the vendored schema, dry_run's validate-only semantics are reaffirmed with intent, and it points to schema/unraid.graphql as the authoritative source for constructing a valid query. That is guidance the JSON schema alone does not supply.

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 *query* operation against the Unraid API and returns the raw JSON data") and explicitly scopes it as a fallback for fields no dedicated tool covers, listing concrete examples (registration, flash drive, rclone remotes, Unraid Connect, share details). It distinguishes itself from graphql_mutation by operation type, so an agent can route 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 explicit when-to-use ("for API fields no dedicated tool covers yet"), when-not-to ("Prefer the dedicated tools when one exists"), and hard exclusions ("Only `query` operations are accepted; mutations must go through graphql_mutation and subscriptions are unsupported"). The dry_run path is also framed as an alternative mode for validation-only use.

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