Skip to main content

Module tools

Module tools 

Source
Expand description

MCP tool handlers (spec §3). Each maps a worker result Value into the client-facing shape, then canonicalizes every address string through the attached program’s AddressCanonicalizer (spec §6). Domain errors become CallToolResult{isError:true} with the ErrorEnvelope as text (spec §4.2).

Constants§

DESC_ATTACH_PROGRAM
DESC_COMMENT
DESC_DESCRIBE_ADDRESS
DESC_FIND_FUNCTIONS
DESC_GET_DATATYPE
DESC_GET_DISASSEMBLY
DESC_GET_XREFS
DESC_INSPECT_FUNCTION
DESC_LIST_DATA_ITEMS
DESC_LIST_PROJECT_PROGRAMS
DESC_LIST_SEGMENTS
DESC_LIST_STRINGS
DESC_LIST_SYMBOLS
DESC_READ_BYTES
DESC_RENAME
DESC_RESOLVE_SYMBOL
DESC_SET_DATATYPE
DESC_SET_LOCAL
DESC_SET_PROTOTYPE

Functions§

canon_addr 🔒
Re-render a worker space:offset address into the canonical form. If the worker string doesn’t parse, pass it through unchanged rather than error: a display glitch must never fail a good result.
canonicalize_addr_array
Canonicalize a field address string on every object in v[array_key], in place. Total: an unparseable string passes through unchanged (canon_addr is total).
canonicalize_addr_field
Canonicalize a top-level field address string on v, in place (total). Mirrors canonicalize_addr_array for a scalar field rather than an array of objects.
canonicalize_candidates
Canonicalize the address in each AMBIGUOUS_SYMBOL candidate (spec §6).
canonicalize_function_context
Canonicalize every address in a FunctionContext (entry_point, thunked_to, all edge addresses, every data_refs[].address — Task 16, and every comments[].address — M2b read-back tidy).
canonicalize_functions
Canonicalize entry_point (+ thunked_to) in each function of a find_functions result, in place.