file_hash
Calculate file hash values using MD5, SHA1, SHA256, or SHA512 algorithms to verify file integrity and ensure data consistency.
Instructions
文件哈希计算:使用MD5、SHA1、SHA256或SHA512算法计算文件哈希值,用于完整性验证。
示例:计算 SHA256 { "path": "package.json", "algorithm": "sha256", "output_format": "json" }
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "file_hash"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 文件或目录的绝对路径,或相对于 working_directory 的相对路径 | |
| algorithm | No | 哈希算法:md5、sha1、sha256、sha512 | |
| output_format | No | 输出格式:text(纯文本)、json(结构化JSON)、both(两者兼有) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hash | No | 计算得到的哈希值 | |
| path | No | 文件路径 | |
| algorithm | No | 使用的哈希算法 |