Skip to main content
Glama

run_pakfile_extract

Extract files from a compiled map's embedded pakfile ZIP into a directory, such as packed cubemaps or soundscripts, with glob filtering, safe path handling and overwrite control.

Instructions

Extracts files from a compiled map's embedded pakfile (lump 40, a plain ZIP) into a directory. read_pakfile lists what is in there; this is what gets it out -- a packed cubemap to convert, a soundscript to read, a custom material to inspect. Refuses an entry whose name would escape the destination rather than sanitising it, and never overwrites unless told to. Needs the Python sidecar; see health.

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": {
      "bsp": "<bsp>",
      "into": "<into>"
    },
    "name": "run_pakfile_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
bspYesPath to the .bsp, absolute or relative to the repo root.
intoYesDirectory to write into. Created if it is not there.
limitNoHow many files to write. A production map packs ten thousand.
confirmNoRequired (true) to run this tool: it writes or executes.
patternNoGlob over the in-map path, case-insensitive: `materials/maps/*/c*.vtf` for the cubemaps. Absent extracts everything, up to `limit`.
overwriteNoReplace files that are already there. Off by default.

Output Schema

NameRequiredDescriptionDefault
bspYes
intoYes
noteYes
bytesYes
countYes
matchedYes
refusedYes
writtenYes
skippedOverLimitYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A4.4/5.0
Behavior4/5

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

With only a title annotation, the description carries the disclosure burden well: it says path-escaping entries are refused rather than sanitised and that nothing is overwritten unless told to. It omits any mention of the write/confirm gate and of failure modes when the sidecar is absent, so it stops short of complete.

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?

Front-loaded with what the tool does, then the sibling routing, then safety behaviour and the dependency, in four tight clauses with no filler. The concrete artifact examples earn their place by making the use case recognizable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Return shape is covered by the output schema and all six parameters are documented in the schema, so the description's remaining job is behavioural, which it largely does. The gap is that a disk-writing tool requiring confirm never mentions confirmation or its failure path in prose.

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 baseline is 3; the description only reinforces the overwrite behaviour already documented in the schema and adds nothing on bsp, into, limit, or pattern. It neither compensates nor detracts.

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: 'Extracts files from a compiled map's embedded pakfile (lump 40, a plain ZIP) into a directory.' It also distinguishes itself from the closest sibling by name, making the boundary with read_pakfile unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: 'read_pakfile lists what is in there; this is what gets it out', then names concrete downstream uses (cubemap to convert, soundscript to read, material to inspect). It also states a prerequisite ('Needs the Python sidecar; see health') that gates correct invocation.

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