Skip to main content
Glama

Declare Stack

declare_stack

Define one or more stack variables at specified offsets in IDA Pro functions to label local storage and clarify decompiled code during reverse engineering.

Instructions

Create stack variable(s) at specified offset(s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesList of {function_address, offset, name, type?, size?}
timeoutNoTimeout in seconds
instance_idNoInstance id override

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.7

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, yet it only says 'Create'. It does not disclose whether existing variables at the same offset are overwritten, whether the operation requires an active IDB/session, or whether failures are atomic across the items array.

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?

A single front-loaded sentence with no filler, which is appropriate for a narrow tool. It is terse but not wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a mutation tool with no annotations and no output schema, so the description should explain effects, overwrite semantics, and expected result. Instead it stops at the action, leaving the agent unable to predict consequences of a partial or duplicate declaration.

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%, so items, timeout, and instance_id are already documented in the schema. The description echoes the offset targeting but adds no syntax, valid ranges, or interaction details beyond what the schema provides; baseline 3 applies.

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 (Create) and resource (stack variable(s)) with a scoping qualifier (at specified offsets). The resource itself distinguishes it from declare_struct/declare_enum siblings, though it does not explicitly contrast with stack_frame or delete_stack.

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

Usage Guidelines2/5

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

There is no guidance on when to use this over stack_frame (inspection) or delete_stack (removal), nor any stated prerequisites such as needing a loaded database or an analyzed function. Usage must be inferred entirely from the name.

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