Skip to main content
Glama

Locate a directed cycle

bpj_graph_cycle_witness
Read-onlyIdempotent

Return a sequence of nodes forming one directed cycle, when present.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "graph": "<graph>"
    },
    "name": "bpj_graph_cycle_witness"
  }
}

Input Schema

NameRequiredDescriptionDefault
graphYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds only the meaningful behavioral detail that output is conditional ('when present') and returns a single cycle rather than all cycles; it omits the empty-result representation and any size/performance constraints.

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?

A single front-loaded sentence with no filler. Every word ('directed', 'one', 'when present') carries information, and nothing is buried.

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?

No output schema exists, so the description must define the return value, yet it leaves open the serialization (array vs object), whether the cycle repeats its start node, direction ordering, and the exact acyclic-case response. Combined with an undocumented sole input parameter, it is under-specified for correct invocation.

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?

There is one parameter with 0% schema description coverage beyond a title and maxLength of 6000, so the description carries the burden of explaining the input. It says nothing about the directed adjacency map JSON format, node key conventions, or what happens with oversized input, leaving the sole parameter essentially undocumented.

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?

Specific verb and resource: 'Return a sequence of nodes forming one directed cycle, when present.' An agent can tell this apart from related siblings such as bpj_graph_acyclic_route_count or bpj_graph_strong_components by the singular-cycle output, though no sibling is named explicitly.

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 clause 'when present' implies the tool is for cycle detection and that acyclic input yields nothing, but there is no explicit when-to-use or when-to-prefer-an-alternative guidance (e.g., vs strong components or topological ordering). Usage is implied rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.