Skip to content

工具参考

本文档面向 MCP Server 的终端用户:AI Agent。请向 Agent 提供此文档或直接让其阅读。

scan.analyze

扫描目录中的本地图片,分析其在 Markdown 文件中的引用情况。

参数:

参数类型必填说明
projectRootstring项目根目录(路径安全限制)
searchDirstring扫描目录

返回: 图片列表(含引用计数)、跳过文件、总计统计。

upload.preview

预览上传操作结果(干运行),不实际修改文件。

参数:

参数类型必填说明
projectRootstring项目根目录
searchDirstring扫描目录
providerstring云存储提供商(aliyun-oss | tencent-cos)
regionstring存储区域
bucketstring存储桶名称
accessKeyIdstringAccess Key ID
accessKeySecretstringAccess Key Secret
secretIdstringSecret ID(腾讯云)
secretKeystringSecret Key(腾讯云)

upload.run

执行实际上传和引用替换。

参数:

参数类型必填说明
projectRootstring项目根目录
searchDirstring扫描目录
providerstring云存储提供商
regionstringOSS 区域
bucketstringOSS bucket 名称
accessKeyIdstringAccess Key ID
accessKeySecretstringAccess Key Secret
secretIdstringSecret ID(腾讯云)
secretKeystringSecret Key(腾讯云)
uploadPrefixstring上传路径前缀
namingTemplatestring命名模板(如 {date}_{md5_8}{ext}

find.filesReferencingImage

查找引用指定图片的所有 Markdown 文件。

参数:

参数类型必填说明
imagePathstring图片路径
searchDirstring搜索目录

find.referenceDetails

获取图片引用的详细位置信息(行号、列号、原文)。

参数:

参数类型必填说明
imagePathstring图片路径
searchDirstring搜索目录

delete.image

删除图片(支持引用检查)。

参数:

参数类型必填说明
imagePathstring图片路径
searchDirstring搜索目录(默认当前工作目录)
forceboolean强制删除(跳过引用检查)

cleanup.images

清理目录中未被 Markdown 引用的图片。

参数:

参数类型必填说明
searchDirstring搜索目录(默认当前工作目录)
strategystring删除策略(trash | move | hard-delete,默认 trash)

transfer.analyze

分析远程图片的转移需求。

参数:

参数类型必填说明
filePathstringMarkdown 文件路径
sourceDomainstring源存储域名

transfer.preview

预览转移操作结果(干运行)。

参数:

参数类型必填说明
filePathstringMarkdown 文件路径
sourceDomainstring源存储域名
targetDomainstring目标存储域名
prefixstring目标路径前缀

transfer.execute

执行远程图片转移。

参数:

参数类型必填说明
filePathstringMarkdown 文件路径
providerstring云存储提供商
sourceAccessKeyIdstring源 Access Key ID
sourceAccessKeySecretstring源 Access Key Secret
sourceRegionstring源存储区域
sourceBucketstring源存储桶
targetAccessKeyIdstring目标 Access Key ID
targetAccessKeySecretstring目标 Access Key Secret
targetRegionstring目标存储区域
targetBucketstring目标存储桶
sourceDomainstring源存储域名
targetDomainstring目标存储域名
prefixstring目标路径前缀
overwriteboolean是否覆盖已存在文件
concurrencynumber并发数(默认 5)

基于 MIT 许可发布