angr.mcp.serializers

angr.mcp.serializers.serialize_function(func, include_blocks=False)

Serialize a Function object to a JSON-compatible dict.

Parameters:
  • func (Function) – The angr Function to serialize

  • include_blocks (bool) – Whether to include block addresses

Return type:

dict[str, Any]

Returns:

Dictionary with function information

angr.mcp.serializers.serialize_function_summary(func)

Serialize minimal function info for list views.

Parameters:

func (Function) – The angr Function to serialize

Return type:

dict[str, Any]

Returns:

Dictionary with minimal function information

angr.mcp.serializers.serialize_xref(xref)

Serialize an XRef object.

Parameters:

xref (XRef) – The angr XRef to serialize

Return type:

dict[str, Any]

Returns:

Dictionary with cross-reference information

angr.mcp.serializers.serialize_basic_block(block, include_disasm=True)

Serialize a basic block.

Parameters:
  • block (Any) – The angr Block to serialize

  • include_disasm (bool) – Whether to include disassembly

Return type:

dict[str, Any]

Returns:

Dictionary with block information

angr.mcp.serializers.serialize_cfg_stats(cfg_model)

Serialize CFG statistics.

Parameters:

cfg_model (CFGModel) – The angr CFGModel to summarize

Return type:

dict[str, Any]

Returns:

Dictionary with CFG statistics

angr.mcp.serializers.serialize_symbol(symbol)

Serialize a CLE symbol.

Parameters:

symbol (Any) – The CLE Symbol to serialize

Return type:

dict[str, Any]

Returns:

Dictionary with symbol information