Skip to main content
Glama
nikhilxnarula

sagemath-mcp

Is Near Bipartite

is_near_bipartite

Determine if a graph is near-bipartite: returns true when removing a pair of non-adjacent edges yields a bipartite matching covered graph, along with the witness pair.

Instructions

Is the graph near-bipartite?

True when some pair of non-adjacent edges can be removed to leave a bipartite matching covered graph; that pair comes back as the witness.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphYesa graph6 string or a registry name.

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, the description carries the burden and does well: it defines the exact condition and reveals the important behavioral detail that the removed edge pair comes back as the witness. It does not discuss failure behavior, but for a read-only predicate this is a minor omission.

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?

Two short sentences with no redundant wording. The property question is front-loaded, followed immediately by the precise definition and witness behavior. Every clause earns its place.

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?

The input is fully covered by the schema, the output schema covers return structure, and the description explains the witness behavior. It is complete for a single-parameter graph predicate, though it could add a note about invalid graph6 strings or registry names.

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% for the single graph parameter, so the schema already documents input format. The description adds no additional parameter semantics, which is acceptable under the baseline for high schema coverage.

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 explicitly states the tool is a predicate for the near-bipartite property and gives the defining condition: removing some pair of non-adjacent edges leaves a bipartite matching covered graph. This distinguishes it from the many sibling graph-property predicates.

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?

Usage is implied: an agent should call this when it needs to know whether the provided graph is near-bipartite. However, the description does not explicitly mention alternatives or when not to use it, leaving the choice among sibling property tools to inference.

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