Skip to main content
Glama

categorize_strings

Extract strings from binary files and classify them into semantic categories such as anti-debug, hardware IDs, crypto, network, and more, enabling quick identification of code behaviors.

Instructions

Extract strings from path and bucket them into semantic categories.

The categorization vocabulary is loaded from data/drm-indicators.yaml::string_categories at MCP-server load time. Two categories (anti_debug, hwid) inherit their keyword lists from the existing catalog sections via a seed_from pointer; the rest have inline keyword lists. When a future agent adds a new HWID API to hwid_apis.high_signal, the hwid category picks it up on next MCP-server reload with zero Python change.

The return shape is a strict superset of extract_strings:

::

{
  "path": "...",
  "min_length": 5,
  "totals":   {"ascii_extracted": N, "utf16le_extracted": N,
               "deduplicated": N, "categorized": N},
  "truncated": {"input": bool, "per_category": bool,
                "per_encoding": bool},
  "by_category": {
    "anti_debug": {"count": N, "samples": [{"string":..., "section":...}, ...]},
    "hwid":       {"count": N, "samples": [...]},
    "crypto":     {"count": N, "samples": [...]},
    "network":    {"count": N, "samples": [...]},
    "registry":   {"count": N, "samples": [...]},
    "process":    {"count": N, "samples": [...]},
    "file":       {"count": N, "samples": [...]},
    "fingerprint": {"count": N, "samples": [...]},
    "activation":  {"count": N, "samples": [...]},
    "obfuscation": {"count": N, "samples": [...]},
    "misc":        {"count": N, "samples": [...]}
  },
  "ascii_capped": [...],          # backward-compat with extract_strings
  "utf16le_capped": [...],
  "uncategorized_sample": [...]   # 50 misc strings (helps spot missing categories)
}

On large binaries (e.g. a 500+ MB Unity IL2CPP GameAssembly.dll wrapped by an encrypted-VM bytecode interpreter), pass skip_sections=[".idata", ".xtls", ".xpdata", ".udata", ".xdata", ".didata", ".ecode", ".00cfg"] to skip the encrypted-VM bytecode regions. Those sections contain no readable strings; the categorization result is the same and the memory footprint drops dramatically.

Categories are descriptive — they describe observable string content, not specific commercial products.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
min_lengthNo
categoriesNo
include_miscNo
max_per_categoryNo
samples_per_categoryNo
skip_sectionsNo
Behavior4/5

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

No annotations are provided, so the description carries full burden. It details the return shape, categorization vocabulary source, and performance considerations (skip sections). It does not cover auth or destructive behavior, but the tool is read-only by nature.

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?

The description is front-loaded with the main purpose and uses a structured format with a code block for the return shape. Some details (e.g., YAML loading mechanism) are slightly verbose but not wasteful.

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

Completeness3/5

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

Given 7 parameters and no output schema, the description provides a detailed output structure and behavior for some parameters, but fails to document several key parameters. The return shape is well-specified, partially compensating for the lack of output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. Only `path`, `min_length`, and `skip_sections` are explained; the other 4 parameters (`categories`, `include_misc`, `max_per_category`, `samples_per_category`) are not mentioned, leaving a significant gap.

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 it extracts strings and buckets them into semantic categories, with a specific verb and resource. It distinguishes itself from sibling tool `extract_strings` by noting it is a strict superset.

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 implies usage by contrasting with `extract_strings` and provides a practical example for large binaries with `skip_sections`. It does not explicitly state when not to use, but the differentiation is clear.

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

Install Server

Other Tools

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/Heretek-RE/re-lief'

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