Skip to main content
Glama

BRAINIAC GraphQL Federation Security

Score subgraph query depth

graphql-security_subgraph-complexity

Walk object-type references in the supplied SDL, starting at Query when that type is present. Scalars are ignored and a repeated type is not walked again. The index is that depth. The risk score rises when the depth passes the supplied limit, and when introspection is enabled. No router is contacted. Price $0.04 USDC. POST /api/v1/graphql-security/subgraph-complexity. Unpaid calls return 402 and do not run.

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": {
      "sdl": "<sdl>",
      "max_depth": "<max_depth>",
      "introspection": "<introspection>"
    },
    "name": "graphql-security_subgraph-complexity"
  }
}

Input Schema

NameRequiredDescriptionDefault
sdlYes
max_depthYes
introspectionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/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 a fair job: it discloses the traversal rule (scalars ignored, repeated types pruned), that the risk score rises past the limit and when introspection is enabled, that no router is contacted (read-only, offline), and the payment gate (402 on unpaid calls). The main omission is what the response actually contains, since there is no output schema either.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short but poorly ordered: it leads with traversal mechanics before stating the tool's purpose, and closes with endpoint and pricing metadata that consumes roughly a third of the text. The phrase 'The index is that depth' adds confusion rather than clarity.

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

Completeness3/5

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

With no annotations and no output schema, the description should explain what the score output looks like (fields, scale, interpretation) since nothing else does. It covers the input side and the safety profile adequately but leaves the return value entirely unspecified for what is fundamentally a scoring tool.

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 0% for all three parameters, so the description must compensate. It does add meaning for two of them: max_depth is the threshold the computed depth is compared against, and introspection is a state that elevates risk. The sdl parameter is only called 'supplied SDL' with no format or size guidance, and the max_depth range (1-20) goes unmentioned.

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?

The description names a specific action on a specific resource: walking object-type references in a supplied SDL to compute a depth index and risk score. It is clearly distinguishable from the federation and authorization siblings, though it never states that distinction explicitly and the sentence 'The index is that depth' is ambiguous phrasing.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, and no alternative is named. The only conditional statements ('starting at Query when that type is present') describe internal algorithm behavior rather than invocation guidance, so the agent must infer that this is the depth-scoring option among the security tools.

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