Skip to main content
Glama

util_graphql

Read-only

GraphQL query analyzer (depth, aliases, cost) — Offline static analysis of a GraphQL query, mutation or subscription document, for API gateways and agents that build or screen GraphQL requests. Pass query (the GraphQL document). Returns syntax validity (422 with line and column on syntax errors, not charged), each operation with type, name, variables, top-level fields, field count, max depth, alias count, estimated result nodes (page-size args like first, last and limit multiplied down the tree), directives, plus issues: undefined or unused fragments and variables, fragment cycles, duplicate names, subscription root rules, depth / alias / cost limits, alias batching (e.g. many aliased login mutations) and introspection use. Verdict OK / REVIEW / REJECT. Optional max_depth (default 10), max_aliases (default 15), max_nodes (default 10000). No schema is needed or checked. Price: $0.002 USDC (Base, via x402).

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": "util_graphql"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesquery { user(id: 1) { name friends(first: 10) { name } } }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations (readOnlyHint, openWorldHint, destructiveHint) by disclosing error semantics ("422 with line and column on syntax errors, not charged"), the cost model ($0.002 USDC on Base via x402), and the OK/REVIEW/REJECT verdict. Those are exactly the operational details an agent needs to decide whether to call and how to handle a failure.

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 purpose and scope, then the input, then the return payload, then limits and price — a sensible information hierarchy. The return-value sentence is a long run-on list, but nearly every clause carries information rather than filler.

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?

With no output schema, the description carries the burden of describing returns and does so in detail: per-operation type/name/variables/fields/depth/alias count/estimated nodes, plus the issue categories (undefined or unused fragments, cycles, alias batching, introspection). Cost and error behavior are also covered, leaving little an agent would need to guess.

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% and the single documented property is only an example, but the description adds real meaning: query is "the GraphQL document," and it supplies defaults for max_depth (10), max_aliases (15) and max_nodes (10000). Caveat: those three limit parameters are described but absent from the input schema, which could mislead an agent into trying to pass them.

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?

Opens with a specific verb+resource combination ("GraphQL query analyzer") and immediately narrows scope to "Offline static analysis of a GraphQL query, mutation or subscription document." The parenthetical (depth, aliases, cost) signals the three analytical axes, which cleanly separates it from the util_csv/util_cidr/util_color style siblings.

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?

States the target audience and situation: "for API gateways and agents that build or screen GraphQL requests," plus the critical exclusion "No schema is needed or checked," which prevents an agent from hunting for a schema argument. It stops short of naming any alternative tool or a when-not-to-use condition, so it is clear context rather than a full routing rule.

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.

Resources