Skip to main content
Glama
Nizoka

zipnative-mcp

Sanitize entry paths (the traversal gate)

sanitize_entry_paths
Read-onlyIdempotent

Sanitize archive entry names by resolving each to a safe relative path or null when a rule blocks it. Use this to guard extraction or filesystem writes against path traversal, absolute paths, and reserved names.

Instructions

Apply zipnative's single traversal gate sanitizeEntryPath() to a list of names: the safe '/'-separated relative form each maps to (join it under your extraction root — never the raw name), or null with the rule that fired (empty, NUL byte, absolute, drive letter, UNC, '..' traversal, NTFS alternate data stream ':', Windows reserved device name CON/NUL/COM1…). Use it when you extract with another tool or plan an external filesystem sink. No archive needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYesEntry names to check (as stored in an archive).
fieldsNoDot-path projection applied after verbosity (e.g. ['entryCount', 'entries.name']); array segments map over elements; unmatched paths are reported in _meta.unmatchedFields.
verbosityNo'summary' returns only the scalar verdict fields (drops arrays and payloads) — the token-frugal form.full

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
resultsNo
rejectedCountNo
rejectedNamesNosummary only: the rejected names.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

The description explains the transformation and the null cases (empty, NUL byte, absolute, etc.), which clarifies the tool's behavior. The readOnlyHint, idempotentHint, and destructiveHint annotations already indicate no side effects, and the description does not contradict them. It adds value by detailing the return format and failure modes.

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

Conciseness5/5

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

The description is concise yet information-dense. It packs the core behavior, the return format, the list of invalid patterns, and usage guidance into two sentences without redundancy or unnecessary detail. It is well-structured and front-loaded with the main action.

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 that an output schema exists (not shown), the description still provides essential context about the return values (safe path or null with rule) and the tool's role in extraction workflows. It covers the main use case, the nature of the operation, and the absence of archive dependency. No critical information is missing for an agent to decide when and how to call it.

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?

The schema provides descriptions for all three parameters—names, fields, and verbosity—covering 100% of them. The description does not substantially add meaning beyond the schema for parameters; it mostly reiterates the names parameter's purpose and the output format. Therefore, 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?

The description clearly states the tool applies a sanitization function to a list of entry names, returning safe relative paths or null with the specific rule that fired. It also names the exact function (sanitizeEntryPath) and explicitly says it is for extraction or external filesystem sinks, distinguishing it from sibling tools like extract_zip or read_zip_entry.

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?

The description gives explicit guidance on when to use the tool ('Use it when you extract with another tool or plan an external filesystem sink') and notes that no archive is needed. It could be slightly more explicit about when not to use it (e.g., when you only need to inspect paths without sanitization), but the provided context is sufficient.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nizoka/zipnative-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server