Skip to main content
Glama
angrysky56

Cognitive Diagram Navigation MCP Server

by angrysky56

compute_metrics

Calculates graph-theoretic properties of diagrams, such as chain length, branching factor, density, node and edge counts, and acyclic status, to assess structural complexity.

Instructions

Compute structural metrics on diagram.

Computes graph-theoretic properties useful for understanding complexity.

Args: diagram_id: ID of diagram metrics: List of metrics to compute. Options: - 'chain_length': Longest path in DAG - 'branching_factor': Average out-degree - 'density': Overall connectivity - 'num_nodes': Node count - 'num_edges': Edge count - 'is_dag': Whether diagram is acyclic

Returns: dict with computed metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricsYes
diagram_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/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. 'Compute' implies a read-only, side-effect-free operation, and the metric list clarifies the computation's scope, but it says nothing about permissions, cost, or whether results are cached/persisted. Adequate but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Uses a clean Args/Returns layout, front-loading the one-line purpose before the parameter detail. The metric bullet list is long but every line adds necessary meaning that the schema lacks.

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?

With an output schema present, the terse 'dict with computed metrics' return note is acceptable. The description supplies the metric enumerations the schema omits, covering the main ambiguity; only the diagram_id semantics and any usage framing remain light.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it does well: it enumerates and explains all six metric options that the schema leaves as bare strings. diagram_id gets only 'ID of diagram', which is thin, but the metric documentation is the critical gap and it is filled.

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?

States a specific verb (compute) and resource (structural metrics on a diagram), and adds that these are graph-theoretic properties for understanding complexity. This clearly differentiates it from navigation, search, or equivalence siblings, 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'useful for understanding complexity' hints at why one might call it, but there is no explicit when-to-use, when-not-to-use, or alternative routing (e.g., vs analyze_reachability or pattern_match). An agent must infer the context.

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