Skip to main content
Glama

Scan Directory

scan_directory
Read-onlyIdempotent

Scan a directory of images and report counts of C2PA Content Credentials by verdict (AI_DECLARED, NO_AI_DECLARED, UNKNOWN) and signer, indicating partial scans when the file count exceeds the limit.

Instructions

Walk a directory of images and report how many carry a C2PA Content Credential, broken down by verdict (AI_DECLARED, NO_AI_DECLARED, UNKNOWN) and by signer. This reproduces the sweep behind this project's own finding that roughly 96.5% of real images carry no credential at all. It reads only file metadata, never pixels, and touches no network. Returns counts and a capped sample of credentialed files, not a full file listing, so a large directory does not flood the response. If the directory has more images than 'limit', the scan is partial and the result says so explicitly rather than silently truncating.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the local directory to scan.
limitNoMaximum number of image files to scan. If exceeded, the scan is partial and the result says so.
recursiveNoRecurse into subdirectories.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Even with annotations (readOnlyHint=true, idempotentHint=true, destructiveHint=false) already covering the safety profile, the description adds substantial behavior: 'It reads only file metadata, never pixels, and touches no network.' It also discloses the capped sample return and explicit partial-scan signaling, which go well beyond what annotations convey. No contradictions.

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 a single well-structured paragraph that front-loads the core purpose, then adds useful details without fluff. Every sentence contributes either to what the tool does, its safety characteristics, or its output behavior. Length is justified by the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 params, recursive, limit), the description covers all key aspects: purpose, partial scanning, non-flooding behavior, and safety. Since an output schema exists, the description need not explain return values in detail. The description is comprehensive for an agent to decide and 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 the baseline is 3. The description does not add much beyond the schema for parameters; it reiterates the 'limit' behavior but that is already in the schema. It does not clarify additional nuances like how 'recursive' affects the scan or default behaviors beyond what's in the schema. Meets baseline but doesn't exceed it.

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 is highly specific: 'Walk a directory of images and report how many carry a C2PA Content Credential, broken down by verdict and by signer.' It clearly distinguishes from the sibling tool check_image_provenance by focusing on directory-level scanning rather than individual file checks, and explicitly notes it returns counts and a capped sample rather than a full file listing.

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?

The description provides clear context for when to use the tool—reproducing a sweep for C2PA credential statistics—and notes its partial-scan behavior when limits are exceeded. However, it does not explicitly state when not to use it or mention the sibling tool as an alternative for single-image checks, so it falls short of the highest bar.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JohannsenLum/is-it-ai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server