Skip to main content
Glama

pwndbg_try_free

Simulate glibc's free() on a given address to determine which checks pass or fail, aiding in debugging heap exploits.

Instructions

Simulate what would happen if free() were called on an address.

pwndbg command: try_free Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap

Walks through glibc's free() logic and reports which checks would pass or fail. Invaluable for debugging heap exploits — shows exactly why a crafted chunk would or wouldn't pass free()'s validation.

Args: session_id: The UUID of the session. addr: Address to simulate freeing.

See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
addrYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided. Description discloses that it walks through glibc's free() logic and reports checks, implying it is a simulation without side effects. Lacks explicit mention of read-only nature but overall transparent.

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 purpose, followed by meta info and a brief value statement. It is concise without fluff, though the Args section could be integrated more tightly.

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 no annotations and an existing output schema, the description does not explain return values or side effects. It provides adequate context for a heap debugging tool but lacks details on input format and output structure.

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?

With 0% schema description coverage, the description provides Args entries for session_id and addr, adding that session_id is UUID and addr is an address. However, it lacks details on format (e.g., hex for addr) and does not describe output, so only basic semantics.

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 the tool simulates free() on an address, using specific verb 'simulate' and resource 'free() on an address'. It distinguishes from siblings by focusing on free() simulation, not just heap inspection.

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 explains it is invaluable for debugging heap exploits, showing when free() would pass or fail. It provides clear context but does not explicitly exclude alternative tools or state when not to use.

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/Micro-Evaluation-Group/pwndbg-lldb-mcp'

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