Skip to main content
Glama

Inspect Pe Resources

inspect_pe_resources
Idempotent

Inspect a local PE32/PE32+ image's complete bounded resource tree without execution or a disassembler; returns resource IDs/names, payload ranges, SHA-256 hashes, and icon candidates.

Instructions

Inspect one explicit local PE32/PE32+ image's complete bounded type/name/language resource tree without executing it or opening a disassembler. Returns numeric IDs versus original UTF-16 names, directory/data-entry file locations, payload RVA/file ranges, complete SHA-256 hashes and static RT_GROUP_ICON image-resource candidates. Language fallback, image decoding and actual shell/window loading remain unobserved. Reads a stable regular file; malformed or ambiguous mappings, non-identical overlapping ranges and exhausted budgets return no partial success. Portable on supported Node hosts; no Windows SDK or engine installation required.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "/artifacts/application.exe"
    },
    "name": "inspect_pe_resources"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute filesystem path to a PE image
max_entriesNoMaximum resource directory entries to examine; exceeding the budget fails without partial success
max_file_bytesNoMaximum stable artifact bytes to read (default 64 MiB)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: it reads a stable regular file, performs no execution, requires no Windows SDK/engine, and deterministically fails with no partial success on malformed/ambiguous mappings, non-identical overlapping ranges, or exhausted budgets — plus explicit portability limits on Node hosts. One tension worth noting: annotations declare readOnlyHint=false while the description frames the tool as a pure read ('Reads a stable regular file', 'without executing it'); this reads as a conservative annotation rather than a real write path, so it is flagged as a mismatch but not a contradiction. Determinism, idempotency and failure semantics are otherwise disclosed well beyond what the annotation set conveys.

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?

Front-loaded with the verb, resource and a crucial 'no execution' constraint, then moves to outputs, limits and failure modes. It is dense but every sentence carries information; only the closing portability/dependency sentence is a lower-value add and the jargon load is high for a single paragraph.

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?

With no output schema, the description compensates by enumerating the concrete return contents, and for a read-only inspection tool with destructiveHint=false no write-safety caveats are needed. Failure behavior, budget exhaustion, determinism and platform constraints are all covered, leaving no material gap for an agent deciding whether 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?

Schema description coverage is 100%, so path, max_file_bytes and max_entries are already documented with defaults and bounds. The description reinforces meaning by calling the tree 'bounded' and stating that exhausted budgets fail without partial success, but it adds no new syntax, units, or edge-case guidance beyond the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

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 opening clause names a specific verb (Inspect), a specific resource (one explicit local PE32/PE32+ image's complete type/name/language resource tree), and its scope (bounded, single image, no execution, no disassembler). It enumerates exactly what is returned (numeric IDs vs UTF-16 names, directory/data-entry locations, RVA/file ranges, SHA-256, RT_GROUP_ICON candidates), so an agent can distinguish it from generic binary inspectors like inspect_macho or inspect_binary_layout without opening any schema.

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?

Clear context for when to reach for it: static resource-tree extraction from a PE image, explicitly contrasted with executing the binary or opening a disassembler. It also carves out what it will NOT resolve (language fallback, image decoding, shell/window loading), which tells the agent when the result will be insufficient. It stops short of naming a sibling alternative for those fallback/decoding needs, which is the only missing piece.

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

Deploy Server

Other Tools