Skip to main content
Glama

graphql_api_get_definition

Read-only

Retrieves the GraphQL schema definition for a specified API by writing .graphql files to your output directory and returns the list of written files.

Instructions

Get the GraphQL schema definition of a GraphQL API item (long-running). Writes definition files (.graphql, etc.) to the specified output directory and returns the list of files written.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesThe workspace ID
graphqlApiIdYesThe GraphQL API ID
outputDirectoryPathYesDirectory path where GraphQL definition files will be written

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.8.0

TDQS

A4/5.0
Behavior4/5

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

The description adds meaningful behavioral context beyond the readOnlyHint and destructiveHint annotations: it is long-running, writes definition files to an output directory, and returns the list of files written. This is important for the agent to set expectations about side effects and runtime. It does not contradict the annotations because the operation does not mutate the GraphQL API item itself.

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?

Two sentences with no filler. The primary action is front-loaded, and the follow-up sentence covers side effects and return value. Every clause earns its place.

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

Completeness4/5

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

For a three-parameter tool with no output schema, the description is complete enough: it names the target, the action, the long-running nature, the side effect, and the return value. It could add details about overwrite behavior or error conditions, but those are secondary for an agent deciding whether and how to invoke it.

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 already documents all three parameters with 100% coverage, so the baseline is 3. The description echoes the outputDirectoryPath semantics by mentioning the specified output directory, but it does not add meaningful new parameter-level detail beyond what the schema provides.

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 verb and resource: get the GraphQL schema definition of a GraphQL API item. It also specifies concrete behavior (writes .graphql definition files) that distinguishes it from generic getters like graphql_api_get and from execute/update operations.

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 purpose makes it reasonably clear when to use it: when the GraphQL schema definition is needed. However, it does not explicitly mention alternatives or exclusions, such as using graphql_api_get for item metadata or graphql_api_execute_query for running queries. Usage context is implied rather than stated.

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/mkoziel2000/mcp-fabric-api'

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