Skip to main content
Glama
angrysky56

Cognitive Diagram Navigation MCP Server

by angrysky56

pattern_match

Find structural subgraph matches within a diagram by specifying node and edge patterns, returning all matched locations and counts.

Instructions

Find all pattern matches within a diagram.

Implements subgraph matching to locate structural patterns.

Args: diagram_id: ID of diagram to search pattern: Pattern spec with 'nodes' (dict) and 'edges' (list) Each edge tuple: (source_id, target_id, constraints_dict)

Returns: dict with matches list, num_matches

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYes
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?

With no annotations, the description carries the full burden. It discloses the core mechanism (subgraph matching) and the return shape, but says nothing about whether this is a read-only operation, its cost/performance characteristics, or any side effects.

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?

Front-loads the purpose in the first sentence, then details mechanism, args, and returns in a compact docstring. No redundant or filler text.

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?

An output schema exists so return values need not be spelled out, yet the description still summarizes them. Combined with the parameter breakdown for a nested-object tool, it is reasonably complete, with the only gap being deeper constraints_dict semantics.

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: it explains diagram_id and breaks down the pattern spec into 'nodes' (dict) and 'edges' (list) with each edge tuple shaped as (source_id, target_id, constraints_dict). This meaningfully exceeds the bare schema, though the constraints_dict contents remain undefined.

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 and resource ('Find all pattern matches within a diagram') and reinforces the mechanism ('subgraph matching to locate structural patterns'). It is clearly distinguishable from siblings like check_diagram_equivalence or analyze_reachability, but it never explicitly names an alternative.

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 description explains what the tool does but gives no guidance on when to choose it over siblings such as check_diagram_equivalence or explore_reasoning_space. No prerequisites or when-not-to-use conditions are stated.

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