Skip to main content
Glama

dump_api_surface

Dump export names, ordinals, imports, and versions from reference DLLs into JSON and Markdown to define the target contract for an OS rebuild.

Instructions

Dump the interface surface of a directory of reference DLLs: export names, ordinals, imports, versions -> JSON + MD. This is the rebuild's target contract.

IMPORTANT (moderate guardrails): keep the inspected copies OUTSIDE the repo (e.g. ~/inspect/); only the generated surface JSON/MD goes into workspace/api/.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outYes
patternNo*.dll
src_dirYes
workspaceNo
include_exeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries full burden, and it does disclose real side-effect context: output artifacts are JSON + MD and only those land in workspace/api/, while inspected copies must stay outside the repo. It still omits whether the tool writes/deletes anything else, permission needs, or failure behavior for non-PE inputs.

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 core action and output format in the first sentence, with the guardrail clearly set apart. Nearly every clause earns its place, though the arrow notation and parenthetical label are slightly terse.

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?

The output schema exists, so return values need no explanation, and the guardrail adds genuine operational context. But for a five-parameter tool with zero schema coverage and no annotations, the undocumented optional parameters (pattern, include_exe, workspace) leave the definition short of what an agent needs to call it confidently.

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 all five parameters rely on the description, which only partially compensates. It clarifies src_dir (a directory of reference DLLs) and hints at the output destination, but never explains pattern, include_exe, or workspace, leaving half the surface undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Dump) and resource (interface surface of a directory of reference DLLs) and enumerates exactly what is extracted: export names, ordinals, imports, versions, emitted as JSON + MD. The one gap is that it never distinguishes itself from the closely related analyze_pe sibling, so an agent could reasonably confuse the two.

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

Usage Guidelines3/5

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

Framing it as 'the rebuild's target contract' implies it belongs early in the rebuild workflow (before stub/compat-layer generation), which is useful contextual guidance. However, it never states when to prefer this over analyze_pe or iso_inspect, nor any prerequisites for calling it.

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