Skip to main content
Glama

graphql-dos-shield

query_rewriter

Text-level rewrite of an overly complex GraphQL query: strips excess nesting depth and truncates too many fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesGraphQL query to simplify
max_depthNoMax nesting depth (default: 3)
max_fieldsNoMax fields (default: 10)

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It states the tool operates at the 'text-level', indicating a non-executing transformation, and describes the functional changes (strips nesting, truncates fields). However, it does not mention side effects, return format, or any prerequisites. This is minimal viable transparency but lacks deeper behavioral disclosure.

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?

The description is a single, front-loaded sentence with no redundancy. Every phrase ('text-level rewrite', 'strips excess nesting depth', 'truncates too many fields') contributes to understanding, making it highly concise and well-structured.

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 output schema, the description should clarify what the tool returns. It says 'rewrite' but does not explicitly state that it returns the simplified query string. The tool is simple, and the description covers the core action, but the missing return value statement leaves a gap for full completeness. A 3 is appropriate.

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%, providing baseline 3. The description adds meaning by linking 'strips excess nesting depth' to max_depth and 'truncates too many fields' to max_fields, explaining the purpose of these parameters beyond their raw schema definitions. This enriches the semantics, supporting a 4.

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?

The description clearly states the tool's function: 'Text-level rewrite of an overly complex GraphQL query: strips excess nesting depth and truncates too many fields.' This specifies the verb (rewrite), the resource (GraphQL query), and the specific actions (strips depth, truncates fields), distinguishing it from siblings like complexity_meter and rate_limiter.

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 description implies usage for overly complex queries, which provides clear context. However, it does not explicitly name alternatives or state when not to use this tool versus complexity_meter or rate_limiter. It gives context without exclusions, so a 4 is appropriate.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct concern: complexity analysis, query rewriting, and rate limiting. There is no overlap in purpose or behavior.

Naming Consistency5/5

All tool names follow the same snake_case pattern with a noun+verb style (complexity_meter, query_rewriter, rate_limiter). Consistent and predictable.

Tool Count5/5

Three tools cover the core aspects of a GraphQL DoS shield (analysis, mitigation, and client limiting). The count feels appropriate for the narrow scope.

Completeness4/5

The surface covers the main stages of DoS protection: analyze complexity, rewrite problematic queries, and rate-limit clients. A minor gap is the lack of a manual reset or configuration tool, but the core workflow is complete.