Skip to main content
Glama

apply_ring_continuous_layout

Arrange graph nodes in continuous rings based on numeric attributes like scores to visualize hierarchical relationships and patterns in network data.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graph_idYes
ring_colYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), which registers and implements the 'apply_ring_continuous_layout' tool. It retrieves the graph from cache, applies ring_continuous_layout using the specified ring_col, updates the cache, and returns the graph_id and updated URL.
    @mcp.tool()
    async def apply_ring_continuous_layout(graph_id: str, ring_col: str) -> Dict[str, Any]:
        """
        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')
        """
        if graph_id not in graph_cache:
            raise ValueError(f"Graph not found: {graph_id}")
        g = graph_cache[graph_id]["graph"]
        g = g.ring_continuous_layout(ring_col)
        graph_cache[graph_id]["graph"] = g
        return {"graph_id": graph_id, "url": g.plot(render=False)}
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool modifies a graph and returns an updated visualization URL, indicating a mutation operation. However, it lacks details on permissions, side effects, error handling, or rate limits, which are important for a tool that changes visualizations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (description, args, returns, example), front-loading the purpose. It's concise with no redundant information, though the example could be slightly more detailed. Every sentence adds value, making it efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 2 parameters with 0% schema coverage and no output schema or annotations, the description provides basic purpose and parameter semantics but lacks behavioral details like error cases or performance implications. For a mutation tool in a set of visualization siblings, it's adequate but incomplete, as it doesn't fully guide the agent on when to choose this over alternatives.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaningful context for both parameters: 'graph_id' is described as 'the ID of the graph to modify', and 'ring_col' is explained as 'the node column to use for determining ring position' with an example ('score') and a constraint ('should be a continuous/numeric attribute'). This goes beyond the schema's basic titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('apply a continuous ring layout') and the target resource ('the graph'), specifying it uses Graphistry's ring_continuous_layout API. It distinguishes from some siblings like 'apply_tree_layout' by mentioning the 'continuous ring' aspect, though it doesn't explicitly differentiate from 'apply_ring_categorical_layout' or 'apply_time_ring_layout' which are similar ring-based layouts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying that 'ring_col' should be a 'continuous/numeric attribute', suggesting when this tool is appropriate versus categorical alternatives. However, it doesn't explicitly state when to use this tool over siblings like 'apply_ring_categorical_layout' or 'apply_time_ring_layout', nor does it mention prerequisites or exclusions, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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