assetdiet-mcp

v0.1.4
assetdiet-mcp Checked 3 days ago Published 1 month ago

Full-repository asset intelligence, optimization and MCP server for AI coding assistants

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

assetdiet_scan

Inventory all supported repository assets with metadata and content hashes

ParameterTypeDescription
root *stringAbsolute path to the repository root to scan
excludearrayAdditional glob patterns to exclude
typesarrayAsset types to include (omit = all)

assetdiet_audit

Find asset optimization opportunities and rank them by potential savings (read-only)

ParameterTypeDescription
root *stringAbsolute path to the repository root
limitnumber
policystringOptimization policy context for ranking
typesarray

assetdiet_estimate

Estimate repository-wide savings from asset optimization without modifying files

ParameterTypeDescription
root *stringAbsolute path to the repository root
policystring
typesarray

assetdiet_optimize

Optimize specific asset files under an approved policy with rollback protection

ParameterTypeDescription
files *arrayAbsolute paths to files to optimize
root *stringWorkspace root for safety checks
dryRunbooleanIf true, no files are written
outputDirstringOutput directory for optimized files (default: alongside originals)
policystring

assetdiet_optimize_all

Execute an automated optimization pass across all eligible assets in the repo

ParameterTypeDescription
root *stringAbsolute path to the repository root
dryRunboolean
limitnumber
policystring
skipAlreadyOptimizedboolean
typesarray

assetdiet_inspect

Inspect detailed metadata, dimensions, and compression potential of a single asset

ParameterTypeDescription
file *stringAbsolute path to the asset file to inspect
root *stringWorkspace root for safety checks

assetdiet_find_references

Find all source code references (imports, CSS url(), HTML tags) pointing to an asset

ParameterTypeDescription
file *stringAbsolute path to the asset
root *stringRepository root to search within

assetdiet_find_duplicates

Identify exact and probable duplicate assets by content hash and metadata

ParameterTypeDescription
root *stringRepository root to scan for duplicates
typesarray

assetdiet_validate

Validate optimized asset outputs for decodability, dimension parity, and integrity

ParameterTypeDescription
root *stringRepository root
filesarraySpecific files to validate (omit = all in root)
runIdstringValidate outputs from a specific run

assetdiet_compare

Compare original and optimized versions of an asset (size, savings, decodability)

ParameterTypeDescription
optimized *stringAbsolute path to the optimized file
original *stringAbsolute path to the original file
root *stringWorkspace root for safety checks

assetdiet_preview

Generate preview artifacts and representations where supported

ParameterTypeDescription
file *stringAbsolute path to the asset to preview
root *string
outputDirstringWhere to write preview artifacts

assetdiet_migrate_references

Propose or apply safe source code reference changes (e.g. updating image.png to image.webp)

ParameterTypeDescription
newFile *stringNew/replacement asset path
originalFile *stringOriginal asset path
root *string
dryRunboolean
updateCssboolean
updateHtmlboolean

assetdiet_unused_assets

Report potentially unreferenced/orphan assets with confidence scores

ParameterTypeDescription
root *string
confirmedOnlyboolean
typesarray

assetdiet_restore

Restore files from a recorded optimization run using transaction rollback

ParameterTypeDescription
root *string
runId *stringThe run ID returned by a previous optimize call
dryRunbooleanIf true, show what would be restored without doing it

assetdiet_report

Generate a Markdown, JSON, or HTML report summarizing optimization results and rollback commands

ParameterTypeDescription
root *string
formatstring
outputFilestringWrite report to this file path
runIdstring

assetdiet_capabilities

Show installed engines (Sharp, SVGO, FFmpeg, glTF-Transform), supported formats, and platform details