Skip to main content
Glama

data-api-code

graphql_query_build_and_validate

Build or validate a GraphQL operation query/mutation string, check brace depth balancing, and extract declared variables.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "graphql_query_build_and_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNo
fieldsNo
fieldNameNouser
operationTypeNoquery

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose concrete behaviors beyond the name — brace-depth balancing and declared-variable extraction — which tells the agent this is a static analysis helper with no side effects. It omits what happens on malformed input (throw vs. error list), what the response contains, and how the caller switches between build and validate mode.

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?

A single front-loaded sentence with no filler, leading with the primary action. It is efficient, though the compression is part of why the mode and parameter semantics go unexplained.

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

Completeness2/5

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

This is a four-parameter, zero-coverage, multi-capability tool with no annotations and no output schema, so the description must do all the work. It never explains how the modes are selected, what the params mean, or what a validation result looks like — a caller cannot construct a correct invocation from this alone.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters, and the description compensates for almost none of it. 'query/mutation' loosely maps to operationType, but text, fields, and fieldName (with its default of 'user') are never explained — the agent must guess whether fields is the selection set to render and what fieldName scopes.

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 verb set and resource: build or validate a GraphQL query/mutation string, check brace depth, extract declared variables. That is clearly distinct from schema-oriented siblings like graphql_schema_inspect. It falls short of 5 because the bundled three capabilities are not tied to which params trigger them, so the agent cannot tell whether it is calling one tool or three.

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 guidance, no when-not-to-use, and no reference to any alternative tool. 'Build or validate' hints at two modes but never states what condition selects one over the other or that omitting params yields a default behavior.

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