Skip to main content
Glama
tigergraph

tigergraph-mcp

Official
by tigergraph

tigergraph__generate_gsql

Read-onlyIdempotent

Generate a GSQL query from a natural language description, using the graph schema for accuracy. Use this when you need query syntax help, then run the result with the gsql tool.

Instructions

Generate a GSQL query from a natural language description using an LLM. Use this tool when you need to create a GSQL query but are unsure of the exact syntax. The generated query can then be executed using the gsql tool. For best results, provide the graph_name so the schema can be used to generate accurate queries. Configure the LLM via env vars: LLM_MODEL (e.g., 'gpt-4o' or 'openai:gpt-4o') and optionally LLM_PROVIDER.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileNoConnection profile name. Omit to use the active default profile. Use 'list_connections' to see available profiles.
graph_nameNoName of the graph. If provided, the schema will be fetched to generate more accurate GSQL.
query_descriptionYesA natural language description of what data you want to retrieve. Examples: 'Find all users who purchased more than 5 items', 'Count vertices by type', 'Find shortest path between two nodes'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already mark it read-only, idempotent, and non-destructive; the description adds useful context about LLM usage, schema fetching when graph_name is provided, and configuration via LLM_MODEL/LLM_PROVIDER env vars. There is no contradiction with the annotations.

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 concise and front-loaded: purpose, when-to-use, execution follow-up, and best-practice/env-var notes. Every sentence contributes, though the env-var configuration detail is somewhat secondary.

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?

With no output schema, the description makes the output artifact clear ('a GSQL query') and gives a follow-up action (execute via gsql). It also covers graph_name behavior and LLM configuration, leaving little ambiguity for a straightforward generation task.

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?

Schema coverage is 100%, so parameter documentation is already complete. The description mostly reinforces graph_name's benefit and adds env-var configuration rather than new parameter-level meaning, which matches the baseline of 3.

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 uses a specific verb ('Generate') and resource ('GSQL query') and clarifies that generation happens from a natural language description via an LLM. It also points to the gsql tool for execution, which helps distinguish generation from execution, though it doesn't explicitly contrast with siblings like generate_cypher.

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?

It provides an explicit trigger: 'Use this tool when you need to create a GSQL query but are unsure of the exact syntax.' It also advises providing graph_name for better schema-aware results and notes the generated query can be executed with the gsql tool. It stops short of explaining when not to use this tool or naming alternatives.

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

Deploy Server

Other Tools