graphql_api_get_definition
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspaceId": "<workspaceId>",
"graphqlApiId": "<graphqlApiId>",
"outputDirectoryPath": "<outputDirectoryPath>"
},
"name": "graphql_api_get_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | The workspace ID | |
| graphqlApiId | Yes | The GraphQL API ID | |
| outputDirectoryPath | Yes | Directory path where GraphQL definition files will be written |