Skip to main content
Glama

graphql_optimize_queries

Analyze GraphQL queries to identify performance bottlenecks, detect N+1 issues, and get actionable optimization suggestions.

Instructions

Pro: Analyze and optimize GraphQL queries for performance, detect N+1 issues

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe GraphQL query to optimize
schemaYesGraphQL schema SDL or summary
api_keyNoAPI key for authentication
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It says the tool analyzes and optimizes queries, but does not state whether it modifies the query, returns suggestions, requires authentication, or has any side effects. This leaves key behavioral expectations unclear.

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?

The description is short and front-loaded, with no fluff beyond the 'Pro:' prefix. It conveys the core purpose in a single sentence, though the 'Pro:' label adds no real value.

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?

Despite having clear parameters, the tool has no output schema and no annotations, so the description needs to explain what the caller should expect. It does not mention the return format, whether the query is rewritten, what happens with the api_key, or how optimization results are presented, leaving significant gaps.

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?

The input schema describes all parameters with 100% coverage, so the baseline is 3. The description does not add additional meaning beyond the schema's parameter descriptions, though it does reinforce the performance/N+1 focus.

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 a specific action ('Analyze and optimize GraphQL queries') and a specific outcome ('detect N+1 issues'). This distinguishes it from sibling tools like graphql_generate_schema and graphql_generate_resolvers, which focus on creation rather than performance analysis.

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

Usage Guidelines3/5

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

The phrase 'for performance' and 'detect N+1 issues' implies when this tool should be used, giving some context. However, it does not explicitly mention alternatives, prerequisites, or situations where another tool like gqlfed_optimize would be more appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/barnburner121/claude-plugin-marketplace'

If you have feedback or need assistance with the MCP directory API, please join our Discord server