Skip to main content
Glama

Find Duplicate Files

find_duplicate_files
Read-only

Find duplicate files in a course's Files area — copies with the same name and size, typically left behind by repeated course copies.

Instructions

Find duplicate files in a course's Files area — copies with the same name and size, typically left behind by repeated course copies. Each duplicate gets flagged separately by accessibility checkers, so this surfaces them for cleanup with the existing delete_file tool. Groups by display name + size (Canvas file listings carry no content hash), so same-name files of different sizes are not considered duplicates.

Input Schema

NameRequiredDescriptionDefault
course_idYesThe Canvas course ID
folder_idNoOptional Canvas folder ID to scope the search to that folder and its subfolders

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.18.15
    • addedInput schema / properties / course_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / course_id / type
      Removed value: -"number"
    • addedInput schema / properties / folder_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / folder_id / type
      Removed value: -"number"
  2. Changed1 schema field changedv1.18.11
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Addedv1.18.3

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint. The description adds real behavioral context: it explains the matching algorithm (display name + size), discloses why (no content hash in Canvas file listings), and explicitly states the edge case that same-name files of different sizes are not duplicates. This is meaningful disclosure beyond the annotations.

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?

Three sentences, front-loaded with the core action, then the motivation, then the matching-logic caveat. No redundant restatement of the name and every sentence carries distinct information.

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 read-only detection tool with no output schema, the description conveys what it finds and how grouping works. It does not describe the return shape (e.g., whether duplicates are grouped or listed per file), but the conceptual output is clear enough to invoke correctly.

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%, so both course_id and folder_id are fully documented in the schema. The description implies course scoping ('a course's Files area') but adds no syntax or format detail beyond what the schema already provides, so the baseline 3 applies.

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 duplicate files in a course's Files area') and defines what counts as a duplicate (same name and size). It clearly separates itself from siblings like list_files and get_file by being an audit/detection tool, and even names delete_file as the follow-up action.

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

Usage Guidelines4/5

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

Gives clear context for when this matters ('typically left behind by repeated course copies') and routes the agent to the cleanup tool (delete_file). It lacks an explicit when-not or a contrast with list_files, but the intended usage scenario is unambiguous.

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

Deploy Server

Other Tools