Skip to main content
Glama
zipnative-mcp

zipnative-mcp

Verify archive integrity (one call, never throws for archive problems)

verify_zip
Read-onlyIdempotent

Check 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

NameRequiredDescriptionDefault
fieldsNoDot-paths to keep, after verbosity (e.g. ['entryCount', 'entries.name']); unmatched ones are listed in _meta.unmatchedFields.
limitsNoPer-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.
entriesNoWhich per-entry rows to return: 'all' (default), only 'failed' (ok:false, not skipped), only 'skipped', or 'none' (verdict + counts only).all
zipPathNoArchive path relative to the ZIPNATIVE_MCP_OUTPUT_DIR sandbox (container extensions: .zip .jar .docx .epub …). Exclusive with zipBase64; saves re-sending bytes between calls.
verbosityNo'summary': scalar verdict fields only (the token-frugal form).full
zipBase64NoArchive bytes, base64 (≤ 128 MiB decoded). Exclusive with zipPath.
maxEntriesNoCap on returned rows (the counts always cover every entry); `entriesTruncated` flags a cut.

Output Schema

NameRequiredDescriptionDefault
okNo
errorNoThe structural refusal when the archive could not even be opened (frozen ZIP_* code + engine message), else null.
entriesNo
entryCountNo
diagnosticsNoNon-fatal engine concerns (de-duplicated by code + entry, ≤ 200; codes in describe_engine.diagnosticCodes). Empty for a clean archive.
failedCountNoEntries 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.
skippedCountNoEntries that could not be verified by design (encrypted, stream-only codec) and whose local header agrees with the central directory.
verifiedCountNoEntries that passed every check.
diagnosticCountNosummary only: number of diagnostics.
entriesTruncatedNo
diagnosticsTruncatedNoPresent (true) when more than 200 distinct diagnostics were raised and the list was cut.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed21 schema fields changedv1.0.1
    • changedInput schema / properties / fields / description
      Previous value: -"Dot-path projection applied after verbosity (e.g. ['entryCount', 'entries.name']); array segments map over elements; unmatched paths are reported in _meta.unmatchedFields."New value: +"Dot-paths to keep, after verbosity (e.g. ['entryCount', 'entries.name']); unmatched ones are listed in _meta.unmatchedFields."
    • addedInput schema / properties / fields / items / pattern
      Added value: +"^(?!(?:[^.]*\\.)*(?:__proto__|constructor|prototype)(?:\\.|$)).+$"
    • changedInput schema / properties / limits / description
      Previous value: -"Override zipnative's named security bounds for this call (CWE-400 / CWE-409 guards). Every key is optional; absent keys keep the engine defaults (maxEntries 100000, maxEntryUncompressedSize 1 GiB, maxTotalUncompressedSize 8 GiB, maxCompressionRatio 1024, maxNameBytes 4096, maxExtraFieldBytes 65535, maxCommentBytes 65535, maxCentralDirectoryBytes 256 MiB). Values above the operator ceilings (ZIPNATIVE_MCP_MAX_UNCOMPRESSED_BYTES, ZIPNATIVE_MCP_MAX_ENTRIES) are refused with LIMIT_CEILING_EXCEEDED. Raise a bound for trusted input only."New value: +"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."
    • changedInput schema / properties / limits / properties / maxCentralDirectoryBytes / description
      Previous value: -"Maximum central-directory size in bytes."New value: +"Bytes."
    • changedInput schema / properties / limits / properties / maxCommentBytes / description
      Previous value: -"Maximum comment length in bytes."New value: +"Bytes."
    • changedInput schema / properties / limits / properties / maxCompressionRatio / description
      Previous value: -"Maximum declared uncompressed/compressed ratio for entries >= 1 KiB compressed (zip-bomb guard)."New value: +"Declared ratio (entries ≥ 1 KiB compressed)."
    • changedInput schema / properties / limits / properties / maxEntries / description
      Previous value: -"Maximum central-directory entry count."New value: +"Entries."
    • addedInput schema / properties / limits / properties / maxEntryCompressedSize
      Added value: +{
      +  "description": "Bytes, one compressed payload fetched by the byte-range reader (access range).",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / limits / properties / maxEntryUncompressedSize / description
      Previous value: -"Maximum decompressed size of one entry, bytes."New value: +"Bytes, one entry decompressed."
    • changedInput schema / properties / limits / properties / maxExtraFieldBytes / description
      Previous value: -"Maximum extra-field block length in bytes."New value: +"Bytes."
    • changedInput schema / properties / limits / properties / maxNameBytes / description
      Previous value: -"Maximum entry-name length in bytes."New value: +"Bytes."
    • changedInput schema / properties / limits / properties / maxTotalUncompressedSize / description
      Previous value: -"Maximum total decompressed size across an extraction, bytes."New value: +"Bytes, all entries decompressed."
    • changedInput schema / properties / verbosity / description
      Previous value: -"'summary' returns only the scalar verdict fields (drops arrays and payloads) — the token-frugal form."New value: +"'summary': scalar verdict fields only (the token-frugal form)."
    • changedInput schema / properties / zipBase64 / description
      Previous value: -"The archive bytes as base64 (exactly once; a data: URI prefix is tolerated). Exclusive with zipPath. Decoded size ≤ 128 MiB."New value: +"Archive bytes, base64 (≤ 128 MiB decoded). Exclusive with zipPath."
    • changedInput schema / properties / zipPath / description
      Previous value: -"Relative path of an archive inside the ZIPNATIVE_MCP_OUTPUT_DIR sandbox (no absolute paths, no '..'; container extensions only: .zip .jar .docx .epub …). Exclusive with zipBase64. Lets a create/modify → verify/extract chain avoid re-sending the bytes."New value: +"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."
    • changedOutput schema / properties / diagnostics / description
      Previous value: -"Non-fatal conformance concerns the engine raised while parsing or writing (de-duplicated by code + entry, at most 200). Empty for a clean archive. Codes: ZIP_PREPENDED_DATA, ZIP_MULTIPLE_EOCD, ZIP_NAME_MISMATCH, ZIP_UNICODE_PATH_CONFLICT, ZIP_INVALID_UTF8_NAME, ZIP_DUPLICATE_NAME, ZIP_EXTRA_FIELD_MALFORMED, ZIP_ZIP64_EXTRA_IGNORED, ZIP_TIMESTAMP_NOT_PINNED, ZIP_NONDETERMINISTIC_CODEC, ZIP_DEAD_BYTES_RATIO."New value: +"Non-fatal engine concerns (de-duplicated by code + entry, ≤ 200; codes in describe_engine.diagnosticCodes). Empty for a clean archive."
    • addedOutput schema / properties / diagnosticsTruncated
      Added value: +{
      +  "description": "Present (true) when more than 200 distinct diagnostics were raised and the list was cut.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / entries / items / properties / skipped / description
      Added value: +"Why the payload was not verified (zipnative 1.1.0 adds unsupported-method, which still fails the archive)."
    • changedOutput schema / properties / entries / items / properties / skipped / enum
      Previous value: -[
      -  "encrypted",
      -  "stream-only-codec"
      -]New value: +[
      +  "encrypted",
      +  "stream-only-codec",
      +  "unsupported-method"
      +]
    • changedOutput schema / properties / failedCount / description
      Previous value: -"Entries with a CRC / size / local-header mismatch."New value: +"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."
    • changedOutput schema / properties / skippedCount / description
      Previous value: -"Entries that could not be verified (encrypted, stream-only codec)."New value: +"Entries that could not be verified by design (encrypted, stream-only codec) and whose local header agrees with the central directory."
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the tool never throws for archive problems, structural refusals land in `error` with ZIP_* codes, skipped entries and FAILED conditions are defined, and only caller mistakes (bad limits/input) produce isError. This discloses failure semantics and verdict logic that readOnly/idempotent annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded: the first clause states the tool's role, then semantics follow in logical order. It is long and slightly run-on, but most sentences carry distinct information needed for this complex verification tool.

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 an output schema already present, the description still supplies the missing behavioral contract: error shape, skipped vs failed rules, and caller-error distinction. With seven parameters including a nested limits object, this is complete enough for an agent to invoke it 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 coverage is 100%, so the schema already documents fields, limits, entries, and verbosity. The description adds some interpretation ('entries:failed keeps the rows you act on', summary keeps verdict + counts) but largely restates what the schema provides, so baseline 3 is appropriate.

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?

States a specific verb and resource ('Deep verification in one call' of an archive's integrity) and distinguishes itself from siblings by naming extract_zip and positioning verification before extraction. An agent can tell this is the deep, non-destructive integrity check rather than a listing or extraction tool.

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?

Explicitly says to 'run it on any archive from an untrusted source before extract_zip', giving a clear condition and a named sibling to precede. It does not explicitly cover when-not or contrast with lighter siblings like inspect_zip, so it stops short of the full 5.

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