Skip to main content
Glama
nikhilxnarula

sagemath-mcp

Has Cyclic Edge Cut

has_cyclic_edge_cut

Check if a graph has a cyclic edge cut of a specified size k, returning the bipartition as a witness via exhaustive search over vertex partitions.

Instructions

Does the graph have a cyclic edge cut of size exactly k?

That is, a vertex bipartition (S, T) with exactly k crossing edges where neither induced subgraph is a forest. Both shores come back as a witness.

The search is exhaustive over 2^(n-1) bipartitions, so it is refused above max_order vertices; raise max_order to search anyway.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kYesthe cut size to look for; must be greater than 3.
graphYesa graph6 string or a registry name.
max_orderNovertex-count ceiling for the exhaustive search.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the exhaustive search method, the vertex-count refusal behavior, the way to override it, and the witness output. This goes well beyond a bare 'returns whether...' statement.

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 compact and well-structured: it opens with the precise question, follows with the formal definition and witness behavior, and closes with the computational constraint. Every sentence earns its place with no filler or redundancy.

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 an output schema exists and the parameter schema is complete, the description provides enough context for correct invocation: the property being tested, the witness output, and the practical search limit. The only notable omission is explicit routing relative to sibling tools, which is more a usage-guideline 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?

The input schema already documents all three parameters with 100% coverage, so the baseline is 3. The description reinforces that k is the exact crossing-edge count and that max_order bounds the exhaustive search, but it adds little semantic detail beyond what the schema already provides.

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

Purpose5/5

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

The description clearly states the tool answers a specific decision problem: whether the graph has a cyclic edge cut of size exactly k. It gives the precise bipartition condition, defines what 'cyclic' means here, and mentions that both shores are returned as a witness, distinguishing it from numeric tools like cyclic_edge_connectivity.

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 gives useful operational context: the search is exhaustive over 2^(n-1) bipartitions and is refused above max_order vertices, with an instruction to raise max_order to override. However, it does not explicitly say when to use this tool versus siblings, such as using cyclic_edge_connectivity when only the numeric value is needed.

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