Skip to main content
Glama

find_duplicates

Read-only

Find groups of scripts with exactly identical source code, ordered by group size, to locate copy-pasted code that should be moved into a shared ModuleScript. Read-only; near-duplicates are ignored.

Instructions

Find groups of scripts whose Source is exactly identical, biggest group first: copy-pasted code to move into one shared ModuleScript. Read-only. Only exact copies match; near-duplicates with small edits are not reported. To search for a specific snippet use grep_scripts.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_duplicates"
  }
}

Input Schema

NameRequiredDescriptionDefault
placeNoTarget place (PlaceId or project name). Defaults to the bound/sole connected place.
minLinesNoIgnore scripts shorter than this many lines, to skip trivial stubs. Default 3.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.1
    • changedInput schema / properties / minLines / description
      Previous value: -"ignore scripts shorter than this many lines (default 3) — skips trivial stubs"New value: +"Ignore scripts shorter than this many lines, to skip trivial stubs. Default 3."
    • addedInput schema / properties / minLines / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / minLines / minimum
      Added value: +1
    • changedInput schema / properties / minLines / type
      Previous value: -"number"New value: +"integer"
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered; the description adds real behavior beyond that — strict exact-match semantics, non-reporting of near-duplicates, and result ordering by descending group size. The one redundant clause ("Read-only") is harmless restatement, and the match strictness is the kind of trait an agent must know before calling.

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?

Four short sentences, front-loaded with the core definition and grouping rule, then exclusion, then the alternative. Nothing is bloated; the use-case clause justifies the tool's existence rather than padding it.

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?

For a two-optional-parameter, read-only tool with no output schema, the definition covers match semantics, ordering, and routing. The only soft gap is that the shape of a returned group (what identifies the scripts within a group) is implied rather than stated, which is minor given the absence of an output schema.

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%, and both parameters (place, minLines) are documented in the schema with defaults and rationale, so the description does not need to repeat them. It adds no syntax or format detail beyond what the schema already provides, which is the baseline-3 case.

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?

States a specific verb and resource (find groups of scripts), the exact matching criterion (identical Source), the ordering (biggest group first), and the intent (copy-paste to consolidate into a ModuleScript). An agent can distinguish this from a text search or a diff tool without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Names both the exclusion (near-duplicates with small edits are not reported) and the explicit alternative with its triggering condition: grep_scripts for a specific snippet. This is exactly the when/when-not/alternative structure that removes routing ambiguity.

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