Skip to main content
Glama

graphql_schema_complexity_analyzer

Analyze GraphQL queries to calculate depth and complexity cost, protecting APIs from deeply nested recursive denial-of-service attacks.

Instructions

Calculates depth and complexity cost for GraphQL queries to protect APIs from deeply nested recursive denial-of-service queries. (0.035 USDC on Base L2)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYesInput parameters or JSON string payload for the tool execution
paymentSignatureNoBase L2 USDC micropayment signature or transaction hash for x402 settlement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It adds a useful operational detail, the 0.035 USDC Base L2 cost, and implies a read-only calculation, but it does not state the output format, failure behavior, or whether the query is transmitted to an external service.

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

Conciseness5/5

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

A single, front-loaded sentence communicates the core function, purpose, and cost with no filler. The parenthetical pricing is compact and useful.

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?

Given no output schema and no annotations, the description should explain what the returned complexity assessment looks like. It gives the metric name (depth and complexity cost) but not the response shape or usage edge cases, leaving a moderate gap.

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?

The generic input schema calls the parameter 'payload,' but the description clarifies that this tool evaluates GraphQL queries, so an agent can infer what to pass. Payment signature semantics are also tied to the disclosed cost, adding meaning over the schema alone.

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 concrete verb 'calculates' with a specific object: 'depth and complexity cost for GraphQL queries.' The stated security purpose distinguishes it from formatting or validation siblings like format_graphql_query.

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?

The phrase 'to protect APIs from deeply nested recursive denial-of-service queries' gives a clear use context. It stops short of naming alternatives or explicit when-not-to-use conditions, so it lacks exclusions.

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

Deploy Server

Other Tools