Skip to main content
Glama

Inspect Rust Cpp Binary

inspect_rust_cpp_binary
Idempotent

Extract Rust compiler metadata and C++ RTTI/vtable layouts from local ELF, Mach-O, or PE binaries without executing them or requiring external toolchains.

Instructions

Inspect a local ELF, Mach-O, or PE binary for Rust compiler metadata (rustc version, commit hash, crate dependencies, recovered .rs source files, core::panicking::Location records, and demangled v0/legacy Rust symbols) and C++ RTTI / vtable class layouts (Itanium and MSVC ABI typeinfo, base class hierarchies, virtual method tables, and demangled C++ symbols) in pure TypeScript without executing the target or requiring external toolchains.

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",
      "max_symbols": 500,
      "max_panic_locations": 500
    },
    "name": "inspect_rust_cpp_binary"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute filesystem path to the local ELF, Mach-O, or PE binary to inspect.
max_symbolsNoMaximum number of demangled Rust/C++ symbols to return (default 500).
max_panic_locationsNoMaximum number of Rust core::panicking::Location records to return (default 500).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare idempotent, non-destructive, non-open-world behavior, and the description adds genuinely useful context beyond them: analysis is pure TypeScript and the target is never executed, so no sandbox or runtime risk. It still omits failure modes (what happens on a non-ELF/Mach-O/PE file or an unreadable path) and any size or performance constraints.

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 and accepted formats, then a coherent enumeration of what is extracted. It is a single dense sentence with paired parentheticals, which makes it slightly heavy to scan but contains no filler or repetition.

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?

With no output schema, the description usefully pre-declares the shape of results (compiler metadata, dependencies, symbols, RTTI hierarchies), so an agent knows what it can retrieve. Gaps remain around error behavior and whether findings are returned as structured sections or flat lists, but for a read-only static analyzer this is close to complete.

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% and every parameter carries its own description including defaults and ranges, so the description adds no parameter-level detail. The mention of panic Location records and demangled symbols loosely maps to max_panic_locations and max_symbols but gives no truncation semantics. Baseline 3 applies.

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 (Inspect) against specific resources (local ELF, Mach-O, PE binaries) and enumerates the exact artifact families recovered: rustc version, crate dependencies, .rs source paths, panic Location records, demangled Rust symbols, and C++ RTTI/vtable layouts. The Rust+C++ language scope distinguishes it from the Go, Python, and generic layout siblings without needing to name them.

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?

Implies usage through 'local ... binary' and 'without executing the target or requiring external toolchains', which tells an agent this is a static, offline inspector. However, it never states when to pick this over inspect_macho or inspect_binary_layout, nor any exclusion such as binaries with no Rust/C++ content, so the agent must infer routing.

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