Skip to main content
Glama

Graphistry MCP

Official
by graphistry

encode_point_color

Set node color encoding in a graph using a specified column, with options for categorical mapping, default colors, or continuous gradients via Graphistry MCP.

Instructions

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')

Input Schema

NameRequiredDescriptionDefault
as_continuousNo
categorical_mappingNo
columnYes
default_mappingNo
graph_idYes

Input Schema (JSON Schema)

{ "properties": { "as_continuous": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "title": "As Continuous" }, "categorical_mapping": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Categorical Mapping" }, "column": { "title": "Column", "type": "string" }, "default_mapping": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Default Mapping" }, "graph_id": { "title": "Graph Id", "type": "string" } }, "required": [ "graph_id", "column" ], "title": "encode_point_colorArguments", "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/graphistry/graphistry-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server