tigergraph__get_neighbors
Retrieve vertices directly connected to a source vertex via edges. Use for 1-hop traversal to find neighbors, filter by edge type or target type.
Instructions
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:
{
"vertex_type": "Person",
"vertex_id": "user123",
"edge_type": "FOLLOWS"
}Common Workflow:
Have a source vertex ID
Call 'get_neighbors' with vertex info
Optionally filter by edge type
Receive list of connected vertices
Tips: • Simpler than writing a query for 1-hop traversal • Can filter by edge type (e.g., only 'FOLLOWS' edges) • Can specify target vertex type • For multi-hop traversal, use 'run_query' instead
Examples: • Find friends: edge_type='FRIENDS' • Find purchases: edge_type='PURCHASED', target_vertex_type='Product' • Find all connections: omit edge_type
Related Tools: get_node_edges, run_query, add_edge
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of neighbors to return. | |
| profile | No | Connection profile name. Omit to use the active default profile. Use 'list_connections' to see available profiles. | |
| edge_type | No | Type of edges to traverse (e.g., 'purchased', 'friend_of'). If not provided, traverses all edge types. | |
| vertex_id | Yes | ID of the source vertex. | |
| graph_name | No | Name of the graph. If not provided, uses default connection. | |
| vertex_type | Yes | Type of the source vertex (e.g., 'Person', 'Product'). | |
| target_vertex_type | No | Type of target vertices to return. If not provided, returns all types. |