Skip to main content
Glama

lldb_images

Read-onlyIdempotent

List loaded executable images and shared libraries with their addresses and file paths during debugging sessions.

Instructions

List loaded executable images and shared libraries.

Shows:
- Main executable
- Shared libraries (.so, .dylib, .dll)
- Load addresses
- File paths

Args:
    params: ImageListInput with executable and optional filter

Returns:
    str: List of loaded images with addresses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main asynchronous handler function for the 'lldb_images' tool. It creates an LLDB target from the executable, runs 'image list' command, optionally filters the output by pattern, and returns formatted markdown output listing loaded images with addresses.
    async def lldb_images(params: ImageListInput) -> str:
        """List loaded executable images and shared libraries.
    
        Shows:
        - Main executable
        - Shared libraries (.so, .dylib, .dll)
        - Load addresses
        - File paths
    
        Args:
            params: ImageListInput with executable and optional filter
    
        Returns:
            str: List of loaded images with addresses
        """
        commands = [f"target create {params.executable}", "image list"]
    
        result = _run_lldb_script(commands)
    
        output = result["output"]
    
        # Apply filter if specified
        if params.filter_pattern and result["success"]:
            filtered_lines = [
                line for line in output.split("\n") if params.filter_pattern.lower() in line.lower()
            ]
            output = "\n".join(filtered_lines) if filtered_lines else "No images matching filter"
    
        return f"## Loaded Images\n\n```\n{output.strip()}\n```"
  • Pydantic BaseModel schema defining the input parameters for the lldb_images tool: required 'executable' path and optional 'filter_pattern' for matching image names.
    class ImageListInput(BaseModel):
        """Input for listing loaded images/modules."""
    
        model_config = ConfigDict(str_strip_whitespace=True)
    
        executable: str = Field(..., description="Path to the executable", min_length=1)
        filter_pattern: str | None = Field(default=None, description="Filter images by name pattern")
  • The @mcp.tool decorator that registers the lldb_images function as an MCP tool with name 'lldb_images' and metadata annotations indicating it's read-only, non-destructive, idempotent, and not open-world.
    @mcp.tool(
        name="lldb_images",
        annotations={
            "title": "List Loaded Images",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": False,
        },
    )
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, indicating a safe, non-mutating operation. The description adds context by specifying what is listed (executable images, shared libraries, addresses, paths) and mentions filtering via 'filter_pattern', which provides useful behavioral details beyond annotations. However, it does not cover aspects like performance, rate limits, or error conditions.

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 well-structured and front-loaded with the core purpose. Each sentence adds value: the first states the action, the bullet points detail what is shown, and the Args/Returns sections provide necessary context without redundancy. It is appropriately sized with zero waste.

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 tool's moderate complexity, rich annotations (readOnlyHint, idempotentHint), and the presence of an output schema (returns str), the description is mostly complete. It covers the purpose, parameters, and return type adequately. However, it lacks explicit usage guidelines and detailed behavioral context, which slightly reduces completeness for an agent.

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 0%, but the description compensates by explaining the 'params' argument as 'ImageListInput with executable and optional filter'. It clarifies that 'executable' is required and 'filter_pattern' is optional for filtering by name, adding meaning beyond the schema. However, it does not detail the format or examples for these parameters, leaving some gaps.

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 specific action ('List loaded executable images and shared libraries') and resource ('loaded images with addresses'), distinguishing it from siblings like lldb_backtrace or lldb_threads. It provides concrete examples of what is shown (main executable, shared libraries, load addresses, file paths), making the purpose 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?

The description offers no guidance on when to use this tool versus alternatives. It does not mention sibling tools like lldb_symbols or lldb_examine_variables, nor does it specify scenarios where listing loaded images is appropriate (e.g., debugging memory issues, verifying library loads). Usage is implied but not explicitly stated.

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/benpm/claude_lldb_mcp'

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