Skip to main content
Glama

Graphistry MCP

Official
by graphistry

encode_point_badge

Customize graph node badges using a specific column for visual encoding. Define badge positions, map categories to icons, or display text directly. Supports continuous binning for dynamic visualizations and updates graph visuals in Graphistry.

Instructions

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

Input Schema

NameRequiredDescriptionDefault
as_textNo
categorical_mappingNo
columnYes
continuous_binningNo
default_mappingNo
graph_idYes
positionNoTopRight

Input Schema (JSON Schema)

{ "properties": { "as_text": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "title": "As Text" }, "categorical_mapping": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Categorical Mapping" }, "column": { "title": "Column", "type": "string" }, "continuous_binning": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Continuous Binning" }, "default_mapping": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Default Mapping" }, "graph_id": { "title": "Graph Id", "type": "string" }, "position": { "default": "TopRight", "title": "Position", "type": "string" } }, "required": [ "graph_id", "column" ], "title": "encode_point_badgeArguments", "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