Skip to main content
Glama
XBP-Europe
by XBP-Europe

graph_operation

Create graphs from named examples or adjacency lists and compute key properties like chromatic number, connectivity, diameter, and shortest paths.

Instructions

Graph theory: create named graphs and compute properties (chromatic_number, is_connected, diameter, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphYesGraph constructor: a named graph like 'PetersenGraph' or an adjacency dict like '{0:[1,2], 1:[0,2], 2:[0,1]}'
sourceNoSource vertex
targetNoTarget vertex
operationYesOne of: chromatic_number, is_connected, is_planar, diameter, order, size, degree_sequence, adjacency_matrix, shortest_path (requires source and target)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 mentions 'create named graphs', implying state changes or persistence, but does not explain side effects, performance implications, or error behavior. It also does not disclose any limitations of the operations.

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 sentence that is front-loaded with the domain ('Graph theory:') and uses efficient phrasing. It wastes no words and conveys the core purpose immediately.

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 that the input schema fully documents parameters and an output schema exists, the description only needs to provide domain context, which it does. The description is minimal but sufficient; the 'etc.' hints at additional operations without listing them all, and the schema fills the gaps.

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 coverage is 100%, so every parameter already has a description. The tool description adds examples of operation values (chromatic_number, is_connected, diameter) but these are also listed in the operation parameter's schema. It does not add meaning beyond what the schema already provides.

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 identifies the tool as graph theory focused, with verbs 'create' and 'compute' and resources 'named graphs' and 'properties'. It distinguishes from sibling tools via the 'Graph theory:' domain prefix, but it omits some operations like shortest_path and adjacency_matrix, relying on 'etc.' to cover them.

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 'Graph theory:' prefix implies use for graph-related tasks, but the description does not explicitly state when to use this tool versus alternatives like combinatorics_operation or matrix_operation. No exclusions or alternative recommendations are provided, so usage guidance is only implicit.

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/XBP-Europe/sagemath-mcp'

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