Skip to main content
Glama

find_similar_sections

Read-only

Detect near-duplicate documentation sections by fusing embeddings with lexical Jaccard over titles and body bytes, then cluster and rank canonical sections with dedup verdicts.

Instructions

Multi-signal section dedup detection. Fuses embedding cosine (when available) with lexical Jaccard over the section title and its ACTUAL body bytes, clusters via union-find, ranks each cluster's canonical by backlink_count + size. Verdict tiers: near_duplicate, overlapping_topic, parallel_tutorial. Each cluster and variant carries signal=body|title_only; a title_only comparison had no body evidence and is never near_duplicate. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYes
min_scoreNoPairwise score floor for clustering. Default 0.7.
max_clustersNo
max_sectionsNoHard cap on sections examined. Default 1000.
exclude_same_docNoSkip pairs in the same doc. Useful for long pages with repeated structure.
near_duplicate_thresholdNoScore at/above which a cluster is flagged near_duplicate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.121.1
  2. Removedv1.121.0
  3. Addedv1.120.0
  4. Removedv1.99.0
  5. First observedv1.66.3

TDQS

A4.4/5.0
Behavior5/5

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

With annotations only providing readOnlyHint, the description carries the full behavioral burden and does so well. It discloses the fusion of embedding and lexical signals, the clustering algorithm, the ranking criteria, verdict tiers, and the important invariant that title_only comparisons are never near_duplicate. The explicit 'Read-only' statement matches the annotation without contradiction.

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 dense but every clause earns its place: purpose, method, clustering, ranking, verdicts, and signal semantics. It is front-loaded with the core function and avoids fluff, despite covering a complex tool in only a few sentences.

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 the tool's complexity and no output schema, the description does an unusually good job of explaining behavior and resulting annotations. It lacks a precise return-shape specification and any prerequisites such as whether the repo must already be indexed, but the core invocation behavior is sufficiently clear for an agent to use the tool correctly.

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?

The schema already documents several parameters and defaults, but the description adds conceptual meaning to the thresholds by explaining what the fused score is and how near_duplicate_threshold is used. It does not explicitly map max_clusters or exclude_same_doc to the clustering behavior, but the algorithmic context helps an agent reason about these parameters.

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 it performs multi-signal section dedup detection, and goes further to describe the exact method: embeddings plus lexical Jaccard, clustering, ranking, and verdict tiers. This distinguishes it from siblings like search_sections or get_section_diff without requiring schema inspection.

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 intended use is implied: use this when you need to find duplicate or overlapping sections in a repo. However, it does not explicitly contrast itself with alternatives such as search_sections or get_section_diff, nor does it state when not to use it. Guidance is implicit rather than explicit.

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