Skip to main content
Glama

graph_analyze

Analyze graph structure by counting nodes, edges, and connected components, calculating density and degrees, and detecting self-loops from an edge list.

Instructions

Analyze a graph: count nodes, edges, connected components, density, degrees, and detect self-loops.

Input Schema

NameRequiredDescriptionDefault
edgesYesArray of edges
directedNoWhether the graph is directed (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It lists exactly what is computed (node/edge counts, components, density, degrees, self-loops), which is useful, but it does not disclose the return format, edge-case behavior, or explicitly state that the operation is read-only.

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 front-loaded sentence that lists the analysis outputs without any wasted words. It is appropriately sized for a simple two-parameter analysis tool.

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

Completeness4/5

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

Given the low complexity, the description usefully enumerates the return metrics even though no output schema exists. It does not explain the output format or mention the directed default, but the schema covers the latter and the metric list largely fills the return-value gap.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters and their meanings are already documented in the input schema. The description adds no additional parameter semantics beyond what the schema provides, which is the expected baseline when coverage is complete.

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 states a specific verb (Analyze) and resource (graph) and enumerates the computed metrics, which clearly distinguishes it from tools that perform defined graph algorithms. It does not explicitly name sibling alternatives, so it stops short of full sibling differentiation.

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 gives no guidance on when to use this tool versus graph-specific siblings like bipartite_check, graph_coloring, or graph_condensation. Usage context is only implied by the word 'Analyze' and the list of metrics.

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

Deploy Server

Other Tools