Skip to main content
Glama

Add Segment

add_segment

Creates a new memory segment in an IDA Pro database by specifying start address, size, name, permissions, bitness, and segment class.

Instructions

Add a new memory segment to the IDB.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "start_ea": "<start_ea>",
      "size": "<size>",
      "name": "<name>"
    },
    "name": "add_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesSegment name (e.g. '.text', 'my_seg')
permNoPermission string: combination of r/w/x (e.g. 'rwx', 'r-x')rw-
sizeYesSegment size in bytes
bitnessNoAddress size: 16, 32, or 64
timeoutNoTimeout in seconds
start_eaYesSegment start address (hex string, e.g. '0x401000')
seg_classNoSegment class (e.g. 'CODE', 'DATA', 'BSS')DATA
instance_idNoREQUIRED whenever more than one database is open (from open_database's result or list_databases()); optional only while exactly one instance is live.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.1
    • changedInput schema / properties / instance_id / description
      Previous value: -"Instance id override"New value: +"REQUIRED whenever more than one database is open (from open_database's result or list_databases()); optional only while exactly one instance is live."
  2. First observedv0.9.7

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden for a mutation tool and adds nothing: no mention of permission requirements, what happens if the range overlaps existing segments, whether the segment is persisted, or error behavior. Only the bare action is disclosed.

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

Conciseness3/5

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

The single sentence is front-loaded and wastes no words, but brevity here reflects under-specification rather than disciplined editing for an 8-parameter mutation tool.

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?

For a mutating tool with 8 parameters, no annotations, and no output schema, the definition leaves out preconditions, side effects, and failure modes. The strong schema offsets some of this, but the description itself is far from 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%, including examples for name, perm, start_ea, bitness, and the multi-instance rule for instance_id, so the schema already documents every parameter. The description adds no syntax, ordering, or constraint detail beyond it, which matches the baseline 3.

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 and resource ('Add a new memory segment to the IDB'), which is clearly distinct from delete_segment and list_segments. It does not explicitly name siblings or scope the tool's role in a workflow, but the operation is unambiguous.

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?

No guidance on when to create a segment versus using make_data, list_segments first to check for overlaps, or whether the database must be saved afterwards. The agent must infer all preconditions from the schema alone.

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