Server Configuration
Describes the environment variables required to run the server.
Name | Required | Description | Default |
---|---|---|---|
GRAPHISTRY_PASSWORD | Yes | Your password for Graphistry account (obtained from hub.graphistry.com) | |
GRAPHISTRY_USERNAME | Yes | Your username for Graphistry account (obtained from hub.graphistry.com) |
Schema
Prompts
Interactive templates invoked by user choice
Name | Description |
---|---|
No prompts |
Resources
Contextual data attached and managed by the client
Name | Description |
---|---|
No resources |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
visualize_graph | Visualize a graph using Graphistry's GPU-accelerated renderer.
Args:
graph_type (str, optional): Type of graph to visualize. Must be one of "graph" (two-way edges, default), "hypergraph" (many-to-many edges).
graph_data (dict): Dictionary describing the graph to visualize. Fields:
- edges (list, required): List of edges, each as a dict with at least 'source' and 'target' keys (e.g., [{"source": "A", "target": "B"}, ...]) and any other columns you want to include in the edge table
- nodes (list, optional): List of nodes, each as a dict with at least 'id' key (e.g., [{"id": "A"}, ...]) and any other columns you want to include in the node table
- node_id (str, optional): Column name for node IDs, if nodes are provided, must be provided.
- source (str, optional): Column name for edge source (default: "source")
- destination (str, optional): Column name for edge destination (default: "target")
- columns (list, optional): List of column names for hypergraph edge table, use if graph_type is hypergraph.
- title (str, optional): Title for the visualization
- description (str, optional): Description for the visualization
ctx: MCP context for progress reporting
Example (graph):
graph_data = {
"graph_type": "graph",
"edges": [
{"source": "A", "target": "B", "weight": 1},
{"source": "A", "target": "C", "weight": 2},
...
],
"nodes": [
{"id": "A", "label": "Node A"},
{"id": "B", "label": "Node B"},
...
],
"node_id": "id",
"source": "source",
"destination": "target",
"title": "My Graph",
"description": "A simple example graph."
}
Example (hypergraph):
graph_data = {
"graph_type": "hypergraph",
"edges": [
{"source": "A", "target": "B", "group": "G1", "weight": 1},
{"source": "A", "target": "C", "group": "G1", "weight": 1},
...
],
"columns": ["source", "target", "group"],
"title": "My Hypergraph",
"description": "A simple example hypergraph."
} |
get_graph_ids | Get a list of all stored graph IDs. |
get_graph_info | Get information about a stored graph visualization. |
apply_layout | Apply a layout algorithm to a graph. Args:
graph_id: ID of the graph to apply layout to
layout: Layout algorithm to apply (force_directed, radial, circle, grid) |
detect_patterns | Identify patterns, communities, and anomalies within graphs. Runs all supported analyses and returns a combined report.
Args:
graph_id: ID of the graph to analyze
ctx: MCP context for progress reporting
Returns:
Dictionary with results from all analyses that succeeded. Keys may include:
- degree_centrality
- betweenness_centrality
- closeness_centrality
- communities (if community detection is available)
- shortest_path (if path finding is possible)
- path_length
- anomalies (if anomaly detection is available)
- errors (dict of analysis_type -> error message) |
encode_point_color | Set node color encoding for a graph using Graphistry's encode_point_color API.
Args:
graph_id (str): The ID of the graph to modify (from visualize_graph).
column (str): The node column to use for color encoding (e.g., 'type', 'score').
categorical_mapping (dict, optional): Map of category values to color codes. Example: {'mac': '#F99', 'macbook': '#99F'}. If not provided, Graphistry will auto-assign colors.
default_mapping (str, optional): Color code to use for values not in categorical_mapping. Example: 'silver'.
as_continuous (bool, optional): If True, treat the column as continuous and use a gradient palette. Example: True for numeric columns like 'score'.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
encode_point_color(graph_id, column='type', categorical_mapping={'mac': '#F99', 'macbook': '#99F'}, default_mapping='silver') |
encode_point_size | Set node size encoding for a graph using Graphistry's encode_point_size API.
Args:
graph_id (str): The ID of the graph to modify.
column (str): The node column to use for size encoding (e.g., 'score', 'type').
categorical_mapping (dict, optional): Map of category values to sizes. Example: {'mac': 50, 'macbook': 100}. If not provided, Graphistry will auto-assign sizes.
default_mapping (float, optional): Size to use for values not in categorical_mapping. Example: 20.
as_continuous (bool, optional): If True, treat the column as continuous and use a size gradient. Example: True for numeric columns like 'score'.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
encode_point_size(graph_id, column='score', as_continuous=True) |
encode_point_icon | Set node icon encoding for a graph using Graphistry's encode_point_icon API.
Args:
graph_id (str): The ID of the graph to modify.
column (str): The node column to use for icon encoding (e.g., 'type', 'origin').
categorical_mapping (dict, optional): Map of category values to icon names or URLs. Example: {'macbook': 'laptop', 'Canada': 'flag-icon-ca'}. See FontAwesome 4 or ISO country codes for built-ins.
default_mapping (str, optional): Icon to use for values not in categorical_mapping. Example: 'question'.
as_text (bool, optional): If True, use text as the icon (for continuous binning or direct text display).
continuous_binning (list, optional): List of [threshold, icon] pairs for binning continuous values. Example: [[33, 'low'], [66, 'mid'], [None, 'high']].
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
encode_point_icon(graph_id, column='type', categorical_mapping={'macbook': 'laptop', 'Canada': 'flag-icon-ca'}, default_mapping='question') |
encode_point_badge | Set node badge encoding for a graph using Graphistry's encode_point_badge API.
Args:
graph_id (str): The ID of the graph to modify.
column (str): The node column to use for badge encoding (e.g., 'type', 'origin').
position (str, optional): Badge position on the node. Example: 'TopRight', 'BottomLeft', etc.
categorical_mapping (dict, optional): Map of category values to badge icons or images. Example: {'macbook': 'laptop', 'Canada': 'flag-icon-ca'}.
default_mapping (str, optional): Badge to use for values not in categorical_mapping. Example: 'question'.
as_text (bool, optional): If True, use text as the badge (for continuous binning or direct text display).
continuous_binning (list, optional): List of [threshold, badge] pairs for binning continuous values. Example: [[33, None], [66, 'info-circle'], [None, 'exclamation-triangle']].
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
encode_point_badge(graph_id, column='type', position='TopRight', categorical_mapping={'macbook': 'laptop'}, default_mapping='question') |
apply_ring_categorical_layout | Apply a categorical ring layout to the graph using Graphistry's ring_categorical_layout API.
Args:
graph_id (str): The ID of the graph to modify.
ring_col (str): The node column to use for determining ring membership (e.g., a categorical attribute like 'type' or 'group').
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_ring_categorical_layout(graph_id, ring_col='type') |
apply_group_in_a_box_layout | Apply group-in-a-box layout to the graph using Graphistry's group_in_a_box_layout API.
Args:
graph_id (str): The ID of the graph to modify.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_group_in_a_box_layout(graph_id) |
apply_modularity_weighted_layout | Apply modularity weighted layout to the graph using Graphistry's modularity_weighted_layout API.
Args:
graph_id (str): The ID of the graph to modify.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_modularity_weighted_layout(graph_id) |
apply_ring_continuous_layout | Apply a continuous ring layout to the graph using Graphistry's ring_continuous_layout API.
Args:
graph_id (str): The ID of the graph to modify.
ring_col (str): The node column to use for determining ring position (should be a continuous/numeric attribute, e.g., 'score').
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_ring_continuous_layout(graph_id, ring_col='score') |
apply_time_ring_layout | Apply a time ring layout to the graph using Graphistry's time_ring_layout API.
Args:
graph_id (str): The ID of the graph to modify.
time_col (str): The node column to use for determining ring position (should be a datetime or timestamp attribute, e.g., 'created_at').
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_time_ring_layout(graph_id, time_col='created_at') |
apply_tree_layout | Apply a tree (layered hierarchical) layout to the graph using Graphistry's tree_layout API.
Args:
graph_id (str): The ID of the graph to modify.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
apply_tree_layout(graph_id) |
set_graph_settings | Set visualization settings for a graph using Graphistry's settings API.
Args:
graph_id (str): The ID of the graph to modify.
url_params (dict): Dictionary of Graphistry URL parameters to control visualization. Example: {'pointSize': 0.5, 'edgeInfluence': 2, 'play': 0}.
Returns:
dict: { 'graph_id': ..., 'url': ... } with the updated visualization URL.
Example:
set_graph_settings(graph_id, url_params={'pointSize': 0.5, 'play': 0}) |