pyTigerGraph-mcp

v1.0.1
pyTigerGraph-mcp Checked 2 days ago Published 7 months ago

Model Context Protocol (MCP) server for TigerGraph

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

tigergraph__list_connections

List all available TigerGraph connection profiles. Profiles are configured via environment variables: the default profile uses TG_HOST, TG_USERNAME, etc., while named profiles use <PROFILE>_TG_HOST, <PROFILE>_TG_USERNAME, etc.

tigergraph__show_connection

Show non-sensitive connection details for a specific profile (host, username, graph name, ports). Never reveals passwords or tokens.

ParameterTypeDescription
profileConnection profile name to inspect. If not provided, shows the active profile (from TG_PROFILE env var or 'default').

tigergraph__get_global_schema

Get the complete global schema including all global vertex types, edge types, graphs, and their member types. Runs GSQL 'LS' command. **Use When:** • You need to see all graphs and their schemas at once • Understanding the complete database structure • Finding all available vertex and edge types across all graphs • Database-level schema exploration **Quick Start:** ```json {} ``` (No parameters needed) **Tips:** • Returns output from GSQL 'LS' command • Shows all graphs in the database • For single graph details, use 'show_graph_details' instead • Useful for…

ParameterTypeDescription
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__list_graphs

List all graph names in the TigerGraph database. Returns only graph names — no schema, query, or job details. **Use When:** • Discovering what graphs exist in the database • First step when connecting to a new TigerGraph instance • Verifying a graph was created or dropped successfully **Quick Start:** ```json {} ``` (No parameters needed) **Next Steps:** • Use 'show_graph_details' to see everything under a graph (schema, queries, jobs) • Use 'get_graph_schema' to get just the schema (vertex/edge types) **Related Tools:** show_graph_details, get_graph_schema, create_gr…

ParameterTypeDescription
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__create_graph

Create a new graph in the TigerGraph database with its schema (vertex types and edge types). Each graph has its own independent schema. **Use When:** • Creating a new graph from scratch • Setting up a graph with specific vertex and edge types • Initializing a new project or data model • Defining the structure before loading data **Quick Start:** ```json { "graph_name": "SocialNetwork", "vertex_types": [ { "name": "Person", "primary_id": "id", "primary_id_type": "STRING", "attributes": [ {"name": "name", "type": "STRING"}, {"name…

ParameterTypeDescription
graph_name *stringName of the new graph to create.
vertex_types *arrayList of vertex type definitions for this graph.
edge_typesarrayList of edge type definitions for this graph.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__drop_graph

Drop (delete) a graph and its schema from the TigerGraph database. **This permanently removes the graph, its schema, and all data.** **Use When:** • Removing a graph that's no longer needed • Cleaning up test graphs • Starting fresh with a new schema **Quick Start:** ```json { "graph_name": "TestGraph" } ``` **Warning: DANGER:** • This deletes EVERYTHING: schema, vertices, edges, queries, loading jobs • Operation is PERMANENT and cannot be undone • Double-check the graph_name before executing • Consider using 'clear_graph_data' if you only want to remove data…

ParameterTypeDescription
graph_name *stringName of the graph to drop.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__clear_graph_data

Clear all data (vertices and edges) from a specific graph while keeping its schema structure intact. **This is a destructive operation that removes all graph data.** **Use When:** • Resetting a graph to empty state • Clearing test data before loading production data • Starting data reload with same schema **Quick Start:** ```json { "graph_name": "MyGraph", "confirm": true } ``` **WARNING:** • Deletes ALL vertices and edges in the graph • Operation is PERMANENT and cannot be undone • Must set 'confirm': true to execute • Schema (vertex/edge types) remains inta…

ParameterTypeDescription
confirmbooleanMust be True to confirm the deletion. This is a destructive operation.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vertex_typeType of vertices to clear. If not provided, clears all data.

tigergraph__get_graph_schema

Get the schema of a specific graph — vertex types, edge types, and their attributes — as structured JSON. Returns schema only, not queries or jobs. **Use When:** • You need to know vertex/edge types and their attributes • Building or validating queries against the schema • Programmatic schema inspection or comparison **Quick Start:** ```json { "graph_name": "SocialNetwork" } ``` **Tips:** • Returns structured JSON (vertex types, edge types, attributes) • For a full listing including queries and jobs, use 'show_graph_details' • For just graph names, use 'list_gr…

ParameterTypeDescription
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__show_graph_details

Show details of a specific graph. By default shows everything (schema, queries, loading jobs, data sources). Use 'detail_type' to show only a specific category. **Use When:** • You need a full picture of a graph (schema + queries + jobs) • Starting work with a graph (call this first!) • Checking which queries or loading jobs are installed • Debugging schema or job issues **Quick Start:** ```json { "graph_name": "SocialNetwork" } ``` (Shows everything under the graph) **Filter by category:** ```json { "graph_name": "SocialNetwork", "detail_type": "query" } ``` Options: 'schem…

ParameterTypeDescription
detail_typeWhich details to show. Options: 'schema' (vertex/edge types), 'query' (installed queries), 'loading_job' (loading jobs), 'data_source' (data sources). If not provided, shows everything (equivalent to…
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__update_schema

Apply incremental schema changes: add/drop vertex types, edge types, or individual attributes. Supports both local (graph-scoped) and global schema changes. **Use When:** - Adding new vertex or edge types to an existing graph (local) - Creating global vertex/edge types shared across graphs (global) - Dropping vertex or edge types that are no longer needed - Adding or removing attributes on existing vertex types **Local schema change (add a vertex type to a graph):** ```json { "graph_name": "MyGraph", "add_vertex_types": [{"name": "Product", "attributes": [{"name": "price", "type"…

ParameterTypeDescription
add_edge_typesarrayEdge type definitions to add (same format as create_graph).
add_vertex_attributesobjectMap of vertex type name to list of attributes to add. E.g. {"Person": [{"name": "score", "type": "FLOAT"}]}
add_vertex_typesarrayVertex type definitions to add (same format as create_graph).
drop_edge_typesarrayNames of edge types to drop.
drop_vertex_attributesobjectMap of vertex type name to list of attribute names to drop. E.g. {"Person": ["old_attr"]}
drop_vertex_typesarrayNames of vertex types to drop.
graph_nameName of the graph to modify. If not provided, runs a global schema change.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'.

tigergraph__validate_schema_names

Validate vertex type names, edge type names, attribute names, and the graph name against GSQL reserved keywords and naming conflict rules. **Use When:** - Before calling 'create_graph' to catch naming problems early - Checking if user-supplied names conflict with GSQL keywords - Validating that vertex/edge type names don't collide with their attribute names **Quick Start:** ```json { "graph_name": "MyGraph", "vertex_types": [ {"name": "SELECT", "attributes": [{"name": "count", "type": "INT"}]} ] } ``` (Returns warnings for 'SELECT' and 'count' as reserved keywords) **Related…

ParameterTypeDescription
edge_typesarrayEdge type definitions to validate (same format as create_graph).
graph_nameGraph name to validate.
vertex_typesarrayVertex type definitions to validate (same format as create_graph).

tigergraph__add_node

Add a single node (vertex) to a TigerGraph graph. This performs an upsert operation - creates a new vertex if it doesn't exist, or updates attributes if it does. **Use When:** • Creating a single new entity (user, product, document, etc.) • Updating an existing vertex's attributes • You have individual entities to add (not batch loading) **Quick Start:** ```json { "vertex_type": "Person", "vertex_id": "user123", "attributes": {"name": "Alice", "age": 30} } ``` **Common Workflow:** 1. Call 'show_graph_details' to understand vertex types and attributes 2. Use 'add_node' to c…

ParameterTypeDescription
vertex_id *ID of the vertex (primary key value). Format: String or integer depending on schema. Example: 'user123', 'product_456', or 12345 Note: Must be unique within the vertex type.
vertex_type *stringType of the vertex (must exist in graph schema). Example: 'Person', 'Product', 'Company' Tip: Use 'show_graph_details' to see available vertex types.
attributesVertex attributes as key-value pairs. Keys must match the vertex type schema. Values should match the expected data types. Example: {'name': 'Alice', 'age': 30, 'email': 'alice@example.com'} Tip: Use…
graph_nameName of the graph. If not provided, uses the default connection. Tip: Use 'list_graphs' to see available graphs.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__add_nodes

Add multiple nodes (vertices) to a TigerGraph graph in a single batch operation. This is significantly more efficient than calling 'add_node' multiple times. **Use When:** • Loading multiple vertices of the same type • Importing data from CSV, JSON, or database • Initial data population • Bulk updates to existing vertices **Quick Start:** ```json { "vertex_type": "Person", "vertices": [ {"id": "user1", "name": "Alice", "age": 30}, {"id": "user2", "name": "Bob", "age": 25} ] } ``` **Common Workflow:** 1. Call 'show_graph_details' to understand the schema 2. Prep…

ParameterTypeDescription
vertex_type *stringType of the vertices (all vertices must be the same type). Example: 'Person', 'Product' Tip: Use 'show_graph_details' to see available types.
vertices *arrayList of vertices to add. Each vertex must contain the primary key field (specified by 'vertex_id' parameter) and other attributes matching the schema. Example with default vertex_id='id': ```json […
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vertex_idstringName of the primary key field in the vertex dictionaries. This tells the tool which field contains the vertex ID. Default: 'id'. Set to match your schema's primary key name. Examples: 'id', 'ACCOUNT_I…

tigergraph__get_node

Get a single node (vertex) from a TigerGraph graph by its type and ID. **Use When:** • Retrieving a specific entity by its ID • Verifying a vertex was created successfully • Checking current attribute values • Fetching details before updating **Quick Start:** ```json { "vertex_type": "Person", "vertex_id": "user123" } ``` **Related Tools:** • get_nodes - Get multiple vertices • has_node - Check if vertex exists • get_node_edges - Get edges connected to vertex

ParameterTypeDescription
vertex_id *ID of the vertex to retrieve.
vertex_type *stringType of the vertex to retrieve.
graph_nameName of the graph.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_nodes

**Purpose**: Retrieve multiple vertices (nodes) from the graph with optional filtering and sorting. **When to Use**: - List vertices of a specific type - Search for vertices matching certain criteria - Browse graph data with pagination - Find vertices based on attribute values **Key Features**: - WHERE clause for filtering - Sorting by attributes (ascending/descending) - Limit results for pagination - Returns complete vertex data including all attributes **Common Workflows**: 1. List all vertices: `get_nodes(vertex_type='Person', limit=10)` 2. Filter by attribute: `get_nodes(vertex_type='Pe…

ParameterTypeDescription
vertex_type *stringThe type of vertices to retrieve
graph_nameName of the graph to query (uses default if not specified)
limitMaximum number of vertices to return (default: 100)
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
sortSort results by attribute. Use '-' prefix for descending (e.g., '-age')
whereOptional filter condition. Use TigerGraph WHERE syntax. Examples: - 'age > 25' - 'name == "John"' - 'active == true'

tigergraph__delete_node

**Purpose**: Delete a single vertex (node) from the graph by its ID. **When to Use**: - Remove a specific vertex from the graph - Clean up obsolete data - Delete test data - Remove entities based on business logic **Important Notes**: - Warning: This operation is permanent and cannot be undone - Connected edges will also be deleted (CASCADE behavior) - Verify the vertex exists before deletion if needed **Common Workflows**: 1. Safe delete: `has_node()` → `delete_node()` → verify with `get_node()` 2. Bulk delete: Use `delete_nodes()` with WHERE clause instead **Tips**: - Use has_node()…

ParameterTypeDescription
vertex_id *The unique identifier of the vertex to delete
vertex_type *stringThe type of the vertex to delete
graph_nameName of the graph (uses default if not specified)
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__delete_nodes

**Purpose**: Delete multiple vertices (nodes) from the graph in a single operation. **When to Use**: - Bulk deletion of vertices matching criteria - Delete specific set of vertices by IDs - Clear all vertices of a type - Data cleanup operations **Important Notes**: - Warning: This operation is permanent and cannot be undone - Warning: Omitting WHERE will delete ALL vertices of the specified type - Connected edges will also be deleted (CASCADE behavior) - More efficient than multiple delete_node() calls **Usage Modes**: 1. By WHERE clause: `delete_nodes(vertex_type='Person', where='age > 70'…

ParameterTypeDescription
vertex_type *stringThe type of vertices to delete
graph_nameName of the graph (uses default if not specified)
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vertex_idsOptional list of specific vertex IDs to delete (alternative to WHERE clause)
whereFilter condition to select vertices to delete. Use TigerGraph WHERE syntax. Examples: - 'age > 70' - 'status == "inactive"' - 'created_date < "2020-01-01"' Warning: If omitted, ALL vertices of this t…

tigergraph__has_node

**Purpose**: Check if a vertex (node) exists in the graph without retrieving its full data. **When to Use**: - Verify a vertex exists before operations - Validation in data pipelines - Conditional logic based on vertex existence - Lightweight existence checks (faster than get_node) **Key Features**: - Returns simple boolean result (exists: true/false) - More efficient than get_node() for existence checks - No data transfer overhead **Common Workflows**: 1. Safe operations: `has_node()` → if true, proceed with get_node()/delete_node() 2. Validation: Check required vertices exist before add…

ParameterTypeDescription
vertex_id *The unique identifier of the vertex
vertex_type *stringThe type of the vertex to check
graph_nameName of the graph (uses default if not specified)
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_node_edges

**Purpose**: Retrieve all edges connected to a specific vertex (node). **When to Use**: - Explore connections from a vertex - Find relationships of a specific type - Analyze node connectivity patterns - Get edge attributes and target vertices **What You Get**: - Edge type and ID - Edge attributes - Target vertex information - Edge direction (outgoing from the specified vertex) **Common Workflows**: 1. Explore all connections: `get_node_edges(vertex_type='Person', vertex_id='123')` 2. Specific relationship type: `get_node_edges(..., edge_type='FRIEND_OF')` 3. Degree analysis: Count returned…

ParameterTypeDescription
vertex_id *The unique identifier of the source vertex
vertex_type *stringThe type of the source vertex
edge_typeOptional: Filter by specific edge type. If omitted, returns all edge types.
graph_nameName of the graph (uses default if not specified)
limitMaximum number of edges to return (default: 100)
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__add_edge

Add a single edge (relationship) to a TigerGraph graph connecting two vertices. **Use When:** • Creating a relationship between two entities • Connecting vertices in the graph • Building graph structure • Adding individual relationships **Quick Start:** ```json { "source_vertex_type": "Person", "source_vertex_id": "user1", "edge_type": "FOLLOWS", "target_vertex_type": "Person", "target_vertex_id": "user2", "attributes": {"since": "2024-01-15"} } ``` **Common Workflow:** 1. Ensure both source and target vertices exist (use 'add_node') 2. Call 'add_edge' to create…

ParameterTypeDescription
edge_type *stringType of the edge.
source_vertex_id *ID of the source vertex.
source_vertex_type *stringType of the source vertex.
target_vertex_id *ID of the target vertex.
target_vertex_type *stringType of the target vertex.
attributesEdge attributes. Example: {'weight': 0.5, 'date': '2023-01-01'}
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__add_edges

Add multiple edges (relationships) to a TigerGraph graph in a single batch operation. More efficient than calling 'add_edge' multiple times. **Use When:** • Loading multiple relationships • Building graph connections in bulk • Importing relationship data from files • Initial graph construction **Quick Start:** ```json { "edge_type": "FOLLOWS", "edges": [ {"from_type": "Person", "from_id": "u1", "to_type": "Person", "to_id": "u2"}, {"from_type": "Person", "from_id": "u2", "to_type": "Person", "to_id": "u3"} ] } ``` **Common Workflow:** 1. Add all vertices first…

ParameterTypeDescription
edge_type *stringType of the edges.
edges *arrayList of edges. Each edge is a dict with source and target info. Must specify 'source_id' (or 'source_vertex_id') and 'target_id' (or 'target_vertex_id'). Can also optionally specify 'source_type' and…
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_edge

Get a single edge (relationship) from a TigerGraph graph by specifying source, target, and edge type. **Use When:** • Retrieving a specific relationship • Checking edge attributes • Verifying edge was created **Quick Start:** ```json { "source_vertex_type": "Person", "source_vertex_id": "user1", "edge_type": "FOLLOWS", "target_vertex_type": "Person", "target_vertex_id": "user2" } ``` **Tips:** • Requires full edge specification (source, target, type) • Returns edge attributes if any • Use 'get_neighbors' for simpler neighbor queries **Related Tools:** get_…

ParameterTypeDescription
edge_type *stringType of the edge.
source_vertex_id *ID of the source vertex.
source_vertex_type *stringType of the source vertex.
target_vertex_id *ID of the target vertex.
target_vertex_type *stringType of the target vertex.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_edges

Get multiple edges (relationships) from a TigerGraph graph, optionally filtered by type. **Use When:** • Retrieving multiple edges • Exploring graph relationships • Data export and analysis **Quick Start:** ```json { "source_vertex_type": "Person", "source_vertex_id": "user1", "edge_type": "FOLLOWS" } ``` **Tips:** • Can filter by edge type • Returns all edges from a source vertex • Use 'get_neighbors' for simpler use cases **Related Tools:** get_edge, get_neighbors, get_edge_count

ParameterTypeDescription
edge_typeType of the edge. If not provided, gets all types.
graph_nameName of the graph. If not provided, uses default connection.
limitMaximum number of edges to return.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
source_vertex_idID of the source vertex. If not provided, gets all edges.
source_vertex_typeType of the source vertex. If not provided, gets all types.

tigergraph__delete_edge

Delete a single edge (relationship) from a TigerGraph graph. **Use When:** • Removing a specific relationship • Disconnecting two vertices • Graph maintenance **Quick Start:** ```json { "source_vertex_type": "Person", "source_vertex_id": "user1", "edge_type": "FOLLOWS", "target_vertex_type": "Person", "target_vertex_id": "user2" } ``` **Warning:** • Operation is permanent • Does not delete the vertices, only the edge **Related Tools:** delete_edges, add_edge, has_edge

ParameterTypeDescription
edge_type *stringType of the edge.
source_vertex_id *ID of the source vertex.
source_vertex_type *stringType of the source vertex.
target_vertex_id *ID of the target vertex.
target_vertex_type *stringType of the target vertex.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__delete_edges

Delete multiple edges (relationships) from a TigerGraph graph. **Use When:** • Removing multiple relationships • Bulk edge deletion • Graph restructuring **Quick Start:** ```json { "edge_type": "FOLLOWS", "edges": [ {"from_type": "Person", "from_id": "u1", "to_type": "Person", "to_id": "u2"}, {"from_type": "Person", "from_id": "u2", "to_type": "Person", "to_id": "u3"} ] } ``` **Warning:** • Operation is permanent and cannot be undone • Does not delete vertices **Related Tools:** delete_edge, add_edges

ParameterTypeDescription
edge_type *stringType of the edges.
edges *arrayList of edges with source and target vertex IDs.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__has_edge

Check if an edge (relationship) exists between two vertices without retrieving its data. **Use When:** • Verifying relationship existence • Validation logic • More efficient than get_edge when you only need existence check **Quick Start:** ```json { "source_vertex_type": "Person", "source_vertex_id": "user1", "edge_type": "FOLLOWS", "target_vertex_type": "Person", "target_vertex_id": "user2" } ``` **Tips:** • Returns boolean (true/false) • Faster than get_edge when you don't need the data • Use before add_edge to avoid duplicates **Related Tools:** get_edg…

ParameterTypeDescription
edge_type *stringType of the edge.
source_vertex_id *ID of the source vertex.
source_vertex_type *stringType of the source vertex.
target_vertex_id *ID of the target vertex.
target_vertex_type *stringType of the target vertex.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__run_query

Run an interpreted query on a TigerGraph graph. Supports both GSQL and openCypher query languages. Use this for ad-hoc queries without needing to install them first. **Use When:** • Running one-time or ad-hoc queries • Testing queries before installation • Simple data retrieval operations • Prototyping and exploration **Quick Start (GSQL):** ```json { "query_text": "INTERPRET QUERY () FOR GRAPH MyGraph { SELECT v FROM Person:v LIMIT 5; PRINT v; }" } ``` **Quick Start (Cypher):** ```json { "query_text": "INTERPRET OPENCYPHER QUERY () FOR GRAPH MyGraph { MATCH (n:Person) R…

ParameterTypeDescription
query_text *stringQuery text to interpret and run. Supports both GSQL and openCypher queries. For GSQL: use 'INTERPRET QUERY () FOR GRAPH <graph> { <gsql_statements> }'. For openCypher: use 'INTERPRET OPENCYPHER QUERY…
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__run_installed_query

Run an installed GSQL query on a TigerGraph graph with parameters. Faster than interpreted queries for repeated execution. **Use When:** • Running pre-installed, compiled queries • Queries that are executed frequently • Performance-critical operations • Parameterized queries with different inputs **Quick Start:** ```json { "query_name": "getPersonFriends", "params": {"personId": "user123", "maxHops": 2} } ``` **Common Workflow:** 1. Install query once with 'install_query' 2. Run multiple times with 'run_installed_query' and different params 3. Much faster than 'run_query…

ParameterTypeDescription
query_name *stringName of the installed query.
graph_nameName of the graph. If not provided, uses default connection.
paramsQuery parameters.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__install_query

Install a GSQL query on a TigerGraph graph, compiling it for faster repeated execution. **Use When:** • You have a query you'll run multiple times • You want better query performance • Creating reusable query logic • Building query libraries **Quick Start:** ```json { "query_text": "CREATE QUERY getPersonFriends(VERTEX<Person> p) FOR GRAPH MyGraph { ... }" } ``` **Common Workflow:** 1. Write and test query with 'run_query' first 2. Once working, install with 'install_query' 3. Run with 'run_installed_query' (faster) **Tips:** • Query text should start with 'CREATE QUE…

ParameterTypeDescription
query_text *stringGSQL query text to install.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__drop_query

Drop (delete) an installed query from TigerGraph. **Use When:** • Removing queries no longer needed • Cleaning up test queries • Before re-installing a modified query **Quick Start:** ```json { "query_name": "oldQuery" } ``` **Warning:** • Permanently deletes the installed query • Cannot be undone • Any code calling this query will fail **Tips:** • Use 'show_query' first to review before dropping • Cannot drop queries being used by other queries **Related Tools:** install_query, show_query, is_query_installed

ParameterTypeDescription
query_name *stringName of the query to drop.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__show_query

Show the GSQL text of an installed query. **Use When:** • Reviewing what an installed query does • Debugging query behavior • Understanding existing queries • Documenting installed queries **Quick Start:** ```json { "query_name": "getPersonFriends" } ``` **Tips:** • Returns the full GSQL query text • Query must be installed first • Use 'is_query_installed' to check existence **Related Tools:** install_query, get_query_metadata, is_query_installed

ParameterTypeDescription
query_name *stringName of the query to show.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_query_metadata

Get metadata about an installed query including parameters, return type, and other details. **Use When:** • Understanding query parameters and signature • Discovering what queries are available • Building query documentation • Programmatic query discovery **Quick Start:** ```json { "query_name": "getPersonFriends" } ``` **Tips:** • Shows query parameters, types, and metadata • Helps understand how to call the query • Use 'show_query' to see the actual query text **Related Tools:** show_query, is_query_installed, run_installed_query

ParameterTypeDescription
query_name *stringName of the query.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__is_query_installed

Check if a query is installed in TigerGraph without running it. **Use When:** • Verifying query installation • Before trying to run an installed query • Conditional query logic **Quick Start:** ```json { "query_name": "getPersonFriends" } ``` **Tips:** • Returns true/false • Faster than trying to run and catching errors • Use before 'run_installed_query' **Related Tools:** install_query, run_installed_query, show_query

ParameterTypeDescription
query_name *stringName of the query to check.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_neighbors

Get neighbor vertices connected to a source vertex via edges. Useful for 1-hop graph traversal to find connected entities. **Use When:** • Finding vertices directly connected to a vertex • 1-hop traversal (immediate neighbors) • Discovering relationships • Building recommendation lists **Quick Start:** ```json { "vertex_type": "Person", "vertex_id": "user123", "edge_type": "FOLLOWS" } ``` **Common Workflow:** 1. Have a source vertex ID 2. Call 'get_neighbors' with vertex info 3. Optionally filter by edge type 4. Receive list of connected vertices **Tips:** • Simpl…

ParameterTypeDescription
vertex_id *stringID of the source vertex.
vertex_type *stringType of the source vertex (e.g., 'Person', 'Product').
edge_typeType of edges to traverse (e.g., 'purchased', 'friend_of'). If not provided, traverses all edge types.
graph_nameName of the graph. If not provided, uses default connection.
limitMaximum number of neighbors to return.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
target_vertex_typeType of target vertices to return. If not provided, returns all types.

tigergraph__create_loading_job

Create a loading job from structured configuration. The job defines how to load data from files into vertices and edges. Each file config specifies: file alias, separator, header, EOL, and mappings. Node mappings define which columns map to vertex attributes. Edge mappings define source/target columns and edge attributes. Optionally run the job immediately and drop it after execution.

ParameterTypeDescription
files *arrayList of file configurations. Each file must have a 'file_alias' and 'node_mappings' and/or 'edge_mappings'. Example: [{'file_alias': 'f1', 'node_mappings': [...]}]
job_name *stringName for the loading job.
drop_after_runbooleanIf True, drop the job after running (only applies if run_job=True).
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
run_jobbooleanIf True, run the loading job immediately after creation.

tigergraph__run_loading_job_with_file

Execute a loading job with a data file. The file is uploaded to TigerGraph and loaded according to the specified loading job definition.

ParameterTypeDescription
file_path *stringAbsolute path to the data file to load. Example: '/home/user/data/persons.csv'
file_tag *stringThe name of file variable in the loading job (DEFINE FILENAME <fileTag>).
job_name *stringThe name of the loading job to run.
eolEnd-of-line character. Default is '\n'. Supports '\r\n'.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
separatorData value separator. Default is comma. For JSON data, don't specify.
size_limitintegerMaximum size for input file in bytes (default 128MB).
timeoutintegerTimeout in milliseconds. Set to 0 for system-wide timeout.

tigergraph__run_loading_job_with_data

Execute a loading job with inline data string. The data is posted to TigerGraph and loaded according to the specified loading job definition.

ParameterTypeDescription
data *stringThe data string to load (CSV, JSON, etc.). Example: 'user1,Alice\nuser2,Bob'
file_tag *stringThe name of file variable in the loading job (DEFINE FILENAME <fileTag>).
job_name *stringThe name of the loading job to run.
eolEnd-of-line character. Default is '\n'. Supports '\r\n'.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
separatorData value separator. Default is comma. For JSON data, don't specify.
size_limitintegerMaximum size for input data in bytes (default 128MB).
timeoutintegerTimeout in milliseconds. Set to 0 for system-wide timeout.

tigergraph__get_loading_jobs

Get a list of all loading jobs defined for the current graph.

ParameterTypeDescription
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_loading_job_status

Get the status of a specific loading job by its job ID.

ParameterTypeDescription
job_id *stringThe ID of the loading job to check status.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__drop_loading_job

Drop (delete) a loading job from the graph.

ParameterTypeDescription
job_name *stringThe name of the loading job to drop.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_vertex_count

Get the count of vertices in a TigerGraph graph.

ParameterTypeDescription
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vertex_typeType of vertices to count. If not provided, counts all types.

tigergraph__get_edge_count

Get the count of edges in a TigerGraph graph.

ParameterTypeDescription
edge_typeType of edges to count. If not provided, counts all types.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_node_degree

Get the degree (number of connected edges) of a node in a TigerGraph graph.

ParameterTypeDescription
vertex_id *stringID of the vertex.
vertex_type *stringType of the vertex.
directionDirection of edges: 'outgoing', 'incoming', or 'both'.
edge_typeType of edges to count. If not provided, counts all edge types.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__gsql

Execute a GSQL command on TigerGraph. Use this for administrative tasks (e.g., creating users, granting roles) or schema modifications (e.g., CREATE VERTEX). Do NOT use this for running data queries (SELECT statements) - use run_query instead. Example: `CREATE USER alice WITH PASSWORD 'password'` or `LS`.

ParameterTypeDescription
command *stringGSQL command to execute.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__generate_gsql

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.

ParameterTypeDescription
query_description *stringA 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'
graph_nameName of the graph. If provided, the schema will be fetched to generate more accurate GSQL.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__generate_cypher

Generate an openCypher query from a natural language description using an LLM. Use this tool when you prefer Cypher syntax over GSQL. The generated query will be wrapped in TigerGraph's INTERPRET OPENCYPHER QUERY format. graph_name is required as the query needs to specify the target graph. Configure the LLM via env vars: LLM_MODEL (e.g., 'gpt-4o' or 'openai:gpt-4o') and optionally LLM_PROVIDER.

ParameterTypeDescription
graph_name *stringName of the graph. Required for Cypher queries as they need to be wrapped in INTERPRET OPENCYPHER QUERY for the specific graph.
query_description *stringA natural language description of what data you want to retrieve. Examples: 'Find all users who purchased more than 5 items', 'Find friends of friends', 'Match patterns in the graph'
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__add_vector_attribute

Add a vector attribute to an existing vertex type. Creates a schema change job to ALTER VERTEX with ADD VECTOR ATTRIBUTE.

ParameterTypeDescription
dimension *integerDimension (length) of the vector. Max 4096 for Community, 32768 for Enterprise.
vector_name *stringName of the vector attribute.
vertex_type *stringName of the vertex type to add the vector attribute to.
graph_nameName of the graph. If not provided, uses default connection.
metricstringSimilarity metric: 'COSINE', 'L2' (Euclidean), or 'IP' (inner product).
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__drop_vector_attribute

Drop a vector attribute from a vertex type. Creates a schema change job to ALTER VERTEX with DROP VECTOR ATTRIBUTE.

ParameterTypeDescription
vector_name *stringName of the vector attribute to drop.
vertex_type *stringName of the vertex type.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__list_vector_attributes

Get vector attribute information (name, dimension, metric) for vertex types in a graph. Parses the output of the GSQL 'LS' command. Optionally filter by vertex type. **Related Tools:** add_vector_attribute, drop_vector_attribute, get_vector_index_status

ParameterTypeDescription
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vertex_typeFilter by vertex type. If not provided, returns vector attributes for all vertex types.

tigergraph__get_vector_index_status

Check the rebuild status of vector indexes. Returns 'Ready_for_query' when complete or 'Rebuild_processing' if still building.

ParameterTypeDescription
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vector_nameVector attribute name. If not provided, checks all.
vertex_typeVertex type to check. If not provided, checks all.

tigergraph__upsert_vectors

Upsert multiple vertices with vector data using the REST Upsert API. Vectors must be provided inline as lists of floats (i.e., already in memory). To bulk-load vectors from a local file, use 'load_vectors_from_csv' or 'load_vectors_from_json' instead.

ParameterTypeDescription
vector_attribute *stringName of the vector attribute.
vectors *arrayList of vectors to upsert, each with vertex_id, vector, and optional attributes.
vertex_type *stringType of the vertices.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__load_vectors_from_csv

Bulk-load vectors from a CSV/delimited file into a vertex type's vector attribute. Creates a GSQL loading job, runs it with the file, then drops the job. **File format:** Each row has a vertex ID and a vector. Fields are separated by ``field_separator`` (default ``|``). Vector elements are separated by ``element_separator`` (default ``,``). **Example file** (field_separator='|', element_separator=','): ``` vertex1|0.1,0.2,0.3 vertex2|0.4,0.5,0.6 ``` **Prerequisites:** 1. Vertex type must already exist 2. Vector attribute must already be added (use 'add_vector_attribute') 3. File must…

ParameterTypeDescription
file_path *stringAbsolute path to the CSV/delimited data file on the local machine (uploaded to TigerGraph via REST). Each row has a vertex ID and a vector column.
vector_attribute *stringName of the vector attribute to load into.
vertex_type *stringTarget vertex type that has the vector attribute.
element_separatorstringSeparator between vector elements within the vector column. Default: ','.
field_separatorstringSeparator between fields (columns) in the file. Default: '|'.
graph_nameName of the graph. If not provided, uses default connection.
headerbooleanWhether the file has a header row. Default: false.
id_columnColumn for vertex ID: integer index (0-based) or header name. Default: 0 (first column).
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vector_columnColumn containing the vector data: integer index (0-based) or header name. Default: 1 (second column).

tigergraph__load_vectors_from_json

Bulk-load vectors from a JSON Lines (.jsonl) file into a vertex type's vector attribute. Creates a GSQL loading job with JSON_FILE="true", runs it with the file, then drops the job. **File format:** Each line is a JSON object with an ID field and a vector field. The vector is stored as a comma-separated string (not a JSON array). **Example file** (id_key='id', vector_key='embedding'): ``` {"id": "vertex1", "embedding": "0.1,0.2,0.3"} {"id": "vertex2", "embedding": "0.4,0.5,0.6"} ``` **Prerequisites:** 1. Vertex type must already exist 2. Vector attribute must already be added (use 'add_…

ParameterTypeDescription
file_path *stringAbsolute path to the JSON Lines (.jsonl) file on the local machine (uploaded to TigerGraph via REST). Each line is a JSON object with an ID field and a vector field.
vector_attribute *stringName of the vector attribute to load into.
vertex_type *stringTarget vertex type that has the vector attribute.
element_separatorstringSeparator between vector elements within the vector string value. Default: ','.
graph_nameName of the graph. If not provided, uses default connection.
id_keystringJSON key for the vertex ID. Default: 'id'.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vector_keystringJSON key for the vector data (stored as a comma-separated string). Default: 'vector'.

tigergraph__search_top_k_similarity

Perform vector similarity search using TigerGraph's vectorSearch() function. Returns top-K most similar vertices with distance scores. **IMPORTANT:** The ``query_vector`` dimensions MUST match the dimension defined in the vector attribute (e.g., if the attribute was created with DIMENSION=1536, the query vector must have exactly 1536 elements). A dimension mismatch will cause the search to fail or return incorrect results. Use ``list_vector_attributes`` to check the expected dimension before searching. **Related Tools:** list_vector_attributes (check dimension), fetch_vector (retrieve vecto…

ParameterTypeDescription
query_vector *arrayQuery vector for similarity search.
vector_attribute *stringName of the vector attribute to search.
vertex_type *stringType of vertices to search.
efExploration factor for HNSW algorithm. Higher = more accurate but slower.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
return_vectorsbooleanWhether to return the vector values (can be large).
top_kintegerNumber of top similar results to return.

tigergraph__fetch_vector

Fetch vertices with their vector data using GSQL PRINT WITH VECTOR. Note: Vector attributes cannot be fetched via REST API.

ParameterTypeDescription
vertex_ids *arrayList of vertex IDs to fetch.
vertex_type *stringType of the vertex.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.
vector_attributeSpecific vector attribute to fetch. If not provided, fetches all vectors.

tigergraph__create_data_source

Create a new data source for loading data (S3, GCS, Azure Blob, or local).

ParameterTypeDescription
config *objectConfiguration for the data source (e.g., bucket, credentials).
data_source_name *stringName of the data source.
data_source_type *stringType of data source: 's3', 'gcs', 'azure_blob', or 'local'.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__update_data_source

Update an existing data source configuration.

ParameterTypeDescription
config *objectUpdated configuration for the data source.
data_source_name *stringName of the data source to update.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_data_source

Get information about a specific data source.

ParameterTypeDescription
data_source_name *stringName of the data source.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__drop_data_source

Drop (delete) a data source.

ParameterTypeDescription
data_source_name *stringName of the data source to drop.
graph_nameName of the graph. If not provided, uses default connection.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__get_all_data_sources

Get information about all data sources.

ParameterTypeDescription
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__drop_all_data_sources

Drop all data sources. WARNING: This is a destructive operation.

ParameterTypeDescription
confirmbooleanMust be True to confirm dropping all data sources.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__preview_sample_data

Preview sample data from a file in a data source.

ParameterTypeDescription
data_source_name *stringName of the data source.
file_path *stringPath to the file within the data source.
graph_nameName of the graph context. If not provided, uses default connection.
num_rowsintegerNumber of sample rows to preview.
profileConnection profile name. If not provided, uses TG_PROFILE env var or 'default'. Use 'list_connections' to see available profiles.

tigergraph__discover_tools

Discover which TigerGraph tools are relevant for your task. **Use this tool when:** - You're unsure which tool to use for your goal - You want to explore available capabilities - You need suggestions for accomplishing a task **Returns:** - List of recommended tools with descriptions - Use cases and complexity ratings - Prerequisites and related tools - Example parameters **Example:** task_description: 'I want to add multiple users to the graph'

ParameterTypeDescription
task_description *stringDescribe what you want to accomplish in natural language. Examples: - 'add multiple users to the graph' - 'find similar documents using embeddings' - 'understand the graph structure' - 'load d…
categoryFilter by category: 'schema', 'data', 'query', 'vector', 'loading', 'utility'. Leave empty to search all categories.
limitintegerMaximum number of tools to return (default: 5)

tigergraph__get_workflow

Get a step-by-step workflow template for common TigerGraph tasks. **Use this tool when:** - You need to complete a complex multi-step task - You want to follow best practices - You're new to TigerGraph and need guidance **Returns:** - Ordered list of tools to use - Example parameters for each step - Explanations of what each step accomplishes **Available workflows:** create_graph, load_data, query_data, vector_search, graph_analysis, setup_connection

ParameterTypeDescription
workflow_type *stringType of workflow to retrieve: - 'create_graph': Set up a new graph with schema - 'load_data': Import data into an existing graph - 'query_data': Query and analyze graph data - 'vector_search':…

tigergraph__get_tool_info

Get detailed information about a specific TigerGraph tool. **Use this tool when:** - You want to understand a tool's capabilities - You need examples of how to use a tool - You want to know prerequisites or related tools **Returns:** - Detailed tool description - Use cases and examples - Prerequisites and related tools - Common next steps

ParameterTypeDescription
tool_name *stringName of the tool to get information about. Example: 'tigergraph__add_node' or 'tigergraph__search_top_k_similarity'