Skip to main content
Glama

heap_query_log

Query heap operation logs with filters for caller, address, action, or event types to debug memory allocation events.

Instructions

查询 heap_logger 的完整文本日志 /tmp/heaplog.txt,并可按地址/caller/action 过滤。

这个工具用于“只看某一段/某个 source 点附近日志”,不要求当前必须 处于 heap action。heaplog.txt 每行是 JSON 事件。

Args: caller_contains: caller 符号子串过滤。 action_contains: action 名称子串过滤。 text_contains: 原始 JSON 行文本子串过滤。 addr_start: 地址范围起点。 addr_end: 地址范围终点。 around_addr: 中心地址。 around_size: 中心地址半径。 event_types: 类型/分组过滤,如 "malloc,calloc,free"。 last: 返回最后 N 条匹配事件。

Returns: 过滤后的 heaplog 风格文本。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lastNo
addr_endNo
addr_startNo
around_addrNo
around_sizeNo
event_typesNo
text_containsNo
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 the full burden. It discloses that it reads from /tmp/heaplog.txt, returns filtered text, and lists all parameters. No destructive behavior is implied, so it's 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 well-structured with a main purpose, context, and bullet-pointed args. It front-loads the key information, though the parameter list could be slightly trimmed. Still, it's clear and organized.

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 the complexity (9 parameters, no required), the description covers all parameters and their roles. It also mentions the file location and return format. With an output schema present, the return description is sufficient.

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?

The description provides detailed explanations for all 9 parameters via the Args section, significantly adding meaning beyond the bare schema (which has 0% description coverage). Each parameter's use and default are clear.

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 queries the full text log from a specific file and filters by address/caller/action. It distinguishes itself from sibling tools by focusing on log querying rather than other heap operations.

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 provides context about when to use the tool (viewing logs around a segment/source point) and notes it doesn't require being in a heap action. It lacks explicit when-not-to-use or alternatives but is clear enough.

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