Verify archive integrity (one call, never throws for archive problems)
verify_zipCheck ZIP archives before extraction: validate structure, CRC-32, sizes, and local-header agreement, returning a clear ok/error verdict with per-entry skip or failure details.
Instructions
Deep verification in one call — zipnative's verifyZip report verbatim: eager structural validation, then every entry's CRC-32 / size / local-header agreement. ok is true when the structure is valid AND every verifiable entry passed AND every design-time skip ('encrypted' | 'stream-only-codec') has a local header that agrees with the central directory. This tool NEVER fails for a problem with the archive: a structural refusal lands in error {code: ZIP_*, message}; each row carries skipped with the reason its payload was not verified — a design-time skip with an agreeing local header counts in skippedCount and does not fail the archive; an entry whose method has no codec here (skipped: 'unsupported-method') or an encrypted entry whose local header contradicts the central directory is FAILED — the engine's verdict verbatim. Only caller mistakes (bad limits, bad input) are isError. entries:'failed' keeps the rows you act on; verbosity:'summary' keeps the verdict + counts. Verify before you trust: run it on any archive from an untrusted source before extract_zip.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "verify_zip"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Dot-paths to keep, after verbosity (e.g. ['entryCount', 'entries.name']); unmatched ones are listed in _meta.unmatchedFields. | |
| limits | No | Per-call override of zipnative's security bounds (CWE-400/409); absent keys keep the engine defaults (describe_engine.defaultLimits). A value above its operator ceiling is LIMIT_CEILING_EXCEEDED. Raise only for trusted input. | |
| entries | No | Which per-entry rows to return: 'all' (default), only 'failed' (ok:false, not skipped), only 'skipped', or 'none' (verdict + counts only). | all |
| zipPath | No | Archive path relative to the ZIPNATIVE_MCP_OUTPUT_DIR sandbox (container extensions: .zip .jar .docx .epub …). Exclusive with zipBase64; saves re-sending bytes between calls. | |
| verbosity | No | 'summary': scalar verdict fields only (the token-frugal form). | full |
| zipBase64 | No | Archive bytes, base64 (≤ 128 MiB decoded). Exclusive with zipPath. | |
| maxEntries | No | Cap on returned rows (the counts always cover every entry); `entriesTruncated` flags a cut. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| error | No | The structural refusal when the archive could not even be opened (frozen ZIP_* code + engine message), else null. | |
| entries | No | ||
| entryCount | No | ||
| diagnostics | No | Non-fatal engine concerns (de-duplicated by code + entry, ≤ 200; codes in describe_engine.diagnosticCodes). Empty for a clean archive. | |
| failedCount | No | Entries that fail the archive: a CRC / size / local-header mismatch, an unknown compression method, or a design-time skip whose local header contradicts the central directory. | |
| skippedCount | No | Entries that could not be verified by design (encrypted, stream-only codec) and whose local header agrees with the central directory. | |
| verifiedCount | No | Entries that passed every check. | |
| diagnosticCount | No | summary only: number of diagnostics. | |
| entriesTruncated | No | ||
| diagnosticsTruncated | No | Present (true) when more than 200 distinct diagnostics were raised and the list was cut. |