Skip to main content
Glama

heap_snapshot

Capture a complete heap snapshot to analyze active chunks. Filter by caller, action, or address range to inspect heap layout after key steps.

Instructions

获取完整的堆状态快照。

在关键步骤后调用以验证完整堆布局。 返回所有活跃 chunk 的地址、大小和来源信息。

Args: caller_contains: 可选,按 caller 子串过滤活跃 chunk。 action_contains: 可选,按 action 子串过滤活跃 chunk。 addr_start: 可选,地址范围起点。 addr_end: 可选,地址范围终点。 around_addr: 可选,查看某地址附近的活跃 chunk。 around_size: around_addr 半径。 limit: 最多返回多少条。 include_raw: 是否附带 Raw Snapshot JSON。

Returns: 格式化的堆快照,包含所有活跃 chunk 信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
addr_endNo
addr_startNo
around_addrNo
around_sizeNo
include_rawNo
action_containsNo
caller_containsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It explains the return (formatted snapshot with address/size/source) and parameter effects. It lacks explicit statement that this is a read-only operation with no side effects, but the snapshot nature implies non-destructiveness. Still, a brief clarification would improve transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a purpose sentence, usage hint, return line, then parameter list. Every sentence adds value with no redundancy. It is front-loaded with the key purpose and ends with necessary parameter details.

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?

Given 8 parameters, no annotations, and presence of an output schema (implied), the description covers core functionality and parameter semantics. It could explicitly compare with sibling heap tools to reduce ambiguity, but overall it provides sufficient information for an agent to understand and use the tool correctly.

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

Parameters5/5

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

Schema coverage is 0%, so description fully compensates. It adds detailed meaning for all 8 parameters in the Args block, explaining their filtering purposes (e.g., '按 caller 子串过滤活跃 chunk'). This is far beyond the bare schema and essential for correct agent invocation.

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 gets a complete heap state snapshot (特定动词+资源: '获取完整的堆状态快照'), and distinguishes from sibling tools by emphasizing '所有活跃 chunk' (all active chunks) for full layout verification, which is different from specific queries like heap_find_chunk or heap_bins_json.

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 explicitly mentions '在关键步骤后调用以验证完整堆布局' (call after key steps to verify full heap layout), providing clear when-to-use guidance. However, it does not explicitly state when not to use this tool or mention alternatives like heap_get_state or heap_query_delta, though sibling context implies they exist.

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/Aiyakami/PWN-MCP'

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