Skip to main content
Glama

get_graph_info

Retrieve details about a stored graph visualization from Graphistry MCP to access and analyze network data properties.

Instructions

Get information about a stored graph visualization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graph_idYes

Implementation Reference

  • The handler function for the 'get_graph_info' tool. It retrieves cached graph data and computes node and edge counts, returning graph metadata. Registered with @mcp.tool() decorator, which also implies schema from signature and docstring.
    @mcp.tool()
    async def get_graph_info(graph_id: str) -> Dict[str, Any]:
        """Get information about a stored graph visualization."""
        try:
            if graph_id not in graph_cache:
                raise ValueError(f"Graph not found: {graph_id}")
    
            graph_data = graph_cache[graph_id]
            edges_df = graph_data["edges_df"]
            source = graph_data["source"]
            destination = graph_data["destination"]
    
            # Get node and edge counts
            if edges_df is not None:
                node_count = len(set(edges_df[source].unique()) | set(edges_df[destination].unique()))
                edge_count = len(edges_df)
            else:
                node_count = 0
                edge_count = 0
    
            return {
                "graph_id": graph_id,
                "title": graph_data["title"],
                "description": graph_data["description"],
                "node_count": node_count,
                "edge_count": edge_count
            }
        except Exception as e:
            logger.error(f"Error in get_graph_info: {e}")
            raise
  • Registration of the get_graph_info tool using the FastMCP @mcp.tool() decorator.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'gets information,' implying a read-only operation, but doesn't specify what information is returned (e.g., metadata, structure), whether it requires authentication, has rate limits, or any side effects. For a tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly. Every word earns its place, achieving optimal conciseness.

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

Completeness2/5

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

Given the tool's complexity (1 parameter, no annotations, no output schema), the description is incomplete. It doesn't explain the return values, error conditions, or behavioral nuances. For a tool that likely returns structured graph information, the lack of output details and minimal parameter guidance makes it inadequate for full contextual understanding.

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

Parameters2/5

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

The input schema has 1 parameter with 0% description coverage, and the tool description adds no parameter information beyond what the schema provides. It doesn't explain what 'graph_id' represents (e.g., format, source, validity), leaving the semantics unclear. With low schema coverage, the description fails to compensate, resulting in poor parameter understanding.

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 verb 'Get' and the resource 'information about a stored graph visualization', which is specific and understandable. It distinguishes from siblings like 'get_graph_ids' (which lists IDs) and 'visualize_graph' (which creates visualizations), though not explicitly. However, it lacks explicit sibling differentiation, preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid graph_id), exclusions, or comparisons to siblings like 'get_graph_ids' for listing IDs or 'visualize_graph' for rendering. This leaves the agent without contextual usage cues.

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